1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. getAvailabilityDomains
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Identity.getAvailabilityDomains

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the list of Availability Domains in Oracle Cloud Infrastructure Identity service.

    Lists the availability domains in your tenancy. Specify the OCID of either the tenancy or another of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). See Where to Get the Tenancy’s OCID and User’s OCID. Note that the order of the results returned can change if availability domains are added or removed; therefore, do not create a dependency on the list order.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAvailabilityDomains = oci.Identity.getAvailabilityDomains({
        compartmentId: tenancyOcid,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_availability_domains = oci.Identity.get_availability_domains(compartment_id=tenancy_ocid)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Identity.GetAvailabilityDomains(ctx, &identity.GetAvailabilityDomainsArgs{
    			CompartmentId: tenancyOcid,
    		}, 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 testAvailabilityDomains = Oci.Identity.GetAvailabilityDomains.Invoke(new()
        {
            CompartmentId = tenancyOcid,
        });
    
    });
    
    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.GetAvailabilityDomainsArgs;
    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 testAvailabilityDomains = IdentityFunctions.getAvailabilityDomains(GetAvailabilityDomainsArgs.builder()
                .compartmentId(tenancyOcid)
                .build());
    
        }
    }
    
    variables:
      testAvailabilityDomains:
        fn::invoke:
          Function: oci:Identity:getAvailabilityDomains
          Arguments:
            compartmentId: ${tenancyOcid}
    

    Using getAvailabilityDomains

    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 getAvailabilityDomains(args: GetAvailabilityDomainsArgs, opts?: InvokeOptions): Promise<GetAvailabilityDomainsResult>
    function getAvailabilityDomainsOutput(args: GetAvailabilityDomainsOutputArgs, opts?: InvokeOptions): Output<GetAvailabilityDomainsResult>
    def get_availability_domains(compartment_id: Optional[str] = None,
                                 filters: Optional[Sequence[_identity.GetAvailabilityDomainsFilter]] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetAvailabilityDomainsResult
    def get_availability_domains_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                 filters: Optional[pulumi.Input[Sequence[pulumi.Input[_identity.GetAvailabilityDomainsFilterArgs]]]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetAvailabilityDomainsResult]
    func GetAvailabilityDomains(ctx *Context, args *GetAvailabilityDomainsArgs, opts ...InvokeOption) (*GetAvailabilityDomainsResult, error)
    func GetAvailabilityDomainsOutput(ctx *Context, args *GetAvailabilityDomainsOutputArgs, opts ...InvokeOption) GetAvailabilityDomainsResultOutput

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

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

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    Filters List<GetAvailabilityDomainsFilter>
    CompartmentId string
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    Filters []GetAvailabilityDomainsFilter
    compartmentId String
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    filters List<GetAvailabilityDomainsFilter>
    compartmentId string
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    filters GetAvailabilityDomainsFilter[]
    compartment_id str
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    filters Sequence[identity.GetAvailabilityDomainsFilter]
    compartmentId String
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    filters List<Property Map>

    getAvailabilityDomains Result

    The following output properties are available:

    AvailabilityDomains List<GetAvailabilityDomainsAvailabilityDomain>
    The list of availability_domains.
    CompartmentId string
    The OCID of the tenancy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters List<GetAvailabilityDomainsFilter>
    AvailabilityDomains []GetAvailabilityDomainsAvailabilityDomain
    The list of availability_domains.
    CompartmentId string
    The OCID of the tenancy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters []GetAvailabilityDomainsFilter
    availabilityDomains List<GetAvailabilityDomainsAvailabilityDomain>
    The list of availability_domains.
    compartmentId String
    The OCID of the tenancy.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<GetAvailabilityDomainsFilter>
    availabilityDomains GetAvailabilityDomainsAvailabilityDomain[]
    The list of availability_domains.
    compartmentId string
    The OCID of the tenancy.
    id string
    The provider-assigned unique ID for this managed resource.
    filters GetAvailabilityDomainsFilter[]
    availability_domains Sequence[identity.GetAvailabilityDomainsAvailabilityDomain]
    The list of availability_domains.
    compartment_id str
    The OCID of the tenancy.
    id str
    The provider-assigned unique ID for this managed resource.
    filters Sequence[identity.GetAvailabilityDomainsFilter]
    availabilityDomains List<Property Map>
    The list of availability_domains.
    compartmentId String
    The OCID of the tenancy.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<Property Map>

    Supporting Types

    GetAvailabilityDomainsAvailabilityDomain

    CompartmentId string
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    Id string
    The OCID of the Availability Domain.
    Name string
    The name of the Availability Domain.
    CompartmentId string
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    Id string
    The OCID of the Availability Domain.
    Name string
    The name of the Availability Domain.
    compartmentId String
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    id String
    The OCID of the Availability Domain.
    name String
    The name of the Availability Domain.
    compartmentId string
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    id string
    The OCID of the Availability Domain.
    name string
    The name of the Availability Domain.
    compartment_id str
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    id str
    The OCID of the Availability Domain.
    name str
    The name of the Availability Domain.
    compartmentId String
    The OCID of the compartment (remember that the tenancy is simply the root compartment).
    id String
    The OCID of the Availability Domain.
    name String
    The name of the Availability Domain.

    GetAvailabilityDomainsFilter

    Name string
    The name of the Availability Domain.
    Values List<string>
    Regex bool
    Name string
    The name of the Availability Domain.
    Values []string
    Regex bool
    name String
    The name of the Availability Domain.
    values List<String>
    regex Boolean
    name string
    The name of the Availability Domain.
    values string[]
    regex boolean
    name str
    The name of the Availability Domain.
    values Sequence[str]
    regex bool
    name String
    The name of the Availability Domain.
    values List<String>
    regex Boolean

    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 v2.17.0 published on Friday, Nov 15, 2024 by Pulumi