1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. oci
  5. getResourceAnalyticsTenancyAttachments
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi

oci.oci.getResourceAnalyticsTenancyAttachments

Get Started
oci logo
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi

    This data source provides the list of Tenancy Attachments in Oracle Cloud Infrastructure Resource Analytics service.

    Gets a list of TenancyAttachments.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testTenancyAttachments = oci.oci.getResourceAnalyticsTenancyAttachments({
        id: tenancyAttachmentId,
        resourceAnalyticsInstanceId: testResourceAnalyticsInstance.id,
        state: tenancyAttachmentState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_tenancy_attachments = oci.oci.get_resource_analytics_tenancy_attachments(id=tenancy_attachment_id,
        resource_analytics_instance_id=test_resource_analytics_instance["id"],
        state=tenancy_attachment_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.GetResourceAnalyticsTenancyAttachments(ctx, &oci.GetResourceAnalyticsTenancyAttachmentsArgs{
    			Id:                          pulumi.StringRef(tenancyAttachmentId),
    			ResourceAnalyticsInstanceId: pulumi.StringRef(testResourceAnalyticsInstance.Id),
    			State:                       pulumi.StringRef(tenancyAttachmentState),
    		}, 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 testTenancyAttachments = Oci.Oci.GetResourceAnalyticsTenancyAttachments.Invoke(new()
        {
            Id = tenancyAttachmentId,
            ResourceAnalyticsInstanceId = testResourceAnalyticsInstance.Id,
            State = tenancyAttachmentState,
        });
    
    });
    
    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.GetResourceAnalyticsTenancyAttachmentsArgs;
    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 testTenancyAttachments = OciFunctions.getResourceAnalyticsTenancyAttachments(GetResourceAnalyticsTenancyAttachmentsArgs.builder()
                .id(tenancyAttachmentId)
                .resourceAnalyticsInstanceId(testResourceAnalyticsInstance.id())
                .state(tenancyAttachmentState)
                .build());
    
        }
    }
    
    variables:
      testTenancyAttachments:
        fn::invoke:
          function: oci:oci:getResourceAnalyticsTenancyAttachments
          arguments:
            id: ${tenancyAttachmentId}
            resourceAnalyticsInstanceId: ${testResourceAnalyticsInstance.id}
            state: ${tenancyAttachmentState}
    

    Using getResourceAnalyticsTenancyAttachments

    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 getResourceAnalyticsTenancyAttachments(args: GetResourceAnalyticsTenancyAttachmentsArgs, opts?: InvokeOptions): Promise<GetResourceAnalyticsTenancyAttachmentsResult>
    function getResourceAnalyticsTenancyAttachmentsOutput(args: GetResourceAnalyticsTenancyAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetResourceAnalyticsTenancyAttachmentsResult>
    def get_resource_analytics_tenancy_attachments(filters: Optional[Sequence[GetResourceAnalyticsTenancyAttachmentsFilter]] = None,
                                                   id: Optional[str] = None,
                                                   resource_analytics_instance_id: Optional[str] = None,
                                                   state: Optional[str] = None,
                                                   opts: Optional[InvokeOptions] = None) -> GetResourceAnalyticsTenancyAttachmentsResult
    def get_resource_analytics_tenancy_attachments_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetResourceAnalyticsTenancyAttachmentsFilterArgs]]]] = None,
                                                   id: Optional[pulumi.Input[str]] = None,
                                                   resource_analytics_instance_id: Optional[pulumi.Input[str]] = None,
                                                   state: Optional[pulumi.Input[str]] = None,
                                                   opts: Optional[InvokeOptions] = None) -> Output[GetResourceAnalyticsTenancyAttachmentsResult]
    func GetResourceAnalyticsTenancyAttachments(ctx *Context, args *GetResourceAnalyticsTenancyAttachmentsArgs, opts ...InvokeOption) (*GetResourceAnalyticsTenancyAttachmentsResult, error)
    func GetResourceAnalyticsTenancyAttachmentsOutput(ctx *Context, args *GetResourceAnalyticsTenancyAttachmentsOutputArgs, opts ...InvokeOption) GetResourceAnalyticsTenancyAttachmentsResultOutput

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

    public static class GetResourceAnalyticsTenancyAttachments 
    {
        public static Task<GetResourceAnalyticsTenancyAttachmentsResult> InvokeAsync(GetResourceAnalyticsTenancyAttachmentsArgs args, InvokeOptions? opts = null)
        public static Output<GetResourceAnalyticsTenancyAttachmentsResult> Invoke(GetResourceAnalyticsTenancyAttachmentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResourceAnalyticsTenancyAttachmentsResult> getResourceAnalyticsTenancyAttachments(GetResourceAnalyticsTenancyAttachmentsArgs args, InvokeOptions options)
    public static Output<GetResourceAnalyticsTenancyAttachmentsResult> getResourceAnalyticsTenancyAttachments(GetResourceAnalyticsTenancyAttachmentsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:oci/getResourceAnalyticsTenancyAttachments:getResourceAnalyticsTenancyAttachments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetResourceAnalyticsTenancyAttachmentsFilter>
    Id string
    The OCID of the TenancyAttachment.
    ResourceAnalyticsInstanceId string
    The OCID of a ResourceAnalyticsInstance.
    State string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    Filters []GetResourceAnalyticsTenancyAttachmentsFilter
    Id string
    The OCID of the TenancyAttachment.
    ResourceAnalyticsInstanceId string
    The OCID of a ResourceAnalyticsInstance.
    State string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    filters List<GetResourceAnalyticsTenancyAttachmentsFilter>
    id String
    The OCID of the TenancyAttachment.
    resourceAnalyticsInstanceId String
    The OCID of a ResourceAnalyticsInstance.
    state String
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    filters GetResourceAnalyticsTenancyAttachmentsFilter[]
    id string
    The OCID of the TenancyAttachment.
    resourceAnalyticsInstanceId string
    The OCID of a ResourceAnalyticsInstance.
    state string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    filters Sequence[GetResourceAnalyticsTenancyAttachmentsFilter]
    id str
    The OCID of the TenancyAttachment.
    resource_analytics_instance_id str
    The OCID of a ResourceAnalyticsInstance.
    state str
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    filters List<Property Map>
    id String
    The OCID of the TenancyAttachment.
    resourceAnalyticsInstanceId String
    The OCID of a ResourceAnalyticsInstance.
    state String
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.

    getResourceAnalyticsTenancyAttachments Result

    The following output properties are available:

    TenancyAttachmentCollections List<GetResourceAnalyticsTenancyAttachmentsTenancyAttachmentCollection>
    The list of tenancy_attachment_collection.
    Filters List<GetResourceAnalyticsTenancyAttachmentsFilter>
    Id string
    The OCID of the TenancyAttachment.
    ResourceAnalyticsInstanceId string
    The OCID of the ResourceAnalyticsInstance associated with this TenancyAttachment.
    State string
    The current state of the TenancyAttachment.
    TenancyAttachmentCollections []GetResourceAnalyticsTenancyAttachmentsTenancyAttachmentCollection
    The list of tenancy_attachment_collection.
    Filters []GetResourceAnalyticsTenancyAttachmentsFilter
    Id string
    The OCID of the TenancyAttachment.
    ResourceAnalyticsInstanceId string
    The OCID of the ResourceAnalyticsInstance associated with this TenancyAttachment.
    State string
    The current state of the TenancyAttachment.
    tenancyAttachmentCollections List<GetResourceAnalyticsTenancyAttachmentsTenancyAttachmentCollection>
    The list of tenancy_attachment_collection.
    filters List<GetResourceAnalyticsTenancyAttachmentsFilter>
    id String
    The OCID of the TenancyAttachment.
    resourceAnalyticsInstanceId String
    The OCID of the ResourceAnalyticsInstance associated with this TenancyAttachment.
    state String
    The current state of the TenancyAttachment.
    tenancyAttachmentCollections GetResourceAnalyticsTenancyAttachmentsTenancyAttachmentCollection[]
    The list of tenancy_attachment_collection.
    filters GetResourceAnalyticsTenancyAttachmentsFilter[]
    id string
    The OCID of the TenancyAttachment.
    resourceAnalyticsInstanceId string
    The OCID of the ResourceAnalyticsInstance associated with this TenancyAttachment.
    state string
    The current state of the TenancyAttachment.
    tenancy_attachment_collections Sequence[GetResourceAnalyticsTenancyAttachmentsTenancyAttachmentCollection]
    The list of tenancy_attachment_collection.
    filters Sequence[GetResourceAnalyticsTenancyAttachmentsFilter]
    id str
    The OCID of the TenancyAttachment.
    resource_analytics_instance_id str
    The OCID of the ResourceAnalyticsInstance associated with this TenancyAttachment.
    state str
    The current state of the TenancyAttachment.
    tenancyAttachmentCollections List<Property Map>
    The list of tenancy_attachment_collection.
    filters List<Property Map>
    id String
    The OCID of the TenancyAttachment.
    resourceAnalyticsInstanceId String
    The OCID of the ResourceAnalyticsInstance associated with this TenancyAttachment.
    state String
    The current state of the TenancyAttachment.

    Supporting Types

    GetResourceAnalyticsTenancyAttachmentsFilter

    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

    GetResourceAnalyticsTenancyAttachmentsTenancyAttachmentCollection

    GetResourceAnalyticsTenancyAttachmentsTenancyAttachmentCollectionItem

    Description string
    A description of the tenancy.
    Id string
    The OCID of the TenancyAttachment.
    IsReportingTenancy bool
    Whether the tenancy is the tenancy used when creating Resource Analytics Instance.
    LifecycleDetails string
    A message that describes the current state of the TenancyAttachment in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
    ResourceAnalyticsInstanceId string
    The OCID of a ResourceAnalyticsInstance.
    State string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TenancyId string
    The OCID of the tenancy associated with this TenancyAttachment.
    TimeCreated string
    The date and time the TenancyAttachment was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time the TenancyAttachment was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    Description string
    A description of the tenancy.
    Id string
    The OCID of the TenancyAttachment.
    IsReportingTenancy bool
    Whether the tenancy is the tenancy used when creating Resource Analytics Instance.
    LifecycleDetails string
    A message that describes the current state of the TenancyAttachment in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
    ResourceAnalyticsInstanceId string
    The OCID of a ResourceAnalyticsInstance.
    State string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TenancyId string
    The OCID of the tenancy associated with this TenancyAttachment.
    TimeCreated string
    The date and time the TenancyAttachment was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time the TenancyAttachment was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    description String
    A description of the tenancy.
    id String
    The OCID of the TenancyAttachment.
    isReportingTenancy Boolean
    Whether the tenancy is the tenancy used when creating Resource Analytics Instance.
    lifecycleDetails String
    A message that describes the current state of the TenancyAttachment in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
    resourceAnalyticsInstanceId String
    The OCID of a ResourceAnalyticsInstance.
    state String
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    tenancyId String
    The OCID of the tenancy associated with this TenancyAttachment.
    timeCreated String
    The date and time the TenancyAttachment was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time the TenancyAttachment was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    description string
    A description of the tenancy.
    id string
    The OCID of the TenancyAttachment.
    isReportingTenancy boolean
    Whether the tenancy is the tenancy used when creating Resource Analytics Instance.
    lifecycleDetails string
    A message that describes the current state of the TenancyAttachment in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
    resourceAnalyticsInstanceId string
    The OCID of a ResourceAnalyticsInstance.
    state string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    tenancyId string
    The OCID of the tenancy associated with this TenancyAttachment.
    timeCreated string
    The date and time the TenancyAttachment was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated string
    The date and time the TenancyAttachment was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    description str
    A description of the tenancy.
    id str
    The OCID of the TenancyAttachment.
    is_reporting_tenancy bool
    Whether the tenancy is the tenancy used when creating Resource Analytics Instance.
    lifecycle_details str
    A message that describes the current state of the TenancyAttachment in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
    resource_analytics_instance_id str
    The OCID of a ResourceAnalyticsInstance.
    state str
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    tenancy_id str
    The OCID of the tenancy associated with this TenancyAttachment.
    time_created str
    The date and time the TenancyAttachment was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    time_updated str
    The date and time the TenancyAttachment was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    description String
    A description of the tenancy.
    id String
    The OCID of the TenancyAttachment.
    isReportingTenancy Boolean
    Whether the tenancy is the tenancy used when creating Resource Analytics Instance.
    lifecycleDetails String
    A message that describes the current state of the TenancyAttachment in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
    resourceAnalyticsInstanceId String
    The OCID of a ResourceAnalyticsInstance.
    state String
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    tenancyId String
    The OCID of the tenancy associated with this TenancyAttachment.
    timeCreated String
    The date and time the TenancyAttachment was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time the TenancyAttachment 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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate