1. Packages
  2. Openstack Provider
  3. API Docs
  4. dns
  5. TransferAccept
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

openstack.dns.TransferAccept

Explore with Pulumi AI

openstack logo
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages a DNS zone transfer accept in the OpenStack DNS Service.

    Example Usage

    Automatically detect the correct network

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const exampleZone = new openstack.dns.Zone("example_zone", {
        name: "example.com.",
        email: "jdoe@example.com",
        description: "An example zone",
        ttl: 3000,
        type: "PRIMARY",
    });
    const request1 = new openstack.dns.TransferRequest("request_1", {
        zoneId: exampleZone.id,
        description: "a transfer accept",
    });
    const accept1 = new openstack.dns.TransferAccept("accept_1", {
        zoneTransferRequestId: request1.id,
        key: request1.key,
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    example_zone = openstack.dns.Zone("example_zone",
        name="example.com.",
        email="jdoe@example.com",
        description="An example zone",
        ttl=3000,
        type="PRIMARY")
    request1 = openstack.dns.TransferRequest("request_1",
        zone_id=example_zone.id,
        description="a transfer accept")
    accept1 = openstack.dns.TransferAccept("accept_1",
        zone_transfer_request_id=request1.id,
        key=request1.key)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleZone, err := dns.NewZone(ctx, "example_zone", &dns.ZoneArgs{
    			Name:        pulumi.String("example.com."),
    			Email:       pulumi.String("jdoe@example.com"),
    			Description: pulumi.String("An example zone"),
    			Ttl:         pulumi.Int(3000),
    			Type:        pulumi.String("PRIMARY"),
    		})
    		if err != nil {
    			return err
    		}
    		request1, err := dns.NewTransferRequest(ctx, "request_1", &dns.TransferRequestArgs{
    			ZoneId:      exampleZone.ID(),
    			Description: pulumi.String("a transfer accept"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewTransferAccept(ctx, "accept_1", &dns.TransferAcceptArgs{
    			ZoneTransferRequestId: request1.ID(),
    			Key:                   request1.Key,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleZone = new OpenStack.Dns.Zone("example_zone", new()
        {
            Name = "example.com.",
            Email = "jdoe@example.com",
            Description = "An example zone",
            Ttl = 3000,
            Type = "PRIMARY",
        });
    
        var request1 = new OpenStack.Dns.TransferRequest("request_1", new()
        {
            ZoneId = exampleZone.Id,
            Description = "a transfer accept",
        });
    
        var accept1 = new OpenStack.Dns.TransferAccept("accept_1", new()
        {
            ZoneTransferRequestId = request1.Id,
            Key = request1.Key,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.dns.Zone;
    import com.pulumi.openstack.dns.ZoneArgs;
    import com.pulumi.openstack.dns.TransferRequest;
    import com.pulumi.openstack.dns.TransferRequestArgs;
    import com.pulumi.openstack.dns.TransferAccept;
    import com.pulumi.openstack.dns.TransferAcceptArgs;
    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 exampleZone = new Zone("exampleZone", ZoneArgs.builder()
                .name("example.com.")
                .email("jdoe@example.com")
                .description("An example zone")
                .ttl(3000)
                .type("PRIMARY")
                .build());
    
            var request1 = new TransferRequest("request1", TransferRequestArgs.builder()
                .zoneId(exampleZone.id())
                .description("a transfer accept")
                .build());
    
            var accept1 = new TransferAccept("accept1", TransferAcceptArgs.builder()
                .zoneTransferRequestId(request1.id())
                .key(request1.key())
                .build());
    
        }
    }
    
    resources:
      exampleZone:
        type: openstack:dns:Zone
        name: example_zone
        properties:
          name: example.com.
          email: jdoe@example.com
          description: An example zone
          ttl: 3000
          type: PRIMARY
      request1:
        type: openstack:dns:TransferRequest
        name: request_1
        properties:
          zoneId: ${exampleZone.id}
          description: a transfer accept
      accept1:
        type: openstack:dns:TransferAccept
        name: accept_1
        properties:
          zoneTransferRequestId: ${request1.id}
          key: ${request1.key}
    

    Create TransferAccept Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TransferAccept(name: string, args: TransferAcceptArgs, opts?: CustomResourceOptions);
    @overload
    def TransferAccept(resource_name: str,
                       args: TransferAcceptArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def TransferAccept(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       key: Optional[str] = None,
                       zone_transfer_request_id: Optional[str] = None,
                       disable_status_check: Optional[bool] = None,
                       region: Optional[str] = None,
                       value_specs: Optional[Mapping[str, str]] = None)
    func NewTransferAccept(ctx *Context, name string, args TransferAcceptArgs, opts ...ResourceOption) (*TransferAccept, error)
    public TransferAccept(string name, TransferAcceptArgs args, CustomResourceOptions? opts = null)
    public TransferAccept(String name, TransferAcceptArgs args)
    public TransferAccept(String name, TransferAcceptArgs args, CustomResourceOptions options)
    
    type: openstack:dns:TransferAccept
    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 TransferAcceptArgs
    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 TransferAcceptArgs
    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 TransferAcceptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TransferAcceptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TransferAcceptArgs
    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 transferAcceptResource = new OpenStack.Dns.TransferAccept("transferAcceptResource", new()
    {
        Key = "string",
        ZoneTransferRequestId = "string",
        DisableStatusCheck = false,
        Region = "string",
        ValueSpecs = 
        {
            { "string", "string" },
        },
    });
    
    example, err := dns.NewTransferAccept(ctx, "transferAcceptResource", &dns.TransferAcceptArgs{
    	Key:                   pulumi.String("string"),
    	ZoneTransferRequestId: pulumi.String("string"),
    	DisableStatusCheck:    pulumi.Bool(false),
    	Region:                pulumi.String("string"),
    	ValueSpecs: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var transferAcceptResource = new TransferAccept("transferAcceptResource", TransferAcceptArgs.builder()
        .key("string")
        .zoneTransferRequestId("string")
        .disableStatusCheck(false)
        .region("string")
        .valueSpecs(Map.of("string", "string"))
        .build());
    
    transfer_accept_resource = openstack.dns.TransferAccept("transferAcceptResource",
        key="string",
        zone_transfer_request_id="string",
        disable_status_check=False,
        region="string",
        value_specs={
            "string": "string",
        })
    
    const transferAcceptResource = new openstack.dns.TransferAccept("transferAcceptResource", {
        key: "string",
        zoneTransferRequestId: "string",
        disableStatusCheck: false,
        region: "string",
        valueSpecs: {
            string: "string",
        },
    });
    
    type: openstack:dns:TransferAccept
    properties:
        disableStatusCheck: false
        key: string
        region: string
        valueSpecs:
            string: string
        zoneTransferRequestId: string
    

    TransferAccept Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The TransferAccept resource accepts the following input properties:

    Key string
    The transfer key.
    ZoneTransferRequestId string
    The ID of the zone transfer request.
    DisableStatusCheck bool
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    Region string
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    ValueSpecs Dictionary<string, string>
    Map of additional options. Changing this creates a new transfer accept.
    Key string
    The transfer key.
    ZoneTransferRequestId string
    The ID of the zone transfer request.
    DisableStatusCheck bool
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    Region string
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    ValueSpecs map[string]string
    Map of additional options. Changing this creates a new transfer accept.
    key String
    The transfer key.
    zoneTransferRequestId String
    The ID of the zone transfer request.
    disableStatusCheck Boolean
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    region String
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    valueSpecs Map<String,String>
    Map of additional options. Changing this creates a new transfer accept.
    key string
    The transfer key.
    zoneTransferRequestId string
    The ID of the zone transfer request.
    disableStatusCheck boolean
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    region string
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    valueSpecs {[key: string]: string}
    Map of additional options. Changing this creates a new transfer accept.
    key str
    The transfer key.
    zone_transfer_request_id str
    The ID of the zone transfer request.
    disable_status_check bool
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    region str
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    value_specs Mapping[str, str]
    Map of additional options. Changing this creates a new transfer accept.
    key String
    The transfer key.
    zoneTransferRequestId String
    The ID of the zone transfer request.
    disableStatusCheck Boolean
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    region String
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    valueSpecs Map<String>
    Map of additional options. Changing this creates a new transfer accept.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TransferAccept 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 TransferAccept Resource

    Get an existing TransferAccept 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?: TransferAcceptState, opts?: CustomResourceOptions): TransferAccept
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disable_status_check: Optional[bool] = None,
            key: Optional[str] = None,
            region: Optional[str] = None,
            value_specs: Optional[Mapping[str, str]] = None,
            zone_transfer_request_id: Optional[str] = None) -> TransferAccept
    func GetTransferAccept(ctx *Context, name string, id IDInput, state *TransferAcceptState, opts ...ResourceOption) (*TransferAccept, error)
    public static TransferAccept Get(string name, Input<string> id, TransferAcceptState? state, CustomResourceOptions? opts = null)
    public static TransferAccept get(String name, Output<String> id, TransferAcceptState 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.
    The following state arguments are supported:
    DisableStatusCheck bool
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    Key string
    The transfer key.
    Region string
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    ValueSpecs Dictionary<string, string>
    Map of additional options. Changing this creates a new transfer accept.
    ZoneTransferRequestId string
    The ID of the zone transfer request.
    DisableStatusCheck bool
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    Key string
    The transfer key.
    Region string
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    ValueSpecs map[string]string
    Map of additional options. Changing this creates a new transfer accept.
    ZoneTransferRequestId string
    The ID of the zone transfer request.
    disableStatusCheck Boolean
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    key String
    The transfer key.
    region String
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    valueSpecs Map<String,String>
    Map of additional options. Changing this creates a new transfer accept.
    zoneTransferRequestId String
    The ID of the zone transfer request.
    disableStatusCheck boolean
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    key string
    The transfer key.
    region string
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    valueSpecs {[key: string]: string}
    Map of additional options. Changing this creates a new transfer accept.
    zoneTransferRequestId string
    The ID of the zone transfer request.
    disable_status_check bool
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    key str
    The transfer key.
    region str
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    value_specs Mapping[str, str]
    Map of additional options. Changing this creates a new transfer accept.
    zone_transfer_request_id str
    The ID of the zone transfer request.
    disableStatusCheck Boolean
    Disable wait for zone to reach ACTIVE status. The check is enabled by default. If this argument is true, zone will be considered as created/updated if OpenStack accept returned success.
    key String
    The transfer key.
    region String
    The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone.
    valueSpecs Map<String>
    Map of additional options. Changing this creates a new transfer accept.
    zoneTransferRequestId String
    The ID of the zone transfer request.

    Import

    This resource can be imported by specifying the transferAccept ID:

    $ pulumi import openstack:dns/transferAccept:TransferAccept accept_1 accept_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi