oci.Identity.getAvailabilityDomains
Explore with Pulumi AI
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:
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Filters
List<Get
Availability Domains Filter>
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Filters
[]Get
Availability Domains Filter
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
List<Get
Availability Domains Filter>
- compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
Get
Availability Domains Filter[]
- compartment_
id str - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
Sequence[identity.
Get Availability Domains Filter]
- compartment
Id 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:
- Availability
Domains List<GetAvailability Domains Availability Domain> - The list of availability_domains.
- Compartment
Id string - The OCID of the tenancy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<Get
Availability Domains Filter>
- Availability
Domains []GetAvailability Domains Availability Domain - The list of availability_domains.
- Compartment
Id string - The OCID of the tenancy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Availability Domains Filter
- availability
Domains List<GetAvailability Domains Availability Domain> - The list of availability_domains.
- compartment
Id String - The OCID of the tenancy.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<Get
Availability Domains Filter>
- availability
Domains GetAvailability Domains Availability Domain[] - The list of availability_domains.
- compartment
Id string - The OCID of the tenancy.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
Get
Availability Domains Filter[]
- availability_
domains Sequence[identity.Get Availability Domains Availability Domain] - 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.
Get Availability Domains Filter]
- availability
Domains List<Property Map> - The list of availability_domains.
- compartment
Id String - The OCID of the tenancy.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
Supporting Types
GetAvailabilityDomainsAvailabilityDomain
- Compartment
Id 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 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 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 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.
- compartment
Id 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
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.