GtmAsmap

Use the akamai.GtmAsmap resource to create, configure, and import a GTM Autonomous System (AS) map. AS mapping lets you configure a GTM property that returns a CNAME based on the AS number associated with the requester’s IP address.

You can reuse maps for multiple properties or create new ones. AS maps split the Internet into multiple AS block zones. Properties that use AS maps can specify handout integers for each zone. AS mapping lets you configure a property that directs users to a specific environment or to the origin.

Note Import requires an ID with this format: existing_domain_name:existing_map_name.

Argument reference

This resource supports these arguments:

  • domain - (Required) The GTM Domain name for the AS map.
  • name - (Required) A descriptive label for the AS map. Properties set up for AS mapping can use this as reference.
  • default_datacenter - (Required) A placeholder for all other AS zones not found in these AS zones. Requires these additional arguments:
    • datacenter_id - (Required) A unique identifier for an existing data center in the domain.
    • nickname - (Required) A descriptive label for all other AS zones, up to 128 characters.
  • wait_on_complete - (Optional) A boolean that, if true, waits for transaction to complete.
  • assignment - (Optional) Contains information about the AS zone groupings of AS IDs. You can have multiple entries with this argument. If used, requires these arguments:
    • datacenter_id - A unique identifier for an existing data center in the domain.
    • nickname - A descriptive label for the group.
    • as_numbers - Specifies an array of AS numbers.

Schema reference

You can download the GTM AS Map backing schema from the Global Traffic Management API page.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var demoAsmap = new Akamai.GtmAsmap("demoAsmap", new Akamai.GtmAsmapArgs
        {
            DefaultDatacenter = new Akamai.Inputs.GtmAsmapDefaultDatacenterArgs
            {
                DatacenterId = 5400,
                Nickname = "All Other AS numbers",
            },
            Domain = "demo_domain.akadns.net",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v2/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := akamai.NewGtmAsmap(ctx, "demoAsmap", &akamai.GtmAsmapArgs{
			DefaultDatacenter: &GtmAsmapDefaultDatacenterArgs{
				DatacenterId: pulumi.Int(5400),
				Nickname:     pulumi.String("All Other AS numbers"),
			},
			Domain: pulumi.String("demo_domain.akadns.net"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

demo_asmap = akamai.GtmAsmap("demoAsmap",
    default_datacenter=akamai.GtmAsmapDefaultDatacenterArgs(
        datacenter_id=5400,
        nickname="All Other AS numbers",
    ),
    domain="demo_domain.akadns.net")
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const demoAsmap = new akamai.GtmAsmap("demo_asmap", {
    defaultDatacenter: {
        datacenterId: 5400,
        nickname: "All Other AS numbers",
    },
    domain: "demo_domain.akadns.net",
});

Create a GtmAsmap Resource

new GtmAsmap(name: string, args: GtmAsmapArgs, opts?: CustomResourceOptions);
@overload
def GtmAsmap(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             assignments: Optional[Sequence[GtmAsmapAssignmentArgs]] = None,
             default_datacenter: Optional[GtmAsmapDefaultDatacenterArgs] = None,
             domain: Optional[str] = None,
             name: Optional[str] = None,
             wait_on_complete: Optional[bool] = None)
@overload
def GtmAsmap(resource_name: str,
             args: GtmAsmapArgs,
             opts: Optional[ResourceOptions] = None)
func NewGtmAsmap(ctx *Context, name string, args GtmAsmapArgs, opts ...ResourceOption) (*GtmAsmap, error)
public GtmAsmap(string name, GtmAsmapArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args GtmAsmapArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args GtmAsmapArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args GtmAsmapArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GtmAsmapArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

GtmAsmap Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The GtmAsmap resource accepts the following input properties:

Outputs

All input properties are implicitly available as output properties. Additionally, the GtmAsmap resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing GtmAsmap Resource

Get an existing GtmAsmap resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GtmAsmapState, opts?: CustomResourceOptions): GtmAsmap
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        assignments: Optional[Sequence[GtmAsmapAssignmentArgs]] = None,
        default_datacenter: Optional[GtmAsmapDefaultDatacenterArgs] = None,
        domain: Optional[str] = None,
        name: Optional[str] = None,
        wait_on_complete: Optional[bool] = None) -> GtmAsmap
func GetGtmAsmap(ctx *Context, name string, id IDInput, state *GtmAsmapState, opts ...ResourceOption) (*GtmAsmap, error)
public static GtmAsmap Get(string name, Input<string> id, GtmAsmapState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Supporting Types

GtmAsmapAssignment

AsNumbers List<int>
DatacenterId int
Nickname string
asNumbers number[]
datacenterId number
nickname string
as_numbers Sequence[int]
datacenter_id int
nickname str

GtmAsmapDefaultDatacenter

datacenterId number
nickname string

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes
This Pulumi package is based on the akamai Terraform Provider.