Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
oci.Tenantmanagercontrolplane.getSubscriptionMappings
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 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,
});
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"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/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
})
}
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,
});
});
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());
}
}
variables:
testSubscriptionMappings:
fn::invoke:
function: oci:Tenantmanagercontrolplane:getSubscriptionMappings
arguments:
subscriptionId: ${testSubscription.id}
compartmentId: ${compartmentId}
state: ${subscriptionMappingState}
subscriptionMappingId: ${testSubscriptionMapping.id}
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>def get_subscription_mappings(compartment_id: Optional[str] = None,
filters: Optional[Sequence[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[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]func GetSubscriptionMappings(ctx *Context, args *GetSubscriptionMappingsArgs, opts ...InvokeOption) (*GetSubscriptionMappingsResult, error)
func GetSubscriptionMappingsOutput(ctx *Context, args *GetSubscriptionMappingsOutputArgs, opts ...InvokeOption) GetSubscriptionMappingsResultOutput> 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)
}public static CompletableFuture<GetSubscriptionMappingsResult> getSubscriptionMappings(GetSubscriptionMappingsArgs args, InvokeOptions options)
public static Output<GetSubscriptionMappingsResult> getSubscriptionMappings(GetSubscriptionMappingsArgs args, InvokeOptions options)
fn::invoke:
function: oci:Tenantmanagercontrolplane/getSubscriptionMappings:getSubscriptionMappings
arguments:
# arguments dictionaryThe following arguments are supported:
- Subscription
Id string - OCID of the subscription.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Filters
List<Get
Subscription Mappings Filter> - State string
- The lifecycle state of the resource.
- Subscription
Mapping stringId - A unique ID for subscription and tenancy mapping.
- Subscription
Id string - OCID of the subscription.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Filters
[]Get
Subscription Mappings Filter - State string
- The lifecycle state of the resource.
- Subscription
Mapping stringId - A unique ID for subscription and tenancy mapping.
- subscription
Id String - OCID of the subscription.
- compartment
Id String - The ID of the compartment in which to list resources.
- filters
List<Get
Subscription Mappings Filter> - state String
- The lifecycle state of the resource.
- subscription
Mapping StringId - A unique ID for subscription and tenancy mapping.
- subscription
Id string - OCID of the subscription.
- compartment
Id string - The ID of the compartment in which to list resources.
- filters
Get
Subscription Mappings Filter[] - state string
- The lifecycle state of the resource.
- subscription
Mapping stringId - A unique ID for subscription and tenancy mapping.
- subscription_
id str - OCID of the subscription.
- compartment_
id str - The ID of the compartment in which to list resources.
- filters
Sequence[Get
Subscription Mappings Filter] - state str
- The lifecycle state of the resource.
- subscription_
mapping_ strid - A unique ID for subscription and tenancy mapping.
- subscription
Id String - OCID of the subscription.
- compartment
Id String - The ID of the compartment in which to list resources.
- filters List<Property Map>
- state String
- The lifecycle state of the resource.
- subscription
Mapping StringId - 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.
- Subscription
Id string - OCID of the subscription.
- Subscription
Mapping List<GetCollections Subscription Mappings Subscription Mapping Collection> - The list of subscription_mapping_collection.
- Compartment
Id string - OCID of the compartment. Always a tenancy OCID.
- Filters
List<Get
Subscription Mappings Filter> - State string
- Lifecycle state of the subscriptionMapping.
- Subscription
Mapping stringId
- Id string
- The provider-assigned unique ID for this managed resource.
- Subscription
Id string - OCID of the subscription.
- Subscription
Mapping []GetCollections Subscription Mappings Subscription Mapping Collection - The list of subscription_mapping_collection.
- Compartment
Id string - OCID of the compartment. Always a tenancy OCID.
- Filters
[]Get
Subscription Mappings Filter - State string
- Lifecycle state of the subscriptionMapping.
- Subscription
Mapping stringId
- id String
- The provider-assigned unique ID for this managed resource.
- subscription
Id String - OCID of the subscription.
- subscription
Mapping List<GetCollections Subscription Mappings Subscription Mapping Collection> - The list of subscription_mapping_collection.
- compartment
Id String - OCID of the compartment. Always a tenancy OCID.
- filters
List<Get
Subscription Mappings Filter> - state String
- Lifecycle state of the subscriptionMapping.
- subscription
Mapping StringId
- id string
- The provider-assigned unique ID for this managed resource.
- subscription
Id string - OCID of the subscription.
- subscription
Mapping GetCollections Subscription Mappings Subscription Mapping Collection[] - The list of subscription_mapping_collection.
- compartment
Id string - OCID of the compartment. Always a tenancy OCID.
- filters
Get
Subscription Mappings Filter[] - state string
- Lifecycle state of the subscriptionMapping.
- subscription
Mapping stringId
- id str
- The provider-assigned unique ID for this managed resource.
- subscription_
id str - OCID of the subscription.
- subscription_
mapping_ Sequence[Getcollections Subscription Mappings Subscription Mapping Collection] - The list of subscription_mapping_collection.
- compartment_
id str - OCID of the compartment. Always a tenancy OCID.
- filters
Sequence[Get
Subscription Mappings Filter] - state str
- Lifecycle state of the subscriptionMapping.
- subscription_
mapping_ strid
- id String
- The provider-assigned unique ID for this managed resource.
- subscription
Id String - OCID of the subscription.
- subscription
Mapping List<Property Map>Collections - The list of subscription_mapping_collection.
- compartment
Id String - OCID of the compartment. Always a tenancy OCID.
- filters List<Property Map>
- state String
- Lifecycle state of the subscriptionMapping.
- subscription
Mapping StringId
Supporting Types
GetSubscriptionMappingsFilter
GetSubscriptionMappingsSubscriptionMappingCollection
GetSubscriptionMappingsSubscriptionMappingCollectionItem
- Compartment
Id string - The ID of the compartment in which to list resources.
- Id string
- OCID of the mapping between subscription and compartment identified by the tenancy.
- Is
Explicitly boolAssigned - Denotes if the subscription is explicity assigned to the root compartment or tenancy.
- State string
- The lifecycle state of the resource.
- Subscription
Id string - OCID of the subscription.
- Time
Created string - Date-time when subscription mapping was created.
- Time
Terminated string - Date-time when subscription mapping was terminated.
- Time
Updated string - Date-time when subscription mapping was updated.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Id string
- OCID of the mapping between subscription and compartment identified by the tenancy.
- Is
Explicitly boolAssigned - Denotes if the subscription is explicity assigned to the root compartment or tenancy.
- State string
- The lifecycle state of the resource.
- Subscription
Id string - OCID of the subscription.
- Time
Created string - Date-time when subscription mapping was created.
- Time
Terminated string - Date-time when subscription mapping was terminated.
- Time
Updated string - Date-time when subscription mapping was updated.
- compartment
Id String - The ID of the compartment in which to list resources.
- id String
- OCID of the mapping between subscription and compartment identified by the tenancy.
- is
Explicitly BooleanAssigned - Denotes if the subscription is explicity assigned to the root compartment or tenancy.
- state String
- The lifecycle state of the resource.
- subscription
Id String - OCID of the subscription.
- time
Created String - Date-time when subscription mapping was created.
- time
Terminated String - Date-time when subscription mapping was terminated.
- time
Updated String - Date-time when subscription mapping was updated.
- compartment
Id string - The ID of the compartment in which to list resources.
- id string
- OCID of the mapping between subscription and compartment identified by the tenancy.
- is
Explicitly booleanAssigned - Denotes if the subscription is explicity assigned to the root compartment or tenancy.
- state string
- The lifecycle state of the resource.
- subscription
Id string - OCID of the subscription.
- time
Created string - Date-time when subscription mapping was created.
- time
Terminated string - Date-time when subscription mapping was terminated.
- time
Updated string - Date-time when subscription mapping was updated.
- compartment_
id str - The ID of the compartment in which to list resources.
- id str
- OCID of the mapping between subscription and compartment identified by the tenancy.
- is_
explicitly_ boolassigned - Denotes if the subscription is explicity assigned to the root compartment or tenancy.
- state str
- The lifecycle state of the resource.
- subscription_
id str - OCID of the subscription.
- time_
created str - Date-time when subscription mapping was created.
- time_
terminated str - Date-time when subscription mapping was terminated.
- time_
updated str - Date-time when subscription mapping was updated.
- compartment
Id String - The ID of the compartment in which to list resources.
- id String
- OCID of the mapping between subscription and compartment identified by the tenancy.
- is
Explicitly BooleanAssigned - Denotes if the subscription is explicity assigned to the root compartment or tenancy.
- state String
- The lifecycle state of the resource.
- subscription
Id String - OCID of the subscription.
- time
Created String - Date-time when subscription mapping was created.
- time
Terminated String - Date-time when subscription mapping was terminated.
- time
Updated 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
ociTerraform Provider.
Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
