1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. RecoveryMod
  5. getRecoveryServiceSubnets
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.RecoveryMod.getRecoveryServiceSubnets

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides the list of Recovery Service Subnets in Oracle Cloud Infrastructure Recovery service.

    Returns a list of Recovery Service Subnets.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRecoveryServiceSubnets = oci.RecoveryMod.getRecoveryServiceSubnets({
        compartmentId: _var.compartment_id,
        displayName: _var.recovery_service_subnet_display_name,
        id: _var.recovery_service_subnet_id,
        state: _var.recovery_service_subnet_state,
        vcnId: oci_core_vcn.test_vcn.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_recovery_service_subnets = oci.RecoveryMod.get_recovery_service_subnets(compartment_id=var["compartment_id"],
        display_name=var["recovery_service_subnet_display_name"],
        id=var["recovery_service_subnet_id"],
        state=var["recovery_service_subnet_state"],
        vcn_id=oci_core_vcn["test_vcn"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/RecoveryMod"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := RecoveryMod.GetRecoveryServiceSubnets(ctx, &recoverymod.GetRecoveryServiceSubnetsArgs{
    			CompartmentId: _var.Compartment_id,
    			DisplayName:   pulumi.StringRef(_var.Recovery_service_subnet_display_name),
    			Id:            pulumi.StringRef(_var.Recovery_service_subnet_id),
    			State:         pulumi.StringRef(_var.Recovery_service_subnet_state),
    			VcnId:         pulumi.StringRef(oci_core_vcn.Test_vcn.Id),
    		}, 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 testRecoveryServiceSubnets = Oci.RecoveryMod.GetRecoveryServiceSubnets.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            DisplayName = @var.Recovery_service_subnet_display_name,
            Id = @var.Recovery_service_subnet_id,
            State = @var.Recovery_service_subnet_state,
            VcnId = oci_core_vcn.Test_vcn.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.RecoveryMod.RecoveryModFunctions;
    import com.pulumi.oci.RecoveryMod.inputs.GetRecoveryServiceSubnetsArgs;
    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 testRecoveryServiceSubnets = RecoveryModFunctions.getRecoveryServiceSubnets(GetRecoveryServiceSubnetsArgs.builder()
                .compartmentId(var_.compartment_id())
                .displayName(var_.recovery_service_subnet_display_name())
                .id(var_.recovery_service_subnet_id())
                .state(var_.recovery_service_subnet_state())
                .vcnId(oci_core_vcn.test_vcn().id())
                .build());
    
        }
    }
    
    variables:
      testRecoveryServiceSubnets:
        fn::invoke:
          Function: oci:RecoveryMod:getRecoveryServiceSubnets
          Arguments:
            compartmentId: ${var.compartment_id}
            displayName: ${var.recovery_service_subnet_display_name}
            id: ${var.recovery_service_subnet_id}
            state: ${var.recovery_service_subnet_state}
            vcnId: ${oci_core_vcn.test_vcn.id}
    

    Using getRecoveryServiceSubnets

    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 getRecoveryServiceSubnets(args: GetRecoveryServiceSubnetsArgs, opts?: InvokeOptions): Promise<GetRecoveryServiceSubnetsResult>
    function getRecoveryServiceSubnetsOutput(args: GetRecoveryServiceSubnetsOutputArgs, opts?: InvokeOptions): Output<GetRecoveryServiceSubnetsResult>
    def get_recovery_service_subnets(compartment_id: Optional[str] = None,
                                     display_name: Optional[str] = None,
                                     filters: Optional[Sequence[_recoverymod.GetRecoveryServiceSubnetsFilter]] = None,
                                     id: Optional[str] = None,
                                     state: Optional[str] = None,
                                     vcn_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetRecoveryServiceSubnetsResult
    def get_recovery_service_subnets_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                     display_name: Optional[pulumi.Input[str]] = None,
                                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_recoverymod.GetRecoveryServiceSubnetsFilterArgs]]]] = None,
                                     id: Optional[pulumi.Input[str]] = None,
                                     state: Optional[pulumi.Input[str]] = None,
                                     vcn_id: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetRecoveryServiceSubnetsResult]
    func GetRecoveryServiceSubnets(ctx *Context, args *GetRecoveryServiceSubnetsArgs, opts ...InvokeOption) (*GetRecoveryServiceSubnetsResult, error)
    func GetRecoveryServiceSubnetsOutput(ctx *Context, args *GetRecoveryServiceSubnetsOutputArgs, opts ...InvokeOption) GetRecoveryServiceSubnetsResultOutput

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

    public static class GetRecoveryServiceSubnets 
    {
        public static Task<GetRecoveryServiceSubnetsResult> InvokeAsync(GetRecoveryServiceSubnetsArgs args, InvokeOptions? opts = null)
        public static Output<GetRecoveryServiceSubnetsResult> Invoke(GetRecoveryServiceSubnetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRecoveryServiceSubnetsResult> getRecoveryServiceSubnets(GetRecoveryServiceSubnetsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:RecoveryMod/getRecoveryServiceSubnets:getRecoveryServiceSubnets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The compartment OCID.
    DisplayName string
    A filter to return only resources that match the entire 'displayname' given.
    Filters List<GetRecoveryServiceSubnetsFilter>
    Id string
    The recovery service subnet OCID.
    State string
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    VcnId string
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    CompartmentId string
    The compartment OCID.
    DisplayName string
    A filter to return only resources that match the entire 'displayname' given.
    Filters []GetRecoveryServiceSubnetsFilter
    Id string
    The recovery service subnet OCID.
    State string
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    VcnId string
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    compartmentId String
    The compartment OCID.
    displayName String
    A filter to return only resources that match the entire 'displayname' given.
    filters List<GetRecoveryServiceSubnetsFilter>
    id String
    The recovery service subnet OCID.
    state String
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    vcnId String
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    compartmentId string
    The compartment OCID.
    displayName string
    A filter to return only resources that match the entire 'displayname' given.
    filters GetRecoveryServiceSubnetsFilter[]
    id string
    The recovery service subnet OCID.
    state string
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    vcnId string
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    compartment_id str
    The compartment OCID.
    display_name str
    A filter to return only resources that match the entire 'displayname' given.
    filters Sequence[recoverymod.GetRecoveryServiceSubnetsFilter]
    id str
    The recovery service subnet OCID.
    state str
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    vcn_id str
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    compartmentId String
    The compartment OCID.
    displayName String
    A filter to return only resources that match the entire 'displayname' given.
    filters List<Property Map>
    id String
    The recovery service subnet OCID.
    state String
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    vcnId String
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.

    getRecoveryServiceSubnets Result

    The following output properties are available:

    CompartmentId string
    The compartment OCID.
    RecoveryServiceSubnetCollections List<GetRecoveryServiceSubnetsRecoveryServiceSubnetCollection>
    The list of recovery_service_subnet_collection.
    DisplayName string
    A user-provided name for the recovery service subnet.
    Filters List<GetRecoveryServiceSubnetsFilter>
    Id string
    The recovery service subnet OCID.
    State string
    The current state of the recovery service subnet. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    VcnId string
    VCN Identifier.
    CompartmentId string
    The compartment OCID.
    RecoveryServiceSubnetCollections []GetRecoveryServiceSubnetsRecoveryServiceSubnetCollection
    The list of recovery_service_subnet_collection.
    DisplayName string
    A user-provided name for the recovery service subnet.
    Filters []GetRecoveryServiceSubnetsFilter
    Id string
    The recovery service subnet OCID.
    State string
    The current state of the recovery service subnet. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    VcnId string
    VCN Identifier.
    compartmentId String
    The compartment OCID.
    recoveryServiceSubnetCollections List<GetRecoveryServiceSubnetsRecoveryServiceSubnetCollection>
    The list of recovery_service_subnet_collection.
    displayName String
    A user-provided name for the recovery service subnet.
    filters List<GetRecoveryServiceSubnetsFilter>
    id String
    The recovery service subnet OCID.
    state String
    The current state of the recovery service subnet. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    vcnId String
    VCN Identifier.
    compartmentId string
    The compartment OCID.
    recoveryServiceSubnetCollections GetRecoveryServiceSubnetsRecoveryServiceSubnetCollection[]
    The list of recovery_service_subnet_collection.
    displayName string
    A user-provided name for the recovery service subnet.
    filters GetRecoveryServiceSubnetsFilter[]
    id string
    The recovery service subnet OCID.
    state string
    The current state of the recovery service subnet. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    vcnId string
    VCN Identifier.
    compartment_id str
    The compartment OCID.
    recovery_service_subnet_collections Sequence[recoverymod.GetRecoveryServiceSubnetsRecoveryServiceSubnetCollection]
    The list of recovery_service_subnet_collection.
    display_name str
    A user-provided name for the recovery service subnet.
    filters Sequence[recoverymod.GetRecoveryServiceSubnetsFilter]
    id str
    The recovery service subnet OCID.
    state str
    The current state of the recovery service subnet. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    vcn_id str
    VCN Identifier.
    compartmentId String
    The compartment OCID.
    recoveryServiceSubnetCollections List<Property Map>
    The list of recovery_service_subnet_collection.
    displayName String
    A user-provided name for the recovery service subnet.
    filters List<Property Map>
    id String
    The recovery service subnet OCID.
    state String
    The current state of the recovery service subnet. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    vcnId String
    VCN Identifier.

    Supporting Types

    GetRecoveryServiceSubnetsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetRecoveryServiceSubnetsRecoveryServiceSubnetCollection

    GetRecoveryServiceSubnetsRecoveryServiceSubnetCollectionItem

    CompartmentId string
    The compartment OCID.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}. For more information, see Resource Tags
    DisplayName string
    A filter to return only resources that match the entire 'displayname' given.
    FreeformTags Dictionary<string, object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The recovery service subnet OCID.
    LifecycleDetails string
    Detailed description about the current lifecycle state of the recovery service subnet. For example, it can be used to provide actionable information for a resource in a Failed state
    State string
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    SubnetId string
    The OCID of the subnet used as the recovery service subnet.
    SystemTags Dictionary<string, object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}. For more information, see Resource Tags
    TimeCreated string
    An RFC3339 formatted datetime string that indicates the last created time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    TimeUpdated string
    An RFC3339 formatted datetime string that indicates the last updated time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    VcnId string
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    CompartmentId string
    The compartment OCID.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}. For more information, see Resource Tags
    DisplayName string
    A filter to return only resources that match the entire 'displayname' given.
    FreeformTags map[string]interface{}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The recovery service subnet OCID.
    LifecycleDetails string
    Detailed description about the current lifecycle state of the recovery service subnet. For example, it can be used to provide actionable information for a resource in a Failed state
    State string
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    SubnetId string
    The OCID of the subnet used as the recovery service subnet.
    SystemTags map[string]interface{}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}. For more information, see Resource Tags
    TimeCreated string
    An RFC3339 formatted datetime string that indicates the last created time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    TimeUpdated string
    An RFC3339 formatted datetime string that indicates the last updated time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    VcnId string
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    compartmentId String
    The compartment OCID.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}. For more information, see Resource Tags
    displayName String
    A filter to return only resources that match the entire 'displayname' given.
    freeformTags Map<String,Object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The recovery service subnet OCID.
    lifecycleDetails String
    Detailed description about the current lifecycle state of the recovery service subnet. For example, it can be used to provide actionable information for a resource in a Failed state
    state String
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    subnetId String
    The OCID of the subnet used as the recovery service subnet.
    systemTags Map<String,Object>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}. For more information, see Resource Tags
    timeCreated String
    An RFC3339 formatted datetime string that indicates the last created time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated String
    An RFC3339 formatted datetime string that indicates the last updated time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    vcnId String
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    compartmentId string
    The compartment OCID.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}. For more information, see Resource Tags
    displayName string
    A filter to return only resources that match the entire 'displayname' given.
    freeformTags {[key: string]: any}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    The recovery service subnet OCID.
    lifecycleDetails string
    Detailed description about the current lifecycle state of the recovery service subnet. For example, it can be used to provide actionable information for a resource in a Failed state
    state string
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    subnetId string
    The OCID of the subnet used as the recovery service subnet.
    systemTags {[key: string]: any}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}. For more information, see Resource Tags
    timeCreated string
    An RFC3339 formatted datetime string that indicates the last created time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated string
    An RFC3339 formatted datetime string that indicates the last updated time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    vcnId string
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    compartment_id str
    The compartment OCID.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}. For more information, see Resource Tags
    display_name str
    A filter to return only resources that match the entire 'displayname' given.
    freeform_tags Mapping[str, Any]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    The recovery service subnet OCID.
    lifecycle_details str
    Detailed description about the current lifecycle state of the recovery service subnet. For example, it can be used to provide actionable information for a resource in a Failed state
    state str
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    subnet_id str
    The OCID of the subnet used as the recovery service subnet.
    system_tags Mapping[str, Any]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}. For more information, see Resource Tags
    time_created str
    An RFC3339 formatted datetime string that indicates the last created time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    time_updated str
    An RFC3339 formatted datetime string that indicates the last updated time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    vcn_id str
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.
    compartmentId String
    The compartment OCID.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}. For more information, see Resource Tags
    displayName String
    A filter to return only resources that match the entire 'displayname' given.
    freeformTags Map<Any>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The recovery service subnet OCID.
    lifecycleDetails String
    Detailed description about the current lifecycle state of the recovery service subnet. For example, it can be used to provide actionable information for a resource in a Failed state
    state String
    A filter to return only the resources that match the specified lifecycle state. Allowed values are:

    • CREATING
    • UPDATING
    • ACTIVE
    • DELETING
    • DELETED
    • FAILED
    subnetId String
    The OCID of the subnet used as the recovery service subnet.
    systemTags Map<Any>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}. For more information, see Resource Tags
    timeCreated String
    An RFC3339 formatted datetime string that indicates the last created time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    timeUpdated String
    An RFC3339 formatted datetime string that indicates the last updated time for a recovery service subnet. For example: '2020-05-22T21:10:29.600Z'.
    vcnId String
    The OCID of the virtual cloud network (VCN) associated with the recovery service subnet.

    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.32.0 published on Thursday, Apr 18, 2024 by Pulumi