CP codes
BetaHello. Just a note to let you know the underlying API on which this data source is built is general release and has been vetted, but because this is a new feature for our Terraform provider, we've given it beta label.
This status just means we've paused for a bit to get your feedback to make sure this data source works like you need and expect.
List details of all CP codes available to you.
To create a new CP code, use the akamai_cp_code resource from the Property Manager subprovider.
data "akamai_reportinggroups_cp_codes" "my-cp-codes" {
contract_id = "C-0N7RAC7"
group_id = "54321"
product_id = "ObjectDelivery::ObjectDelivery"
cp_code_name = "My CP code"
}
output "my-cp-codes" {
value = data.akamai_reportinggroups_cp_codes.my-cp-codes
}my-cp-codes = {
contract_id = "C-0N7RAC7"
cp_code_name = "My CP code"
cp_codes = [
{
access_group = {
contract_id = "C-0N7RAC7"
group_id = "54321"
}
account_id = "A-CCT1234"
contracts = [
{
contract_id = "C-0N7RAC7"
status = "ongoing"
},
]
cp_code_id = 12345
default_time_zone = "GMT 0 (Greenwich Mean Time)"
name = "My CP code"
override_time_zone = {
time_zone_id = "0"
time_zone_value = "GMT 0 (Greenwich Mean Time)"
}
products = [
{
product_id = "ObjectDelivery::ObjectDelivery"
product_name = "Object Delivery"
},
]
purgeable = true
type = "Regular"
}
]
group_id = "54321"
product_id = "ObjectDelivery::ObjectDelivery"
}Arguments
Leave the data source empty to return all CP codes or provide optional arguments to filter your results.
| Name | Required | Description |
|---|---|---|
contract_id | A contract's ID to filter data by. | |
group_id | An access group's ID to filter data by. | |
product_id | A product's ID to filter data by. To get the product IDs, run the List products within a reporting group operation. | |
cp_code_name | A CP code's name to filter data by. |
Attributes
Returned to you is the set of cp_codes with their details.
| Name | Description |
|---|---|
account_id | The account's ID. |
cp_code_id | The CP code's ID. |
name | The name of the CP code. |
purgeable | When true, you can purge the content cached by the CP code. |
default_time_zone | The default GMT time zone of the CP code. |
override_time_zone | The override GMT time zone that overrides the default time zone of the CP code.
|
type | Whether the CP code supports serving traffic from China, or Regular traffic elsewhere. |
contracts | A list of contracts assigned to the CP code.
|
products | A list of products assigned to the CP code.
|
access_group | A group that controls access to specific CP codes.
|
Updated 3 days ago
