1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. getFaultDomains
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Identity.getFaultDomains

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

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

    Lists the Fault 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.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testFaultDomains = oci.Identity.getFaultDomains({
        availabilityDomain: faultDomainAvailabilityDomain,
        compartmentId: compartmentId,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_fault_domains = oci.Identity.get_fault_domains(availability_domain=fault_domain_availability_domain,
        compartment_id=compartment_id)
    
    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.GetFaultDomains(ctx, &identity.GetFaultDomainsArgs{
    			AvailabilityDomain: faultDomainAvailabilityDomain,
    			CompartmentId:      compartmentId,
    		}, 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 testFaultDomains = Oci.Identity.GetFaultDomains.Invoke(new()
        {
            AvailabilityDomain = faultDomainAvailabilityDomain,
            CompartmentId = compartmentId,
        });
    
    });
    
    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.GetFaultDomainsArgs;
    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 testFaultDomains = IdentityFunctions.getFaultDomains(GetFaultDomainsArgs.builder()
                .availabilityDomain(faultDomainAvailabilityDomain)
                .compartmentId(compartmentId)
                .build());
    
        }
    }
    
    variables:
      testFaultDomains:
        fn::invoke:
          Function: oci:Identity:getFaultDomains
          Arguments:
            availabilityDomain: ${faultDomainAvailabilityDomain}
            compartmentId: ${compartmentId}
    

    Using getFaultDomains

    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 getFaultDomains(args: GetFaultDomainsArgs, opts?: InvokeOptions): Promise<GetFaultDomainsResult>
    function getFaultDomainsOutput(args: GetFaultDomainsOutputArgs, opts?: InvokeOptions): Output<GetFaultDomainsResult>
    def get_fault_domains(availability_domain: Optional[str] = None,
                          compartment_id: Optional[str] = None,
                          filters: Optional[Sequence[_identity.GetFaultDomainsFilter]] = None,
                          opts: Optional[InvokeOptions] = None) -> GetFaultDomainsResult
    def get_fault_domains_output(availability_domain: Optional[pulumi.Input[str]] = None,
                          compartment_id: Optional[pulumi.Input[str]] = None,
                          filters: Optional[pulumi.Input[Sequence[pulumi.Input[_identity.GetFaultDomainsFilterArgs]]]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetFaultDomainsResult]
    func GetFaultDomains(ctx *Context, args *GetFaultDomainsArgs, opts ...InvokeOption) (*GetFaultDomainsResult, error)
    func GetFaultDomainsOutput(ctx *Context, args *GetFaultDomainsOutputArgs, opts ...InvokeOption) GetFaultDomainsResultOutput

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

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

    The following arguments are supported:

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

    getFaultDomains Result

    The following output properties are available:

    AvailabilityDomain string
    The name of the availabilityDomain where the Fault Domain belongs.
    CompartmentId string
    The OCID of the compartment. Currently only tenancy (root) compartment can be provided.
    FaultDomains List<GetFaultDomainsFaultDomain>
    The list of fault_domains.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters List<GetFaultDomainsFilter>
    AvailabilityDomain string
    The name of the availabilityDomain where the Fault Domain belongs.
    CompartmentId string
    The OCID of the compartment. Currently only tenancy (root) compartment can be provided.
    FaultDomains []GetFaultDomainsFaultDomain
    The list of fault_domains.
    Id string
    The provider-assigned unique ID for this managed resource.
    Filters []GetFaultDomainsFilter
    availabilityDomain String
    The name of the availabilityDomain where the Fault Domain belongs.
    compartmentId String
    The OCID of the compartment. Currently only tenancy (root) compartment can be provided.
    faultDomains List<GetFaultDomainsFaultDomain>
    The list of fault_domains.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<GetFaultDomainsFilter>
    availabilityDomain string
    The name of the availabilityDomain where the Fault Domain belongs.
    compartmentId string
    The OCID of the compartment. Currently only tenancy (root) compartment can be provided.
    faultDomains GetFaultDomainsFaultDomain[]
    The list of fault_domains.
    id string
    The provider-assigned unique ID for this managed resource.
    filters GetFaultDomainsFilter[]
    availability_domain str
    The name of the availabilityDomain where the Fault Domain belongs.
    compartment_id str
    The OCID of the compartment. Currently only tenancy (root) compartment can be provided.
    fault_domains Sequence[identity.GetFaultDomainsFaultDomain]
    The list of fault_domains.
    id str
    The provider-assigned unique ID for this managed resource.
    filters Sequence[identity.GetFaultDomainsFilter]
    availabilityDomain String
    The name of the availabilityDomain where the Fault Domain belongs.
    compartmentId String
    The OCID of the compartment. Currently only tenancy (root) compartment can be provided.
    faultDomains List<Property Map>
    The list of fault_domains.
    id String
    The provider-assigned unique ID for this managed resource.
    filters List<Property Map>

    Supporting Types

    GetFaultDomainsFaultDomain

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

    GetFaultDomainsFilter

    Name string
    The name of the Fault Domain.
    Values List<string>
    Regex bool
    Name string
    The name of the Fault Domain.
    Values []string
    Regex bool
    name String
    The name of the Fault Domain.
    values List<String>
    regex Boolean
    name string
    The name of the Fault Domain.
    values string[]
    regex boolean
    name str
    The name of the Fault Domain.
    values Sequence[str]
    regex bool
    name String
    The name of the Fault 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.11.0 published on Thursday, Sep 19, 2024 by Pulumi