GuideReference
TrainingSupportCommunity

Network Lists

akamai_networklist_network_lists

Get all of your network lists. To get a particular type of list or details about a specific list, pass an optional argument to filter the return.

data "akamai_networklist_network_lists" "my_network_lists" {
}

output "my_network_lists" {
	value = data.akamai_networklist_network_lists.my_network_lists
}
Changes to Outputs:
  + my_network_lists = {
      + contract_id     = null
      + group_id        = null
      + id              = "123_MYNETWORKLIST"
      + json            = jsonencode(
            {
              + links        = {
                  + create = {
                      + href   = "/network-list/v2/network-lists"
                      + method = "POST"
                    }
                }
              + networkLists = [
                  + {
                      + elementCount    = 1234
                      + links           = {
                          + activateInProduction = {
                              + href   = "/network-list/v2/network-lists/123_MYNETWORKLIST/environments/PRODUCTION/activate"
                              + method = "POST"
                            }
                          + activateInStaging    = {
                              + href   = "/network-list/v2/network-lists/123_MYNETWORKLIST/environments/STAGING/activate"
                              + method = "POST"
                            }
                          + appendItems          = {
                              + href   = "/network-list/v2/network-lists/123_MYNETWORKLIST/append"
                              + method = "POST"
                            }
                          + retrieve             = {
                              + href = "/network-list/v2/network-lists/123_MYNETWORKLIST"
                            }
                          + statusInProduction   = {
                              + href = "/network-list/v2/network-lists/123_MYNETWORKLIST/environments/PRODUCTION/status"
                            }
                          + statusInStaging      = {
                              + href = "/network-list/v2/network-lists/123_MYNETWORKLIST/environments/STAGING/status"
                            }
                          + update               = {
                              + href   = "/network-list/v2/network-lists/123_MYNETWORKLIST"
                              + method = "PUT"
                            }
                        }
                      + name            = "My 123 network list"
                      + networkListType = "networkListResponse"
                      + readOnly        = true
                      + shared          = true
                      + type            = "IP"
                      + uniqueId        = "123_MYNETWORKLIST"
                    },
                  + {
                      + elementCount    = 5678
                      + links           = {
                          + activateInProduction = {
                              + href   = "/network-list/v2/network-lists/567_MYNETWORKLIST/environments/PRODUCTION/activate"
                              + method = "POST"
                            }
                          + activateInStaging    = {
                              + href   = "/network-list/v2/network-lists/567_MYNETWORKLIST/environments/STAGING/activate"
                              + method = "POST"
                            }
                          + appendItems          = {
                              + href   = "/network-list/v2/network-lists/567_MYNETWORKLIST/append"
                              + method = "POST"
                            }
                          + retrieve             = {
                              + href = "/network-list/v2/network-lists/567_MYNETWORKLIST"
                            }
                          + statusInProduction   = {
                              + href = "/network-list/v2/network-lists/567_MYNETWORKLIST/environments/PRODUCTION/status"
                            }
                          + statusInStaging      = {
                              + href = "/network-list/v2/network-lists/567_MYNETWORKLIST/environments/STAGING/status"
                            }
                          + update               = {
                              + href   = "/network-list/v2/network-lists/567_MYNETWORKLIST"
                              + method = "PUT"
                            }
                        }
                      + name            = "My 567 network list"
                      + networkListType = "networkListResponse"
                      + readOnly        = true
                      + shared          = true
                      + type            = "IP"
                      + uniqueId        = "567_MYNETWORKLIST"
                    },
                ]
            }
        )
    }
+ list            = [
		+ 123_MYNETWORKLIST
		+ 567_MYNETWORKLIST
  ]
+ output_text     = <<-EOT
  +--------------------------------------------------------------------+
  | networkListsDS
  +---------------------+-------------------+----+------------+--------+
  | NAME                | ID                |TYPE|ELEMENTCOUNT|READONLY|
  +---------------------+-------------------+----+------------+---------+
  | My 123 network list | 123_MYNETWORKLIST | IP | 1234       | true   |
  | My 567 network list | 567_MYNETWORKLIST | IP | 5678       | true   |
  +---------------------+-------------------+----+------------+--------+
  EOT

Arguments

Passed empty, you get all of the network lists associated with your credentials. To filter the response, pass one or more optional arguments.

ArgumentRequiredDescription
nameA network list's name.
typeThe kind of network list to return. Value is IP or GEO. When not provided, you get both.
network_list_idA network list's ID.

Attributes

The standard output returns attributes about your network lists as jsonencode, list, and output_text.

If you want a specific type of output, add it to the end of your data source's output block value.

AttributeDescription
nameA network lists's name.
element_countThe total number of items in your list.
network_list_typeThe kind of network list returned, IP or GEO.
read_onlyWhether you have permission to modify the network list.
sharedWhether the list is from Akamai or some other account. Shared lists are always read-only.
unique_idThe network list's ID.
descriptionAdditional information about the network list.