Oracle Cloud Infrastructure v3.12.0 published on Friday, Nov 21, 2025 by Pulumi
Oracle Cloud Infrastructure v3.12.0 published on Friday, Nov 21, 2025 by Pulumi
This data source provides the list of Resource Anchors in Oracle Cloud Infrastructure Multicloud service.
Gets a list of ResourceAnchors.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testResourceAnchors = oci.oci.getMulticloudResourceAnchors({
subscriptionId: subscriptionId,
subscriptionServiceName: subscriptionServiceName,
compartmentId: compartmentId,
displayName: resourceAnchorDisplayName,
id: resourceAnchorId,
isCompartmentIdInSubtree: resourceAnchorIsCompartmentIdInSubtree,
linkedCompartmentId: linkedCompartmentId,
lifecycleState: resourceAnchorState,
});
import pulumi
import pulumi_oci as oci
test_resource_anchors = oci.oci.get_multicloud_resource_anchors(subscription_id=subscription_id,
subscription_service_name=subscription_service_name,
compartment_id=compartment_id,
display_name=resource_anchor_display_name,
id=resource_anchor_id,
is_compartment_id_in_subtree=resource_anchor_is_compartment_id_in_subtree,
linked_compartment_id=linked_compartment_id,
lifecycle_state=resource_anchor_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/oci"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := oci.GetMulticloudResourceAnchors(ctx, &oci.GetMulticloudResourceAnchorsArgs{
SubscriptionId: subscriptionId,
SubscriptionServiceName: subscriptionServiceName,
CompartmentId: pulumi.StringRef(compartmentId),
DisplayName: pulumi.StringRef(resourceAnchorDisplayName),
Id: pulumi.StringRef(resourceAnchorId),
IsCompartmentIdInSubtree: pulumi.BoolRef(resourceAnchorIsCompartmentIdInSubtree),
LinkedCompartmentId: pulumi.StringRef(linkedCompartmentId),
LifecycleState: pulumi.StringRef(resourceAnchorState),
}, 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 testResourceAnchors = Oci.Oci.GetMulticloudResourceAnchors.Invoke(new()
{
SubscriptionId = subscriptionId,
SubscriptionServiceName = subscriptionServiceName,
CompartmentId = compartmentId,
DisplayName = resourceAnchorDisplayName,
Id = resourceAnchorId,
IsCompartmentIdInSubtree = resourceAnchorIsCompartmentIdInSubtree,
LinkedCompartmentId = linkedCompartmentId,
LifecycleState = resourceAnchorState,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.oci.OciFunctions;
import com.pulumi.oci.oci.inputs.GetMulticloudResourceAnchorsArgs;
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 testResourceAnchors = OciFunctions.getMulticloudResourceAnchors(GetMulticloudResourceAnchorsArgs.builder()
.subscriptionId(subscriptionId)
.subscriptionServiceName(subscriptionServiceName)
.compartmentId(compartmentId)
.displayName(resourceAnchorDisplayName)
.id(resourceAnchorId)
.isCompartmentIdInSubtree(resourceAnchorIsCompartmentIdInSubtree)
.linkedCompartmentId(linkedCompartmentId)
.lifecycleState(resourceAnchorState)
.build());
}
}
variables:
testResourceAnchors:
fn::invoke:
function: oci:oci:getMulticloudResourceAnchors
arguments:
subscriptionId: ${subscriptionId}
subscriptionServiceName: ${subscriptionServiceName}
compartmentId: ${compartmentId}
displayName: ${resourceAnchorDisplayName}
id: ${resourceAnchorId}
isCompartmentIdInSubtree: ${resourceAnchorIsCompartmentIdInSubtree}
linkedCompartmentId: ${linkedCompartmentId}
lifecycleState: ${resourceAnchorState}
Using getMulticloudResourceAnchors
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 getMulticloudResourceAnchors(args: GetMulticloudResourceAnchorsArgs, opts?: InvokeOptions): Promise<GetMulticloudResourceAnchorsResult>
function getMulticloudResourceAnchorsOutput(args: GetMulticloudResourceAnchorsOutputArgs, opts?: InvokeOptions): Output<GetMulticloudResourceAnchorsResult>def get_multicloud_resource_anchors(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[GetMulticloudResourceAnchorsFilter]] = None,
id: Optional[str] = None,
is_compartment_id_in_subtree: Optional[bool] = None,
lifecycle_state: Optional[str] = None,
limit: Optional[int] = None,
linked_compartment_id: Optional[str] = None,
subscription_id: Optional[str] = None,
subscription_service_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMulticloudResourceAnchorsResult
def get_multicloud_resource_anchors_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetMulticloudResourceAnchorsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
is_compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
lifecycle_state: Optional[pulumi.Input[str]] = None,
limit: Optional[pulumi.Input[int]] = None,
linked_compartment_id: Optional[pulumi.Input[str]] = None,
subscription_id: Optional[pulumi.Input[str]] = None,
subscription_service_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMulticloudResourceAnchorsResult]func GetMulticloudResourceAnchors(ctx *Context, args *GetMulticloudResourceAnchorsArgs, opts ...InvokeOption) (*GetMulticloudResourceAnchorsResult, error)
func GetMulticloudResourceAnchorsOutput(ctx *Context, args *GetMulticloudResourceAnchorsOutputArgs, opts ...InvokeOption) GetMulticloudResourceAnchorsResultOutput> Note: This function is named GetMulticloudResourceAnchors in the Go SDK.
public static class GetMulticloudResourceAnchors
{
public static Task<GetMulticloudResourceAnchorsResult> InvokeAsync(GetMulticloudResourceAnchorsArgs args, InvokeOptions? opts = null)
public static Output<GetMulticloudResourceAnchorsResult> Invoke(GetMulticloudResourceAnchorsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMulticloudResourceAnchorsResult> getMulticloudResourceAnchors(GetMulticloudResourceAnchorsArgs args, InvokeOptions options)
public static Output<GetMulticloudResourceAnchorsResult> getMulticloudResourceAnchors(GetMulticloudResourceAnchorsArgs args, InvokeOptions options)
fn::invoke:
function: oci:oci/getMulticloudResourceAnchors:getMulticloudResourceAnchors
arguments:
# arguments dictionaryThe following arguments are supported:
- Subscription
Id string - The OCID of the subscription in which to list resources.
- Subscription
Service stringName - The subscription service name values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
List<Get
Multicloud Resource Anchors Filter> - Id string
- The OCID of the ResourceAnchor.
- Is
Compartment boolId In Subtree - Check the sub-compartments of a given compartmentId
- Lifecycle
State string - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Limit int
- Linked
Compartment stringId - The OCID of the compartment in which linked to Resource.
- Subscription
Id string - The OCID of the subscription in which to list resources.
- Subscription
Service stringName - The subscription service name values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
[]Get
Multicloud Resource Anchors Filter - Id string
- The OCID of the ResourceAnchor.
- Is
Compartment boolId In Subtree - Check the sub-compartments of a given compartmentId
- Lifecycle
State string - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Limit int
- Linked
Compartment stringId - The OCID of the compartment in which linked to Resource.
- subscription
Id String - The OCID of the subscription in which to list resources.
- subscription
Service StringName - The subscription service name values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]
- compartment
Id String - The OCID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters
List<Get
Multicloud Resource Anchors Filter> - id String
- The OCID of the ResourceAnchor.
- is
Compartment BooleanId In Subtree - Check the sub-compartments of a given compartmentId
- lifecycle
State String - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- limit Integer
- linked
Compartment StringId - The OCID of the compartment in which linked to Resource.
- subscription
Id string - The OCID of the subscription in which to list resources.
- subscription
Service stringName - The subscription service name values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]
- compartment
Id string - The OCID of the compartment in which to list resources.
- display
Name string - A filter to return only resources that match the given display name exactly.
- filters
Get
Multicloud Resource Anchors Filter[] - id string
- The OCID of the ResourceAnchor.
- is
Compartment booleanId In Subtree - Check the sub-compartments of a given compartmentId
- lifecycle
State string - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- limit number
- linked
Compartment stringId - The OCID of the compartment in which linked to Resource.
- subscription_
id str - The OCID of the subscription in which to list resources.
- subscription_
service_ strname - The subscription service name values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]
- compartment_
id str - The OCID of the compartment in which to list resources.
- display_
name str - A filter to return only resources that match the given display name exactly.
- filters
Sequence[Get
Multicloud Resource Anchors Filter] - id str
- The OCID of the ResourceAnchor.
- is_
compartment_ boolid_ in_ subtree - Check the sub-compartments of a given compartmentId
- lifecycle_
state str - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- limit int
- linked_
compartment_ strid - The OCID of the compartment in which linked to Resource.
- subscription
Id String - The OCID of the subscription in which to list resources.
- subscription
Service StringName - The subscription service name values from [ORACLEDBATAZURE, ORACLEDBATGOOGLE, ORACLEDBATAWS]
- compartment
Id String - The OCID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters List<Property Map>
- id String
- The OCID of the ResourceAnchor.
- is
Compartment BooleanId In Subtree - Check the sub-compartments of a given compartmentId
- lifecycle
State String - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- limit Number
- linked
Compartment StringId - The OCID of the compartment in which linked to Resource.
getMulticloudResourceAnchors Result
The following output properties are available:
- Resource
Anchor List<GetCollections Multicloud Resource Anchors Resource Anchor Collection> - The list of ResourceAnchorCollection.
- Subscription
Id string - Oracle Cloud Infrastructure Subscription Id
- Subscription
Service stringName - Compartment
Id string - The OCID of the compartment.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- Filters
List<Get
Multicloud Resource Anchors Filter> - Id string
- The OCID of the ResourceAnchor.
- Is
Compartment boolId In Subtree - Lifecycle
State string - The current state of the ResourceAnchor.
- Limit int
- Linked
Compartment stringId
- Resource
Anchor []GetCollections Multicloud Resource Anchors Resource Anchor Collection - The list of ResourceAnchorCollection.
- Subscription
Id string - Oracle Cloud Infrastructure Subscription Id
- Subscription
Service stringName - Compartment
Id string - The OCID of the compartment.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- Filters
[]Get
Multicloud Resource Anchors Filter - Id string
- The OCID of the ResourceAnchor.
- Is
Compartment boolId In Subtree - Lifecycle
State string - The current state of the ResourceAnchor.
- Limit int
- Linked
Compartment stringId
- resource
Anchor List<GetCollections Multicloud Resource Anchors Resource Anchor Collection> - The list of ResourceAnchorCollection.
- subscription
Id String - Oracle Cloud Infrastructure Subscription Id
- subscription
Service StringName - compartment
Id String - The OCID of the compartment.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable.
- filters
List<Get
Multicloud Resource Anchors Filter> - id String
- The OCID of the ResourceAnchor.
- is
Compartment BooleanId In Subtree - lifecycle
State String - The current state of the ResourceAnchor.
- limit Integer
- linked
Compartment StringId
- resource
Anchor GetCollections Multicloud Resource Anchors Resource Anchor Collection[] - The list of ResourceAnchorCollection.
- subscription
Id string - Oracle Cloud Infrastructure Subscription Id
- subscription
Service stringName - compartment
Id string - The OCID of the compartment.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- filters
Get
Multicloud Resource Anchors Filter[] - id string
- The OCID of the ResourceAnchor.
- is
Compartment booleanId In Subtree - lifecycle
State string - The current state of the ResourceAnchor.
- limit number
- linked
Compartment stringId
- resource_
anchor_ Sequence[Getcollections Multicloud Resource Anchors Resource Anchor Collection] - The list of ResourceAnchorCollection.
- subscription_
id str - Oracle Cloud Infrastructure Subscription Id
- subscription_
service_ strname - compartment_
id str - The OCID of the compartment.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable.
- filters
Sequence[Get
Multicloud Resource Anchors Filter] - id str
- The OCID of the ResourceAnchor.
- is_
compartment_ boolid_ in_ subtree - lifecycle_
state str - The current state of the ResourceAnchor.
- limit int
- linked_
compartment_ strid
- resource
Anchor List<Property Map>Collections - The list of ResourceAnchorCollection.
- subscription
Id String - Oracle Cloud Infrastructure Subscription Id
- subscription
Service StringName - compartment
Id String - The OCID of the compartment.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable.
- filters List<Property Map>
- id String
- The OCID of the ResourceAnchor.
- is
Compartment BooleanId In Subtree - lifecycle
State String - The current state of the ResourceAnchor.
- limit Number
- linked
Compartment StringId
Supporting Types
GetMulticloudResourceAnchorsFilter
GetMulticloudResourceAnchorsResourceAnchorCollection
- Items
List<Get
Multicloud Resource Anchors Resource Anchor Collection Item> - List of ResourceAnchorSummary
- Items
[]Get
Multicloud Resource Anchors Resource Anchor Collection Item - List of ResourceAnchorSummary
- items
List<Get
Multicloud Resource Anchors Resource Anchor Collection Item> - List of ResourceAnchorSummary
- items
Get
Multicloud Resource Anchors Resource Anchor Collection Item[] - List of ResourceAnchorSummary
- items
Sequence[Get
Multicloud Resource Anchors Resource Anchor Collection Item] - List of ResourceAnchorSummary
- items List<Property Map>
- List of ResourceAnchorSummary
GetMulticloudResourceAnchorsResourceAnchorCollectionItem
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - Display
Name string - A filter to return only resources that match the given display name exactly.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - Id string
- The OCID of the ResourceAnchor.
- Lifecycle
Details string - A message that describes the current state of the ResourceAnchor in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- Lifecycle
State string - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Subscription
Id string - The OCID of the subscription in which to list resources.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The date and time the ResourceAnchor was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the ResourceAnchor was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- Compartment
Id string - The OCID of the compartment in which to list resources.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - Display
Name string - A filter to return only resources that match the given display name exactly.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - Id string
- The OCID of the ResourceAnchor.
- Lifecycle
Details string - A message that describes the current state of the ResourceAnchor in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- Lifecycle
State string - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Subscription
Id string - The OCID of the subscription in which to list resources.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The date and time the ResourceAnchor was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the ResourceAnchor was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id String - The OCID of the compartment in which to list resources.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - display
Name String - A filter to return only resources that match the given display name exactly.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - id String
- The OCID of the ResourceAnchor.
- lifecycle
Details String - A message that describes the current state of the ResourceAnchor in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- lifecycle
State String - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- subscription
Id String - The OCID of the subscription in which to list resources.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The date and time the ResourceAnchor was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the ResourceAnchor was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id string - The OCID of the compartment in which to list resources.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - display
Name string - A filter to return only resources that match the given display name exactly.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - id string
- The OCID of the ResourceAnchor.
- lifecycle
Details string - A message that describes the current state of the ResourceAnchor in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- lifecycle
State string - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- subscription
Id string - The OCID of the subscription in which to list resources.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created string - The date and time the ResourceAnchor was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated string - The date and time the ResourceAnchor was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment_
id str - The OCID of the compartment in which to list resources.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - display_
name str - A filter to return only resources that match the given display name exactly.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - id str
- The OCID of the ResourceAnchor.
- lifecycle_
details str - A message that describes the current state of the ResourceAnchor in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- lifecycle_
state str - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- subscription_
id str - The OCID of the subscription in which to list resources.
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - time_
created str - The date and time the ResourceAnchor was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time_
updated str - The date and time the ResourceAnchor was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id String - The OCID of the compartment in which to list resources.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"} - display
Name String - A filter to return only resources that match the given display name exactly.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"} - id String
- The OCID of the ResourceAnchor.
- lifecycle
Details String - A message that describes the current state of the ResourceAnchor in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- lifecycle
State String - A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- subscription
Id String - The OCID of the subscription in which to list resources.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The date and time the ResourceAnchor was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the ResourceAnchor was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
Oracle Cloud Infrastructure v3.12.0 published on Friday, Nov 21, 2025 by Pulumi
