GtmProperty

Use the akamai.GtmProperty resource to create, configure and import a GTM property, a set of IP addresses or CNAMEs that GTM provides in response to DNS queries based on a set of rules.

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

Argument reference

This resource supports these arguments:

  • domain - (Required) DNS name for the GTM Domain set that includes this Property.
  • name - (Required) DNS name for a collection of IP address or CNAME responses. The value, together with the GTM domainName, forms the Property’s hostname.
  • type - (Required) Specifies the load balancing behavior for the property. Either failover, geographic, cidrmapping, weighted-round-robin, weighted-hashed, weighted-round-robin-load-feedback, qtr, or performance.
  • score_aggregation_type - (Required) Specifies how GTM aggregates liveness test scores across different tests, when multiple tests are configured.
  • handout_limit - (Required) Indicates the limit for the number of live IPs handed out to a DNS request.
  • handout_mode - (Required) Specifies how IPs are returned when more than one IP is alive and available.
  • traffic_target - (Optional) Contains information about where to direct data center traffic. You can have multiple traffic_target arguments. If used, includes these arguments:
    • datacenter_id - (Optional) A unique identifier for an existing data center in the domain.
    • enabled - (Optional) A boolean indicating whether the traffic target is used. You can also omit the traffic target, which has the same result as the false value.
    • weight - (Optional) Specifies the traffic weight for the target.
    • servers - (Optional) (List) Identifies the IP address or the hostnames of the servers.
    • name - (Optional) An alternative label for the traffic target.
    • handout_cname - (Optional) Specifies an optional data center for the property. Used when there are no servers configured for the property.
  • liveness_test - (Optional) Contains information about the liveness tests, which are run periodically to determine whether your servers respond to requests. You can have multiple liveness_test arguments. If used, requires these arguments:
    • name - (Required) A descriptive name for the liveness test.
    • test_interval - (Required) Indicates the interval at which the liveness test is run, in seconds. Requires a minimum of 10 seconds.
    • test_object_protocol - (Required) Specifies the test protocol. Possible values include DNS, HTTP, HTTPS, FTP, POP, POPS, SMTP, SMTPS, TCP, or TCPS.
    • test_timeout - (Required) Specifies the duration of the liveness test before it fails. The range is from 0.001 to 60 seconds.
    • answers_required - (Optional) If test_object_protocol is DNS, enter a boolean value if an answer is needed for the DNS query to be successful.
    • disabled - (Optional) A boolean indicating whether the liveness test is disabled. When disabled, GTM stops running the test, effectively treating it as if it no longer exists.
    • disable_nonstandard_port_warning - (Optional) A boolean that if set to true, disables warnings when non-standard ports are used.
    • error_penalty - (Optional) Specifies the score that’s reported if the liveness test encounters an error other than timeout, such as connection refused, and 404.
    • http_header - (Optional) Contains HTTP headers to send if the test_object_protocol is http or https. You can have multiple http_header entries. Requires these arguments:
      • name - (Optional) Name of HTTP header.
      • value - (Optional) Value of HTTP header.
    • http_error3xx - (Optional) A boolean that if set to true, treats a 3xx HTTP response as a failure if the test_object_protocol is http, https, or ftp.
    • http_error4xx - (Optional) A boolean that if set to true, treats a 4xx HTTP response as a failure if the test_object_protocol is http, https, or ftp.
    • http_error5xx - (Optional) A boolean that if set to true, treats a 5xx HTTP response as a failure if the test_object_protocol is http, https, or ftp.
    • peer_certificate_verification - (Optional) A boolean that if set to true, validates the origin certificate. Applies only to tests with test_object_protocol of https.
    • recursion_requested - (Optional) A boolean indicating whether the test_object_protocol is DNS. The DNS query is recursive.
    • request_string - (Optional) Specifies a request string.
    • resource_type - (Optional) Specifies the query type, if test_object_protocol is DNS.
    • response_string - (Optional) Specifies a response string.
    • ssl_client_certificate - (Optional) Indicates a Base64-encoded certificate. SSL client certificates are available for livenessTests that use secure protocols.
    • ssl_client_private_key - (Optional) Indicates a Base64-encoded private key. The private key used to generate or request a certificate for livenessTests can’t have a passphrase nor be used for any other purpose.
    • test_object - (Required) Specifies the static text that acts as a stand-in for the data that you’re sending on the network.
    • test_object_password - (Optional) Specifies the test object’s password. It is required if testObjectProtocol is ftp.
    • test_object_port - (Required) Specifies the port number for the testObject.
    • test_object_username - (Optional) A descriptive name for the testObject.
    • timeout_penalty- (Optional) Specifies the score to be reported if the liveness test times out.
  • wait_on_complete - (Optional) A boolean indicating whether to wait for transaction to complete. Set to true by default.
  • failover_delay - (Optional) Specifies the failover delay in seconds.
  • failback_delay - (Optional) Specifies the failback delay in seconds.
  • ipv6 - (Optional) A boolean that indicates the type of IP address handed out by a GTM property.
  • stickiness_bonus_percentage - (Optional) Specifies a percentage used to configure data center affinity.
  • stickiness_bonus_constant - (Optional) Specifies a constant used to configure data center affinity.
  • health_threshold - (Optional) Configures a cutoff value that is computed from the median scores.
  • use_computed_targets - (Optional) For load-feedback domains only, a boolean that indicates whether you want GTM to automatically compute target load.
  • backup_ip - (Optional) Specifies a backup IP. When GTM declares that all of the targets are down, the backup IP is handed out. If a backup IP is set, do not set a backup CNAME.
  • backup_cname - (Optional) Specifies a backup CNAME. If GTM declares that all of the servers configured for your property are down, the backup CNAME is handed out. If a backup CNAME is set, do not set a backup IP.
  • balance_by_download_score - (Optional) A boolean that indicates whether download score based load balancing is enabled.
  • unreachable_threshold - (Optional) For performance domains, this specifies a penalty value that’s added to liveness test scores when data centers have an aggregated loss fraction higher than this value.
  • health_multiplier - (Optional) Configures a cutoff value that is computed from the median scores.
  • dynamic_ttl - (Optional) Indicates the TTL in seconds for records that might change dynamically based on liveness and load balancing such as A and AAAA records, and CNAMEs.
  • max_unreachable_penalty - (Optional) For performance domains, this specifies a penalty value that’s added to liveness test scores when data centers show an aggregated loss fraction higher than the penalty value.
  • map_name - (Optional) A descriptive label for a GeographicMap or a CidrMap that’s required if the property is either geographic or cidrmapping, in which case mapName needs to reference either an existing GeographicMap or CidrMap in the same domain.
  • load_imbalance_percentage - (Optional) Indicates the percent of load imbalance factor (LIF) for the property.
  • health_max - (Optional) Defines the absolute limit beyond which IPs are declared unhealthy.
  • cname - (Optional) Indicates the fully qualified name aliased to a particular property.
  • comments - (Optional) A descriptive note about changes to the domain. The maximum is 4000 characters.
  • ghost_demand_reporting - (Optional) Use load estimates from Akamai Ghost utilization messages.
  • min_live_fraction - (Optional) Specifies what fraction of the servers need to respond to requests so GTM considers the data center up and able to receive traffic.
  • static_rr_set - (Optional) Contains static record sets. You can have multiple static_rr_set entries. Requires these arguments:
    • type - (Optional) The record type.
    • ttl - (Optional) The number of seconds that this record should live in a resolver’s cache before being refetched.
    • rdata - (Optional) (List) An array of data strings, representing multiple records within a set.

Attribute reference

This resource returns these computed attributes in the state file:

  • weighted_hash_bits_for_ipv4
  • weighted_hash_bits_for_ipv6

Schema reference

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

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var demoProperty = new Akamai.GtmProperty("demoProperty", new Akamai.GtmPropertyArgs
        {
            Domain = "demo_domain.akadns.net",
            HandoutLimit = 5,
            HandoutMode = "normal",
            ScoreAggregationType = "median",
            TrafficTargets = 
            {
                new Akamai.Inputs.GtmPropertyTrafficTargetArgs
                {
                    DatacenterId = 3131,
                },
            },
            Type = "weighted-round-robin",
        });
    }

}
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.NewGtmProperty(ctx, "demoProperty", &akamai.GtmPropertyArgs{
			Domain:               pulumi.String("demo_domain.akadns.net"),
			HandoutLimit:         pulumi.Int(5),
			HandoutMode:          pulumi.String("normal"),
			ScoreAggregationType: pulumi.String("median"),
			TrafficTargets: GtmPropertyTrafficTargetArray{
				&GtmPropertyTrafficTargetArgs{
					DatacenterId: pulumi.Int(3131),
				},
			},
			Type: pulumi.String("weighted-round-robin"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

demo_property = akamai.GtmProperty("demoProperty",
    domain="demo_domain.akadns.net",
    handout_limit=5,
    handout_mode="normal",
    score_aggregation_type="median",
    traffic_targets=[akamai.GtmPropertyTrafficTargetArgs(
        datacenter_id=3131,
    )],
    type="weighted-round-robin")
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const demoProperty = new akamai.GtmProperty("demo_property", {
    domain: "demo_domain.akadns.net",
    handoutLimit: 5,
    handoutMode: "normal",
    scoreAggregationType: "median",
    trafficTargets: [{
        datacenterId: 3131,
    }],
    type: "weighted-round-robin",
});

Create a GtmProperty Resource

new GtmProperty(name: string, args: GtmPropertyArgs, opts?: CustomResourceOptions);
@overload
def GtmProperty(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                backup_cname: Optional[str] = None,
                backup_ip: Optional[str] = None,
                balance_by_download_score: Optional[bool] = None,
                cname: Optional[str] = None,
                comments: Optional[str] = None,
                domain: Optional[str] = None,
                dynamic_ttl: Optional[int] = None,
                failback_delay: Optional[int] = None,
                failover_delay: Optional[int] = None,
                ghost_demand_reporting: Optional[bool] = None,
                handout_limit: Optional[int] = None,
                handout_mode: Optional[str] = None,
                health_max: Optional[float] = None,
                health_multiplier: Optional[float] = None,
                health_threshold: Optional[float] = None,
                ipv6: Optional[bool] = None,
                liveness_tests: Optional[Sequence[GtmPropertyLivenessTestArgs]] = None,
                load_imbalance_percentage: Optional[float] = None,
                map_name: Optional[str] = None,
                max_unreachable_penalty: Optional[int] = None,
                min_live_fraction: Optional[float] = None,
                name: Optional[str] = None,
                score_aggregation_type: Optional[str] = None,
                static_rr_sets: Optional[Sequence[GtmPropertyStaticRrSetArgs]] = None,
                static_ttl: Optional[int] = None,
                stickiness_bonus_constant: Optional[int] = None,
                stickiness_bonus_percentage: Optional[int] = None,
                traffic_targets: Optional[Sequence[GtmPropertyTrafficTargetArgs]] = None,
                type: Optional[str] = None,
                unreachable_threshold: Optional[float] = None,
                use_computed_targets: Optional[bool] = None,
                wait_on_complete: Optional[bool] = None)
@overload
def GtmProperty(resource_name: str,
                args: GtmPropertyArgs,
                opts: Optional[ResourceOptions] = None)
func NewGtmProperty(ctx *Context, name string, args GtmPropertyArgs, opts ...ResourceOption) (*GtmProperty, error)
public GtmProperty(string name, GtmPropertyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args GtmPropertyArgs
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 GtmPropertyArgs
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 GtmPropertyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args GtmPropertyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

GtmProperty 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 GtmProperty resource accepts the following input properties:

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
WeightedHashBitsForIpv4 int
WeightedHashBitsForIpv6 int
Id string
The provider-assigned unique ID for this managed resource.
WeightedHashBitsForIpv4 int
WeightedHashBitsForIpv6 int
id string
The provider-assigned unique ID for this managed resource.
weightedHashBitsForIpv4 number
weightedHashBitsForIpv6 number
id str
The provider-assigned unique ID for this managed resource.
weighted_hash_bits_for_ipv4 int
weighted_hash_bits_for_ipv6 int

Look up an Existing GtmProperty Resource

Get an existing GtmProperty 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?: GtmPropertyState, opts?: CustomResourceOptions): GtmProperty
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backup_cname: Optional[str] = None,
        backup_ip: Optional[str] = None,
        balance_by_download_score: Optional[bool] = None,
        cname: Optional[str] = None,
        comments: Optional[str] = None,
        domain: Optional[str] = None,
        dynamic_ttl: Optional[int] = None,
        failback_delay: Optional[int] = None,
        failover_delay: Optional[int] = None,
        ghost_demand_reporting: Optional[bool] = None,
        handout_limit: Optional[int] = None,
        handout_mode: Optional[str] = None,
        health_max: Optional[float] = None,
        health_multiplier: Optional[float] = None,
        health_threshold: Optional[float] = None,
        ipv6: Optional[bool] = None,
        liveness_tests: Optional[Sequence[GtmPropertyLivenessTestArgs]] = None,
        load_imbalance_percentage: Optional[float] = None,
        map_name: Optional[str] = None,
        max_unreachable_penalty: Optional[int] = None,
        min_live_fraction: Optional[float] = None,
        name: Optional[str] = None,
        score_aggregation_type: Optional[str] = None,
        static_rr_sets: Optional[Sequence[GtmPropertyStaticRrSetArgs]] = None,
        static_ttl: Optional[int] = None,
        stickiness_bonus_constant: Optional[int] = None,
        stickiness_bonus_percentage: Optional[int] = None,
        traffic_targets: Optional[Sequence[GtmPropertyTrafficTargetArgs]] = None,
        type: Optional[str] = None,
        unreachable_threshold: Optional[float] = None,
        use_computed_targets: Optional[bool] = None,
        wait_on_complete: Optional[bool] = None,
        weighted_hash_bits_for_ipv4: Optional[int] = None,
        weighted_hash_bits_for_ipv6: Optional[int] = None) -> GtmProperty
func GetGtmProperty(ctx *Context, name string, id IDInput, state *GtmPropertyState, opts ...ResourceOption) (*GtmProperty, error)
public static GtmProperty Get(string name, Input<string> id, GtmPropertyState? 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

GtmPropertyLivenessTest

GtmPropertyLivenessTestHttpHeader

Name string
Value string
Name string
Value string
name string
value string
name str
value str

GtmPropertyStaticRrSet

Rdatas List<string>
Ttl int
Type string
Rdatas []string
Ttl int
Type string
rdatas string[]
ttl number
type string
rdatas Sequence[str]
ttl int
type str

GtmPropertyTrafficTarget

DatacenterId int
Enabled bool
HandoutCname string
Name string
Servers List<string>
Weight double
DatacenterId int
Enabled bool
HandoutCname string
Name string
Servers []string
Weight float64
datacenterId number
enabled boolean
handoutCname string
name string
servers string[]
weight number
datacenter_id int
enabled bool
handout_cname str
name str
servers Sequence[str]
weight float

Package Details

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