1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Tenantmanagercontrolplane
  5. getSubscriptionMappings
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Tenantmanagercontrolplane.getSubscriptionMappings

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Subscription Mappings in Oracle Cloud Infrastructure Tenantmanagercontrolplane service.

Lists the subscription mappings for all the subscriptions owned by a given compartmentId. Only the root compartment is allowed.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testSubscriptionMappings = oci.Tenantmanagercontrolplane.getSubscriptionMappings({
    subscriptionId: testSubscription.id,
    compartmentId: compartmentId,
    state: subscriptionMappingState,
    subscriptionMappingId: testSubscriptionMapping.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_subscription_mappings = oci.Tenantmanagercontrolplane.get_subscription_mappings(subscription_id=test_subscription["id"],
    compartment_id=compartment_id,
    state=subscription_mapping_state,
    subscription_mapping_id=test_subscription_mapping["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/tenantmanagercontrolplane"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tenantmanagercontrolplane.GetSubscriptionMappings(ctx, &tenantmanagercontrolplane.GetSubscriptionMappingsArgs{
			SubscriptionId:        testSubscription.Id,
			CompartmentId:         pulumi.StringRef(compartmentId),
			State:                 pulumi.StringRef(subscriptionMappingState),
			SubscriptionMappingId: pulumi.StringRef(testSubscriptionMapping.Id),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testSubscriptionMappings = Oci.Tenantmanagercontrolplane.GetSubscriptionMappings.Invoke(new()
    {
        SubscriptionId = testSubscription.Id,
        CompartmentId = compartmentId,
        State = subscriptionMappingState,
        SubscriptionMappingId = testSubscriptionMapping.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Tenantmanagercontrolplane.TenantmanagercontrolplaneFunctions;
import com.pulumi.oci.Tenantmanagercontrolplane.inputs.GetSubscriptionMappingsArgs;
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 testSubscriptionMappings = TenantmanagercontrolplaneFunctions.getSubscriptionMappings(GetSubscriptionMappingsArgs.builder()
            .subscriptionId(testSubscription.id())
            .compartmentId(compartmentId)
            .state(subscriptionMappingState)
            .subscriptionMappingId(testSubscriptionMapping.id())
            .build());

    }
}
Copy
variables:
  testSubscriptionMappings:
    fn::invoke:
      function: oci:Tenantmanagercontrolplane:getSubscriptionMappings
      arguments:
        subscriptionId: ${testSubscription.id}
        compartmentId: ${compartmentId}
        state: ${subscriptionMappingState}
        subscriptionMappingId: ${testSubscriptionMapping.id}
Copy

Using getSubscriptionMappings

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 getSubscriptionMappings(args: GetSubscriptionMappingsArgs, opts?: InvokeOptions): Promise<GetSubscriptionMappingsResult>
function getSubscriptionMappingsOutput(args: GetSubscriptionMappingsOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionMappingsResult>
Copy
def get_subscription_mappings(compartment_id: Optional[str] = None,
                              filters: Optional[Sequence[_tenantmanagercontrolplane.GetSubscriptionMappingsFilter]] = None,
                              state: Optional[str] = None,
                              subscription_id: Optional[str] = None,
                              subscription_mapping_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetSubscriptionMappingsResult
def get_subscription_mappings_output(compartment_id: Optional[pulumi.Input[str]] = None,
                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[_tenantmanagercontrolplane.GetSubscriptionMappingsFilterArgs]]]] = None,
                              state: Optional[pulumi.Input[str]] = None,
                              subscription_id: Optional[pulumi.Input[str]] = None,
                              subscription_mapping_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionMappingsResult]
Copy
func GetSubscriptionMappings(ctx *Context, args *GetSubscriptionMappingsArgs, opts ...InvokeOption) (*GetSubscriptionMappingsResult, error)
func GetSubscriptionMappingsOutput(ctx *Context, args *GetSubscriptionMappingsOutputArgs, opts ...InvokeOption) GetSubscriptionMappingsResultOutput
Copy

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

public static class GetSubscriptionMappings 
{
    public static Task<GetSubscriptionMappingsResult> InvokeAsync(GetSubscriptionMappingsArgs args, InvokeOptions? opts = null)
    public static Output<GetSubscriptionMappingsResult> Invoke(GetSubscriptionMappingsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSubscriptionMappingsResult> getSubscriptionMappings(GetSubscriptionMappingsArgs args, InvokeOptions options)
public static Output<GetSubscriptionMappingsResult> getSubscriptionMappings(GetSubscriptionMappingsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Tenantmanagercontrolplane/getSubscriptionMappings:getSubscriptionMappings
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

SubscriptionId This property is required. string
OCID of the subscription.
CompartmentId string
The ID of the compartment in which to list resources.
Filters Changes to this property will trigger replacement. List<GetSubscriptionMappingsFilter>
State string
The lifecycle state of the resource.
SubscriptionMappingId string
A unique ID for subscription and tenancy mapping.
SubscriptionId This property is required. string
OCID of the subscription.
CompartmentId string
The ID of the compartment in which to list resources.
Filters Changes to this property will trigger replacement. []GetSubscriptionMappingsFilter
State string
The lifecycle state of the resource.
SubscriptionMappingId string
A unique ID for subscription and tenancy mapping.
subscriptionId This property is required. String
OCID of the subscription.
compartmentId String
The ID of the compartment in which to list resources.
filters Changes to this property will trigger replacement. List<GetSubscriptionMappingsFilter>
state String
The lifecycle state of the resource.
subscriptionMappingId String
A unique ID for subscription and tenancy mapping.
subscriptionId This property is required. string
OCID of the subscription.
compartmentId string
The ID of the compartment in which to list resources.
filters Changes to this property will trigger replacement. GetSubscriptionMappingsFilter[]
state string
The lifecycle state of the resource.
subscriptionMappingId string
A unique ID for subscription and tenancy mapping.
subscription_id This property is required. str
OCID of the subscription.
compartment_id str
The ID of the compartment in which to list resources.
filters Changes to this property will trigger replacement. Sequence[tenantmanagercontrolplane.GetSubscriptionMappingsFilter]
state str
The lifecycle state of the resource.
subscription_mapping_id str
A unique ID for subscription and tenancy mapping.
subscriptionId This property is required. String
OCID of the subscription.
compartmentId String
The ID of the compartment in which to list resources.
filters Changes to this property will trigger replacement. List<Property Map>
state String
The lifecycle state of the resource.
subscriptionMappingId String
A unique ID for subscription and tenancy mapping.

getSubscriptionMappings Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
SubscriptionId string
OCID of the subscription.
SubscriptionMappingCollections List<GetSubscriptionMappingsSubscriptionMappingCollection>
The list of subscription_mapping_collection.
CompartmentId string
OCID of the compartment. Always a tenancy OCID.
Filters List<GetSubscriptionMappingsFilter>
State string
Lifecycle state of the subscriptionMapping.
SubscriptionMappingId string
Id string
The provider-assigned unique ID for this managed resource.
SubscriptionId string
OCID of the subscription.
SubscriptionMappingCollections []GetSubscriptionMappingsSubscriptionMappingCollection
The list of subscription_mapping_collection.
CompartmentId string
OCID of the compartment. Always a tenancy OCID.
Filters []GetSubscriptionMappingsFilter
State string
Lifecycle state of the subscriptionMapping.
SubscriptionMappingId string
id String
The provider-assigned unique ID for this managed resource.
subscriptionId String
OCID of the subscription.
subscriptionMappingCollections List<GetSubscriptionMappingsSubscriptionMappingCollection>
The list of subscription_mapping_collection.
compartmentId String
OCID of the compartment. Always a tenancy OCID.
filters List<GetSubscriptionMappingsFilter>
state String
Lifecycle state of the subscriptionMapping.
subscriptionMappingId String
id string
The provider-assigned unique ID for this managed resource.
subscriptionId string
OCID of the subscription.
subscriptionMappingCollections GetSubscriptionMappingsSubscriptionMappingCollection[]
The list of subscription_mapping_collection.
compartmentId string
OCID of the compartment. Always a tenancy OCID.
filters GetSubscriptionMappingsFilter[]
state string
Lifecycle state of the subscriptionMapping.
subscriptionMappingId string
id str
The provider-assigned unique ID for this managed resource.
subscription_id str
OCID of the subscription.
subscription_mapping_collections Sequence[tenantmanagercontrolplane.GetSubscriptionMappingsSubscriptionMappingCollection]
The list of subscription_mapping_collection.
compartment_id str
OCID of the compartment. Always a tenancy OCID.
filters Sequence[tenantmanagercontrolplane.GetSubscriptionMappingsFilter]
state str
Lifecycle state of the subscriptionMapping.
subscription_mapping_id str
id String
The provider-assigned unique ID for this managed resource.
subscriptionId String
OCID of the subscription.
subscriptionMappingCollections List<Property Map>
The list of subscription_mapping_collection.
compartmentId String
OCID of the compartment. Always a tenancy OCID.
filters List<Property Map>
state String
Lifecycle state of the subscriptionMapping.
subscriptionMappingId String

Supporting Types

GetSubscriptionMappingsFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetSubscriptionMappingsSubscriptionMappingCollection

items This property is required. List<Property Map>

GetSubscriptionMappingsSubscriptionMappingCollectionItem

CompartmentId This property is required. string
The ID of the compartment in which to list resources.
Id This property is required. string
OCID of the mapping between subscription and compartment identified by the tenancy.
IsExplicitlyAssigned This property is required. bool
Denotes if the subscription is explicity assigned to the root compartment or tenancy.
State This property is required. string
The lifecycle state of the resource.
SubscriptionId This property is required. string
OCID of the subscription.
TimeCreated This property is required. string
Date-time when subscription mapping was created.
TimeTerminated This property is required. string
Date-time when subscription mapping was terminated.
TimeUpdated This property is required. string
Date-time when subscription mapping was updated.
CompartmentId This property is required. string
The ID of the compartment in which to list resources.
Id This property is required. string
OCID of the mapping between subscription and compartment identified by the tenancy.
IsExplicitlyAssigned This property is required. bool
Denotes if the subscription is explicity assigned to the root compartment or tenancy.
State This property is required. string
The lifecycle state of the resource.
SubscriptionId This property is required. string
OCID of the subscription.
TimeCreated This property is required. string
Date-time when subscription mapping was created.
TimeTerminated This property is required. string
Date-time when subscription mapping was terminated.
TimeUpdated This property is required. string
Date-time when subscription mapping was updated.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
id This property is required. String
OCID of the mapping between subscription and compartment identified by the tenancy.
isExplicitlyAssigned This property is required. Boolean
Denotes if the subscription is explicity assigned to the root compartment or tenancy.
state This property is required. String
The lifecycle state of the resource.
subscriptionId This property is required. String
OCID of the subscription.
timeCreated This property is required. String
Date-time when subscription mapping was created.
timeTerminated This property is required. String
Date-time when subscription mapping was terminated.
timeUpdated This property is required. String
Date-time when subscription mapping was updated.
compartmentId This property is required. string
The ID of the compartment in which to list resources.
id This property is required. string
OCID of the mapping between subscription and compartment identified by the tenancy.
isExplicitlyAssigned This property is required. boolean
Denotes if the subscription is explicity assigned to the root compartment or tenancy.
state This property is required. string
The lifecycle state of the resource.
subscriptionId This property is required. string
OCID of the subscription.
timeCreated This property is required. string
Date-time when subscription mapping was created.
timeTerminated This property is required. string
Date-time when subscription mapping was terminated.
timeUpdated This property is required. string
Date-time when subscription mapping was updated.
compartment_id This property is required. str
The ID of the compartment in which to list resources.
id This property is required. str
OCID of the mapping between subscription and compartment identified by the tenancy.
is_explicitly_assigned This property is required. bool
Denotes if the subscription is explicity assigned to the root compartment or tenancy.
state This property is required. str
The lifecycle state of the resource.
subscription_id This property is required. str
OCID of the subscription.
time_created This property is required. str
Date-time when subscription mapping was created.
time_terminated This property is required. str
Date-time when subscription mapping was terminated.
time_updated This property is required. str
Date-time when subscription mapping was updated.
compartmentId This property is required. String
The ID of the compartment in which to list resources.
id This property is required. String
OCID of the mapping between subscription and compartment identified by the tenancy.
isExplicitlyAssigned This property is required. Boolean
Denotes if the subscription is explicity assigned to the root compartment or tenancy.
state This property is required. String
The lifecycle state of the resource.
subscriptionId This property is required. String
OCID of the subscription.
timeCreated This property is required. String
Date-time when subscription mapping was created.
timeTerminated This property is required. String
Date-time when subscription mapping was terminated.
timeUpdated This property is required. String
Date-time when subscription mapping was updated.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi