aws.route53.TrafficPolicyInstance
Explore with Pulumi AI
Provides a Route53 traffic policy instance resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.route53.TrafficPolicyInstance("test", {
name: "test.example.com",
trafficPolicyId: "b3gb108f-ea6f-45a5-baab-9d112d8b4037",
trafficPolicyVersion: 1,
hostedZoneId: "Z033120931TAQO548OGJC",
ttl: 360,
});
import pulumi
import pulumi_aws as aws
test = aws.route53.TrafficPolicyInstance("test",
name="test.example.com",
traffic_policy_id="b3gb108f-ea6f-45a5-baab-9d112d8b4037",
traffic_policy_version=1,
hosted_zone_id="Z033120931TAQO548OGJC",
ttl=360)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := route53.NewTrafficPolicyInstance(ctx, "test", &route53.TrafficPolicyInstanceArgs{
Name: pulumi.String("test.example.com"),
TrafficPolicyId: pulumi.String("b3gb108f-ea6f-45a5-baab-9d112d8b4037"),
TrafficPolicyVersion: pulumi.Int(1),
HostedZoneId: pulumi.String("Z033120931TAQO548OGJC"),
Ttl: pulumi.Int(360),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.Route53.TrafficPolicyInstance("test", new()
{
Name = "test.example.com",
TrafficPolicyId = "b3gb108f-ea6f-45a5-baab-9d112d8b4037",
TrafficPolicyVersion = 1,
HostedZoneId = "Z033120931TAQO548OGJC",
Ttl = 360,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.TrafficPolicyInstance;
import com.pulumi.aws.route53.TrafficPolicyInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new TrafficPolicyInstance("test", TrafficPolicyInstanceArgs.builder()
.name("test.example.com")
.trafficPolicyId("b3gb108f-ea6f-45a5-baab-9d112d8b4037")
.trafficPolicyVersion(1)
.hostedZoneId("Z033120931TAQO548OGJC")
.ttl(360)
.build());
}
}
resources:
test:
type: aws:route53:TrafficPolicyInstance
properties:
name: test.example.com
trafficPolicyId: b3gb108f-ea6f-45a5-baab-9d112d8b4037
trafficPolicyVersion: 1
hostedZoneId: Z033120931TAQO548OGJC
ttl: 360
Create TrafficPolicyInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrafficPolicyInstance(name: string, args: TrafficPolicyInstanceArgs, opts?: CustomResourceOptions);
@overload
def TrafficPolicyInstance(resource_name: str,
args: TrafficPolicyInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrafficPolicyInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
hosted_zone_id: Optional[str] = None,
traffic_policy_id: Optional[str] = None,
traffic_policy_version: Optional[int] = None,
ttl: Optional[int] = None,
name: Optional[str] = None)
func NewTrafficPolicyInstance(ctx *Context, name string, args TrafficPolicyInstanceArgs, opts ...ResourceOption) (*TrafficPolicyInstance, error)
public TrafficPolicyInstance(string name, TrafficPolicyInstanceArgs args, CustomResourceOptions? opts = null)
public TrafficPolicyInstance(String name, TrafficPolicyInstanceArgs args)
public TrafficPolicyInstance(String name, TrafficPolicyInstanceArgs args, CustomResourceOptions options)
type: aws:route53:TrafficPolicyInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TrafficPolicyInstanceArgs
- 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 TrafficPolicyInstanceArgs
- 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 TrafficPolicyInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrafficPolicyInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrafficPolicyInstanceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var trafficPolicyInstanceResource = new Aws.Route53.TrafficPolicyInstance("trafficPolicyInstanceResource", new()
{
HostedZoneId = "string",
TrafficPolicyId = "string",
TrafficPolicyVersion = 0,
Ttl = 0,
Name = "string",
});
example, err := route53.NewTrafficPolicyInstance(ctx, "trafficPolicyInstanceResource", &route53.TrafficPolicyInstanceArgs{
HostedZoneId: pulumi.String("string"),
TrafficPolicyId: pulumi.String("string"),
TrafficPolicyVersion: pulumi.Int(0),
Ttl: pulumi.Int(0),
Name: pulumi.String("string"),
})
var trafficPolicyInstanceResource = new TrafficPolicyInstance("trafficPolicyInstanceResource", TrafficPolicyInstanceArgs.builder()
.hostedZoneId("string")
.trafficPolicyId("string")
.trafficPolicyVersion(0)
.ttl(0)
.name("string")
.build());
traffic_policy_instance_resource = aws.route53.TrafficPolicyInstance("trafficPolicyInstanceResource",
hosted_zone_id="string",
traffic_policy_id="string",
traffic_policy_version=0,
ttl=0,
name="string")
const trafficPolicyInstanceResource = new aws.route53.TrafficPolicyInstance("trafficPolicyInstanceResource", {
hostedZoneId: "string",
trafficPolicyId: "string",
trafficPolicyVersion: 0,
ttl: 0,
name: "string",
});
type: aws:route53:TrafficPolicyInstance
properties:
hostedZoneId: string
name: string
trafficPolicyId: string
trafficPolicyVersion: 0
ttl: 0
TrafficPolicyInstance 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 TrafficPolicyInstance resource accepts the following input properties:
- Hosted
Zone stringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- Traffic
Policy stringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- Traffic
Policy intVersion - Version of the traffic policy
- Ttl int
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- Name string
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- Hosted
Zone stringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- Traffic
Policy stringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- Traffic
Policy intVersion - Version of the traffic policy
- Ttl int
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- Name string
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- hosted
Zone StringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- traffic
Policy StringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- traffic
Policy IntegerVersion - Version of the traffic policy
- ttl Integer
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- name String
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- hosted
Zone stringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- traffic
Policy stringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- traffic
Policy numberVersion - Version of the traffic policy
- ttl number
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- name string
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- hosted_
zone_ strid - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- traffic_
policy_ strid - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- traffic_
policy_ intversion - Version of the traffic policy
- ttl int
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- name str
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- hosted
Zone StringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- traffic
Policy StringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- traffic
Policy NumberVersion - Version of the traffic policy
- ttl Number
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- name String
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrafficPolicyInstance 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 string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TrafficPolicyInstance Resource
Get an existing TrafficPolicyInstance 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?: TrafficPolicyInstanceState, opts?: CustomResourceOptions): TrafficPolicyInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
hosted_zone_id: Optional[str] = None,
name: Optional[str] = None,
traffic_policy_id: Optional[str] = None,
traffic_policy_version: Optional[int] = None,
ttl: Optional[int] = None) -> TrafficPolicyInstance
func GetTrafficPolicyInstance(ctx *Context, name string, id IDInput, state *TrafficPolicyInstanceState, opts ...ResourceOption) (*TrafficPolicyInstance, error)
public static TrafficPolicyInstance Get(string name, Input<string> id, TrafficPolicyInstanceState? state, CustomResourceOptions? opts = null)
public static TrafficPolicyInstance get(String name, Output<String> id, TrafficPolicyInstanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Hosted
Zone stringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- Name string
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- Traffic
Policy stringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- Traffic
Policy intVersion - Version of the traffic policy
- Ttl int
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- Hosted
Zone stringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- Name string
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- Traffic
Policy stringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- Traffic
Policy intVersion - Version of the traffic policy
- Ttl int
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- hosted
Zone StringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- name String
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- traffic
Policy StringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- traffic
Policy IntegerVersion - Version of the traffic policy
- ttl Integer
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- hosted
Zone stringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- name string
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- traffic
Policy stringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- traffic
Policy numberVersion - Version of the traffic policy
- ttl number
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- hosted_
zone_ strid - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- name str
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- traffic_
policy_ strid - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- traffic_
policy_ intversion - Version of the traffic policy
- ttl int
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
- hosted
Zone StringId - ID of the hosted zone that you want Amazon Route 53 to create resource record sets in by using the configuration in a traffic policy.
- name String
- Domain name for which Amazon Route 53 responds to DNS queries by using the resource record sets that Route 53 creates for this traffic policy instance.
- traffic
Policy StringId - ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone.
- traffic
Policy NumberVersion - Version of the traffic policy
- ttl Number
- TTL that you want Amazon Route 53 to assign to all the resource record sets that it creates in the specified hosted zone.
Import
Using pulumi import
, import Route53 traffic policy instance using its id. For example:
$ pulumi import aws:route53/trafficPolicyInstance:TrafficPolicyInstance test df579d9a-6396-410e-ac22-e7ad60cf9e7e
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.