1. Packages
  2. AWS
  3. API Docs
  4. directoryservice
  5. ServiceRegion
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi
aws logo
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi

    Manages a replicated Region and directory for Multi-Region replication. Multi-Region replication is only supported for the Enterprise Edition of AWS Managed Microsoft AD.

    Create ServiceRegion Resource

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

    Constructor syntax

    new ServiceRegion(name: string, args: ServiceRegionArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceRegion(resource_name: str,
                      args: ServiceRegionArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceRegion(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      directory_id: Optional[str] = None,
                      region_name: Optional[str] = None,
                      vpc_settings: Optional[ServiceRegionVpcSettingsArgs] = None,
                      desired_number_of_domain_controllers: Optional[int] = None,
                      tags: Optional[Mapping[str, str]] = None)
    func NewServiceRegion(ctx *Context, name string, args ServiceRegionArgs, opts ...ResourceOption) (*ServiceRegion, error)
    public ServiceRegion(string name, ServiceRegionArgs args, CustomResourceOptions? opts = null)
    public ServiceRegion(String name, ServiceRegionArgs args)
    public ServiceRegion(String name, ServiceRegionArgs args, CustomResourceOptions options)
    
    type: aws:directoryservice:ServiceRegion
    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 ServiceRegionArgs
    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 ServiceRegionArgs
    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 ServiceRegionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceRegionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceRegionArgs
    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 serviceRegionResource = new Aws.DirectoryService.ServiceRegion("serviceRegionResource", new()
    {
        DirectoryId = "string",
        RegionName = "string",
        VpcSettings = new Aws.DirectoryService.Inputs.ServiceRegionVpcSettingsArgs
        {
            SubnetIds = new[]
            {
                "string",
            },
            VpcId = "string",
        },
        DesiredNumberOfDomainControllers = 0,
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := directoryservice.NewServiceRegion(ctx, "serviceRegionResource", &directoryservice.ServiceRegionArgs{
    	DirectoryId: pulumi.String("string"),
    	RegionName:  pulumi.String("string"),
    	VpcSettings: &directoryservice.ServiceRegionVpcSettingsArgs{
    		SubnetIds: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		VpcId: pulumi.String("string"),
    	},
    	DesiredNumberOfDomainControllers: pulumi.Int(0),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var serviceRegionResource = new ServiceRegion("serviceRegionResource", ServiceRegionArgs.builder()
        .directoryId("string")
        .regionName("string")
        .vpcSettings(ServiceRegionVpcSettingsArgs.builder()
            .subnetIds("string")
            .vpcId("string")
            .build())
        .desiredNumberOfDomainControllers(0)
        .tags(Map.of("string", "string"))
        .build());
    
    service_region_resource = aws.directoryservice.ServiceRegion("serviceRegionResource",
        directory_id="string",
        region_name="string",
        vpc_settings={
            "subnet_ids": ["string"],
            "vpc_id": "string",
        },
        desired_number_of_domain_controllers=0,
        tags={
            "string": "string",
        })
    
    const serviceRegionResource = new aws.directoryservice.ServiceRegion("serviceRegionResource", {
        directoryId: "string",
        regionName: "string",
        vpcSettings: {
            subnetIds: ["string"],
            vpcId: "string",
        },
        desiredNumberOfDomainControllers: 0,
        tags: {
            string: "string",
        },
    });
    
    type: aws:directoryservice:ServiceRegion
    properties:
        desiredNumberOfDomainControllers: 0
        directoryId: string
        regionName: string
        tags:
            string: string
        vpcSettings:
            subnetIds:
                - string
            vpcId: string
    

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

    DirectoryId string
    The identifier of the directory to which you want to add Region replication.
    RegionName string
    The name of the Region where you want to add domain controllers for replication.
    VpcSettings ServiceRegionVpcSettings
    VPC information in the replicated Region. Detailed below.
    DesiredNumberOfDomainControllers int
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    Tags Dictionary<string, string>
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    DirectoryId string
    The identifier of the directory to which you want to add Region replication.
    RegionName string
    The name of the Region where you want to add domain controllers for replication.
    VpcSettings ServiceRegionVpcSettingsArgs
    VPC information in the replicated Region. Detailed below.
    DesiredNumberOfDomainControllers int
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    Tags map[string]string
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    directoryId String
    The identifier of the directory to which you want to add Region replication.
    regionName String
    The name of the Region where you want to add domain controllers for replication.
    vpcSettings ServiceRegionVpcSettings
    VPC information in the replicated Region. Detailed below.
    desiredNumberOfDomainControllers Integer
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    tags Map<String,String>
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    directoryId string
    The identifier of the directory to which you want to add Region replication.
    regionName string
    The name of the Region where you want to add domain controllers for replication.
    vpcSettings ServiceRegionVpcSettings
    VPC information in the replicated Region. Detailed below.
    desiredNumberOfDomainControllers number
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    tags {[key: string]: string}
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    directory_id str
    The identifier of the directory to which you want to add Region replication.
    region_name str
    The name of the Region where you want to add domain controllers for replication.
    vpc_settings ServiceRegionVpcSettingsArgs
    VPC information in the replicated Region. Detailed below.
    desired_number_of_domain_controllers int
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    tags Mapping[str, str]
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    directoryId String
    The identifier of the directory to which you want to add Region replication.
    regionName String
    The name of the Region where you want to add domain controllers for replication.
    vpcSettings Property Map
    VPC information in the replicated Region. Detailed below.
    desiredNumberOfDomainControllers Number
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    tags Map<String>
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Look up Existing ServiceRegion Resource

    Get an existing ServiceRegion 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?: ServiceRegionState, opts?: CustomResourceOptions): ServiceRegion
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            desired_number_of_domain_controllers: Optional[int] = None,
            directory_id: Optional[str] = None,
            region_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            vpc_settings: Optional[ServiceRegionVpcSettingsArgs] = None) -> ServiceRegion
    func GetServiceRegion(ctx *Context, name string, id IDInput, state *ServiceRegionState, opts ...ResourceOption) (*ServiceRegion, error)
    public static ServiceRegion Get(string name, Input<string> id, ServiceRegionState? state, CustomResourceOptions? opts = null)
    public static ServiceRegion get(String name, Output<String> id, ServiceRegionState state, CustomResourceOptions options)
    resources:  _:    type: aws:directoryservice:ServiceRegion    get:      id: ${id}
    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:
    DesiredNumberOfDomainControllers int
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    DirectoryId string
    The identifier of the directory to which you want to add Region replication.
    RegionName string
    The name of the Region where you want to add domain controllers for replication.
    Tags Dictionary<string, string>
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    VpcSettings ServiceRegionVpcSettings
    VPC information in the replicated Region. Detailed below.
    DesiredNumberOfDomainControllers int
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    DirectoryId string
    The identifier of the directory to which you want to add Region replication.
    RegionName string
    The name of the Region where you want to add domain controllers for replication.
    Tags map[string]string
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    VpcSettings ServiceRegionVpcSettingsArgs
    VPC information in the replicated Region. Detailed below.
    desiredNumberOfDomainControllers Integer
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    directoryId String
    The identifier of the directory to which you want to add Region replication.
    regionName String
    The name of the Region where you want to add domain controllers for replication.
    tags Map<String,String>
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    vpcSettings ServiceRegionVpcSettings
    VPC information in the replicated Region. Detailed below.
    desiredNumberOfDomainControllers number
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    directoryId string
    The identifier of the directory to which you want to add Region replication.
    regionName string
    The name of the Region where you want to add domain controllers for replication.
    tags {[key: string]: string}
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    vpcSettings ServiceRegionVpcSettings
    VPC information in the replicated Region. Detailed below.
    desired_number_of_domain_controllers int
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    directory_id str
    The identifier of the directory to which you want to add Region replication.
    region_name str
    The name of the Region where you want to add domain controllers for replication.
    tags Mapping[str, str]
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    vpc_settings ServiceRegionVpcSettingsArgs
    VPC information in the replicated Region. Detailed below.
    desiredNumberOfDomainControllers Number
    The number of domain controllers desired in the replicated directory. Minimum value of 2.
    directoryId String
    The identifier of the directory to which you want to add Region replication.
    regionName String
    The name of the Region where you want to add domain controllers for replication.
    tags Map<String>
    Map of tags to assign to this resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    vpcSettings Property Map
    VPC information in the replicated Region. Detailed below.

    Supporting Types

    ServiceRegionVpcSettings, ServiceRegionVpcSettingsArgs

    SubnetIds List<string>
    The identifiers of the subnets for the directory servers.
    VpcId string
    The identifier of the VPC in which to create the directory.
    SubnetIds []string
    The identifiers of the subnets for the directory servers.
    VpcId string
    The identifier of the VPC in which to create the directory.
    subnetIds List<String>
    The identifiers of the subnets for the directory servers.
    vpcId String
    The identifier of the VPC in which to create the directory.
    subnetIds string[]
    The identifiers of the subnets for the directory servers.
    vpcId string
    The identifier of the VPC in which to create the directory.
    subnet_ids Sequence[str]
    The identifiers of the subnets for the directory servers.
    vpc_id str
    The identifier of the VPC in which to create the directory.
    subnetIds List<String>
    The identifiers of the subnets for the directory servers.
    vpcId String
    The identifier of the VPC in which to create the directory.

    Import

    Replicated Regions can be imported using directory ID,Region name e.g.,

     $ pulumi import aws:directoryservice/serviceRegion:ServiceRegion example d-9267651497,us-east-2
    

    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.
    aws logo
    Viewing docs for AWS v5.43.0 (Older version)
    published on Tuesday, Mar 10, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.