Viewing docs for Oracle Cloud Infrastructure v4.7.0
published on Thursday, Apr 16, 2026 by Pulumi
published on Thursday, Apr 16, 2026 by Pulumi
Viewing docs for Oracle Cloud Infrastructure v4.7.0
published on Thursday, Apr 16, 2026 by Pulumi
published on Thursday, Apr 16, 2026 by Pulumi
This data source provides details about a specific Subscription Token resource in Oracle Cloud Infrastructure Self service.
Gets a token of Subscriptions.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSubscriptionToken = oci.oci.getSelfSubscriptionToken({
subscriptionId: testSubscription.id,
});
import pulumi
import pulumi_oci as oci
test_subscription_token = oci.oci.get_self_subscription_token(subscription_id=test_subscription["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/oci"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := oci.GetSelfSubscriptionToken(ctx, &oci.GetSelfSubscriptionTokenArgs{
SubscriptionId: testSubscription.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 testSubscriptionToken = Oci.Oci.GetSelfSubscriptionToken.Invoke(new()
{
SubscriptionId = testSubscription.Id,
});
});
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.GetSelfSubscriptionTokenArgs;
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 testSubscriptionToken = OciFunctions.getSelfSubscriptionToken(GetSelfSubscriptionTokenArgs.builder()
.subscriptionId(testSubscription.id())
.build());
}
}
variables:
testSubscriptionToken:
fn::invoke:
function: oci:oci:getSelfSubscriptionToken
arguments:
subscriptionId: ${testSubscription.id}
Using getSelfSubscriptionToken
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 getSelfSubscriptionToken(args: GetSelfSubscriptionTokenArgs, opts?: InvokeOptions): Promise<GetSelfSubscriptionTokenResult>
function getSelfSubscriptionTokenOutput(args: GetSelfSubscriptionTokenOutputArgs, opts?: InvokeOptions): Output<GetSelfSubscriptionTokenResult>def get_self_subscription_token(subscription_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSelfSubscriptionTokenResult
def get_self_subscription_token_output(subscription_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSelfSubscriptionTokenResult]func GetSelfSubscriptionToken(ctx *Context, args *GetSelfSubscriptionTokenArgs, opts ...InvokeOption) (*GetSelfSubscriptionTokenResult, error)
func GetSelfSubscriptionTokenOutput(ctx *Context, args *GetSelfSubscriptionTokenOutputArgs, opts ...InvokeOption) GetSelfSubscriptionTokenResultOutput> Note: This function is named GetSelfSubscriptionToken in the Go SDK.
public static class GetSelfSubscriptionToken
{
public static Task<GetSelfSubscriptionTokenResult> InvokeAsync(GetSelfSubscriptionTokenArgs args, InvokeOptions? opts = null)
public static Output<GetSelfSubscriptionTokenResult> Invoke(GetSelfSubscriptionTokenInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSelfSubscriptionTokenResult> getSelfSubscriptionToken(GetSelfSubscriptionTokenArgs args, InvokeOptions options)
public static Output<GetSelfSubscriptionTokenResult> getSelfSubscriptionToken(GetSelfSubscriptionTokenArgs args, InvokeOptions options)
fn::invoke:
function: oci:oci/getSelfSubscriptionToken:getSelfSubscriptionToken
arguments:
# arguments dictionaryThe following arguments are supported:
- Subscription
Id string - The unique identifier for the subscription.
- Subscription
Id string - The unique identifier for the subscription.
- subscription
Id String - The unique identifier for the subscription.
- subscription
Id string - The unique identifier for the subscription.
- subscription_
id str - The unique identifier for the subscription.
- subscription
Id String - The unique identifier for the subscription.
getSelfSubscriptionToken Result
The following output properties are available:
- 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"} - 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 provider-assigned unique ID for this managed resource.
- Subscription
Id string - The unique identifier for the subscription within a specific compartment.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - Token string
- JWT token of subscriptions.
- 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"} - 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 provider-assigned unique ID for this managed resource.
- Subscription
Id string - The unique identifier for the subscription within a specific compartment.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - Token string
- JWT token of subscriptions.
- 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"} - 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 provider-assigned unique ID for this managed resource.
- subscription
Id String - The unique identifier for the subscription within a specific compartment.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - token String
- JWT token of subscriptions.
- {[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"} - {[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 provider-assigned unique ID for this managed resource.
- subscription
Id string - The unique identifier for the subscription within a specific compartment.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - token string
- JWT token of subscriptions.
- 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"} - 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 provider-assigned unique ID for this managed resource.
- subscription_
id str - The unique identifier for the subscription within a specific compartment.
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - token str
- JWT token of subscriptions.
- 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"} - 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 provider-assigned unique ID for this managed resource.
- subscription
Id String - The unique identifier for the subscription within a specific compartment.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - token String
- JWT token of subscriptions.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
Viewing docs for Oracle Cloud Infrastructure v4.7.0
published on Thursday, Apr 16, 2026 by Pulumi
published on Thursday, Apr 16, 2026 by Pulumi
