1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. getAvailabilityDomain
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

oci.Identity.getAvailabilityDomain

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    This data source provides the details of a single Availability Domain in Oracle Cloud Infrastructure Identity service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testCompartment = oci.Identity.getAvailabilityDomain({
        compartmentId: tenancyOcid,
        id: id,
        adNumber: adNumber,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_compartment = oci.Identity.get_availability_domain(compartment_id=tenancy_ocid,
        id=id,
        ad_number=ad_number)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Identity.GetAvailabilityDomain(ctx, &identity.GetAvailabilityDomainArgs{
    			CompartmentId: tenancyOcid,
    			Id:            pulumi.StringRef(id),
    			AdNumber:      pulumi.IntRef(adNumber),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testCompartment = Oci.Identity.GetAvailabilityDomain.Invoke(new()
        {
            CompartmentId = tenancyOcid,
            Id = id,
            AdNumber = adNumber,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Identity.IdentityFunctions;
    import com.pulumi.oci.Identity.inputs.GetAvailabilityDomainArgs;
    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) {
            final var testCompartment = IdentityFunctions.getAvailabilityDomain(GetAvailabilityDomainArgs.builder()
                .compartmentId(tenancyOcid)
                .id(id)
                .adNumber(adNumber)
                .build());
    
        }
    }
    
    variables:
      testCompartment:
        fn::invoke:
          Function: oci:Identity:getAvailabilityDomain
          Arguments:
            compartmentId: ${tenancyOcid}
            id: ${id}
            adNumber: ${adNumber}
    

    Using getAvailabilityDomain

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAvailabilityDomain(args: GetAvailabilityDomainArgs, opts?: InvokeOptions): Promise<GetAvailabilityDomainResult>
    function getAvailabilityDomainOutput(args: GetAvailabilityDomainOutputArgs, opts?: InvokeOptions): Output<GetAvailabilityDomainResult>
    def get_availability_domain(ad_number: Optional[int] = None,
                                compartment_id: Optional[str] = None,
                                id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetAvailabilityDomainResult
    def get_availability_domain_output(ad_number: Optional[pulumi.Input[int]] = None,
                                compartment_id: Optional[pulumi.Input[str]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetAvailabilityDomainResult]
    func GetAvailabilityDomain(ctx *Context, args *GetAvailabilityDomainArgs, opts ...InvokeOption) (*GetAvailabilityDomainResult, error)
    func GetAvailabilityDomainOutput(ctx *Context, args *GetAvailabilityDomainOutputArgs, opts ...InvokeOption) GetAvailabilityDomainResultOutput

    > Note: This function is named GetAvailabilityDomain in the Go SDK.

    public static class GetAvailabilityDomain 
    {
        public static Task<GetAvailabilityDomainResult> InvokeAsync(GetAvailabilityDomainArgs args, InvokeOptions? opts = null)
        public static Output<GetAvailabilityDomainResult> Invoke(GetAvailabilityDomainInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAvailabilityDomainResult> getAvailabilityDomain(GetAvailabilityDomainArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Identity/getAvailabilityDomain:getAvailabilityDomain
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the tenancy.
    AdNumber int
    The number of the Availability Domain. Required if id is not specified. This number corresponds to the integer in the Availability Domain name.
    Id string
    The OCID of the Availability Domain. Required if ad_number is not specified.
    CompartmentId string
    The OCID of the tenancy.
    AdNumber int
    The number of the Availability Domain. Required if id is not specified. This number corresponds to the integer in the Availability Domain name.
    Id string
    The OCID of the Availability Domain. Required if ad_number is not specified.
    compartmentId String
    The OCID of the tenancy.
    adNumber Integer
    The number of the Availability Domain. Required if id is not specified. This number corresponds to the integer in the Availability Domain name.
    id String
    The OCID of the Availability Domain. Required if ad_number is not specified.
    compartmentId string
    The OCID of the tenancy.
    adNumber number
    The number of the Availability Domain. Required if id is not specified. This number corresponds to the integer in the Availability Domain name.
    id string
    The OCID of the Availability Domain. Required if ad_number is not specified.
    compartment_id str
    The OCID of the tenancy.
    ad_number int
    The number of the Availability Domain. Required if id is not specified. This number corresponds to the integer in the Availability Domain name.
    id str
    The OCID of the Availability Domain. Required if ad_number is not specified.
    compartmentId String
    The OCID of the tenancy.
    adNumber Number
    The number of the Availability Domain. Required if id is not specified. This number corresponds to the integer in the Availability Domain name.
    id String
    The OCID of the Availability Domain. Required if ad_number is not specified.

    getAvailabilityDomain Result

    The following output properties are available:

    AdNumber int
    The number of the Availability Domain. For example, the ad_number for YXol:US-ASHBURN-AD-1 would be "1"
    CompartmentId string
    The OCID of the tenancy.
    Id string
    The OCID of the Availability Domain.
    Name string
    The name of the Availability Domain.
    AdNumber int
    The number of the Availability Domain. For example, the ad_number for YXol:US-ASHBURN-AD-1 would be "1"
    CompartmentId string
    The OCID of the tenancy.
    Id string
    The OCID of the Availability Domain.
    Name string
    The name of the Availability Domain.
    adNumber Integer
    The number of the Availability Domain. For example, the ad_number for YXol:US-ASHBURN-AD-1 would be "1"
    compartmentId String
    The OCID of the tenancy.
    id String
    The OCID of the Availability Domain.
    name String
    The name of the Availability Domain.
    adNumber number
    The number of the Availability Domain. For example, the ad_number for YXol:US-ASHBURN-AD-1 would be "1"
    compartmentId string
    The OCID of the tenancy.
    id string
    The OCID of the Availability Domain.
    name string
    The name of the Availability Domain.
    ad_number int
    The number of the Availability Domain. For example, the ad_number for YXol:US-ASHBURN-AD-1 would be "1"
    compartment_id str
    The OCID of the tenancy.
    id str
    The OCID of the Availability Domain.
    name str
    The name of the Availability Domain.
    adNumber Number
    The number of the Availability Domain. For example, the ad_number for YXol:US-ASHBURN-AD-1 would be "1"
    compartmentId String
    The OCID of the tenancy.
    id String
    The OCID of the Availability Domain.
    name String
    The name of the Availability Domain.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi