1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. IdentityDataPlane
  5. GeneratedScopedAccessToken
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.IdentityDataPlane.GeneratedScopedAccessToken

Explore with Pulumi AI

This resource provides the Generate Scoped Access Token resource in Oracle Cloud Infrastructure Identity Data Plane service.

Based on the calling principal and the input payload, derive the claims and create a security token.

Example Usage

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

const testGenerateScopedAccessToken = new oci.identitydataplane.GeneratedScopedAccessToken("test_generate_scoped_access_token", {
    publicKey: generateScopedAccessTokenPublicKey,
    scope: generateScopedAccessTokenScope,
});
Copy
import pulumi
import pulumi_oci as oci

test_generate_scoped_access_token = oci.identity_data_plane.GeneratedScopedAccessToken("test_generate_scoped_access_token",
    public_key=generate_scoped_access_token_public_key,
    scope=generate_scoped_access_token_scope)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identitydataplane.NewGeneratedScopedAccessToken(ctx, "test_generate_scoped_access_token", &identitydataplane.GeneratedScopedAccessTokenArgs{
			PublicKey: pulumi.Any(generateScopedAccessTokenPublicKey),
			Scope:     pulumi.Any(generateScopedAccessTokenScope),
		})
		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 testGenerateScopedAccessToken = new Oci.IdentityDataPlane.GeneratedScopedAccessToken("test_generate_scoped_access_token", new()
    {
        PublicKey = generateScopedAccessTokenPublicKey,
        Scope = generateScopedAccessTokenScope,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.IdentityDataPlane.GeneratedScopedAccessToken;
import com.pulumi.oci.IdentityDataPlane.GeneratedScopedAccessTokenArgs;
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) {
        var testGenerateScopedAccessToken = new GeneratedScopedAccessToken("testGenerateScopedAccessToken", GeneratedScopedAccessTokenArgs.builder()
            .publicKey(generateScopedAccessTokenPublicKey)
            .scope(generateScopedAccessTokenScope)
            .build());

    }
}
Copy
resources:
  testGenerateScopedAccessToken:
    type: oci:IdentityDataPlane:GeneratedScopedAccessToken
    name: test_generate_scoped_access_token
    properties:
      publicKey: ${generateScopedAccessTokenPublicKey}
      scope: ${generateScopedAccessTokenScope}
Copy

Create GeneratedScopedAccessToken Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new GeneratedScopedAccessToken(name: string, args: GeneratedScopedAccessTokenArgs, opts?: CustomResourceOptions);
@overload
def GeneratedScopedAccessToken(resource_name: str,
                               args: GeneratedScopedAccessTokenArgs,
                               opts: Optional[ResourceOptions] = None)

@overload
def GeneratedScopedAccessToken(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               public_key: Optional[str] = None,
                               scope: Optional[str] = None)
func NewGeneratedScopedAccessToken(ctx *Context, name string, args GeneratedScopedAccessTokenArgs, opts ...ResourceOption) (*GeneratedScopedAccessToken, error)
public GeneratedScopedAccessToken(string name, GeneratedScopedAccessTokenArgs args, CustomResourceOptions? opts = null)
public GeneratedScopedAccessToken(String name, GeneratedScopedAccessTokenArgs args)
public GeneratedScopedAccessToken(String name, GeneratedScopedAccessTokenArgs args, CustomResourceOptions options)
type: oci:IdentityDataPlane:GeneratedScopedAccessToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GeneratedScopedAccessTokenArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. GeneratedScopedAccessTokenArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. GeneratedScopedAccessTokenArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GeneratedScopedAccessTokenArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. GeneratedScopedAccessTokenArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var generatedScopedAccessTokenResource = new Oci.IdentityDataPlane.GeneratedScopedAccessToken("generatedScopedAccessTokenResource", new()
{
    PublicKey = "string",
    Scope = "string",
});
Copy
example, err := IdentityDataPlane.NewGeneratedScopedAccessToken(ctx, "generatedScopedAccessTokenResource", &IdentityDataPlane.GeneratedScopedAccessTokenArgs{
	PublicKey: pulumi.String("string"),
	Scope:     pulumi.String("string"),
})
Copy
var generatedScopedAccessTokenResource = new GeneratedScopedAccessToken("generatedScopedAccessTokenResource", GeneratedScopedAccessTokenArgs.builder()
    .publicKey("string")
    .scope("string")
    .build());
Copy
generated_scoped_access_token_resource = oci.identity_data_plane.GeneratedScopedAccessToken("generatedScopedAccessTokenResource",
    public_key="string",
    scope="string")
Copy
const generatedScopedAccessTokenResource = new oci.identitydataplane.GeneratedScopedAccessToken("generatedScopedAccessTokenResource", {
    publicKey: "string",
    scope: "string",
});
Copy
type: oci:IdentityDataPlane:GeneratedScopedAccessToken
properties:
    publicKey: string
    scope: string
Copy

GeneratedScopedAccessToken Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The GeneratedScopedAccessToken resource accepts the following input properties:

PublicKey
This property is required.
Changes to this property will trigger replacement.
string
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
Scope
This property is required.
Changes to this property will trigger replacement.
string

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

PublicKey
This property is required.
Changes to this property will trigger replacement.
string
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
Scope
This property is required.
Changes to this property will trigger replacement.
string

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

publicKey
This property is required.
Changes to this property will trigger replacement.
String
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
scope
This property is required.
Changes to this property will trigger replacement.
String

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

publicKey
This property is required.
Changes to this property will trigger replacement.
string
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
scope
This property is required.
Changes to this property will trigger replacement.
string

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

public_key
This property is required.
Changes to this property will trigger replacement.
str
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
scope
This property is required.
Changes to this property will trigger replacement.
str

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

publicKey
This property is required.
Changes to this property will trigger replacement.
String
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
scope
This property is required.
Changes to this property will trigger replacement.
String

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Outputs

All input properties are implicitly available as output properties. Additionally, the GeneratedScopedAccessToken resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Token string
The security token, signed by auth service
Id string
The provider-assigned unique ID for this managed resource.
Token string
The security token, signed by auth service
id String
The provider-assigned unique ID for this managed resource.
token String
The security token, signed by auth service
id string
The provider-assigned unique ID for this managed resource.
token string
The security token, signed by auth service
id str
The provider-assigned unique ID for this managed resource.
token str
The security token, signed by auth service
id String
The provider-assigned unique ID for this managed resource.
token String
The security token, signed by auth service

Look up Existing GeneratedScopedAccessToken Resource

Get an existing GeneratedScopedAccessToken resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: GeneratedScopedAccessTokenState, opts?: CustomResourceOptions): GeneratedScopedAccessToken
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        public_key: Optional[str] = None,
        scope: Optional[str] = None,
        token: Optional[str] = None) -> GeneratedScopedAccessToken
func GetGeneratedScopedAccessToken(ctx *Context, name string, id IDInput, state *GeneratedScopedAccessTokenState, opts ...ResourceOption) (*GeneratedScopedAccessToken, error)
public static GeneratedScopedAccessToken Get(string name, Input<string> id, GeneratedScopedAccessTokenState? state, CustomResourceOptions? opts = null)
public static GeneratedScopedAccessToken get(String name, Output<String> id, GeneratedScopedAccessTokenState state, CustomResourceOptions options)
resources:  _:    type: oci:IdentityDataPlane:GeneratedScopedAccessToken    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
PublicKey Changes to this property will trigger replacement. string
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
Scope Changes to this property will trigger replacement. string

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Token string
The security token, signed by auth service
PublicKey Changes to this property will trigger replacement. string
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
Scope Changes to this property will trigger replacement. string

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Token string
The security token, signed by auth service
publicKey Changes to this property will trigger replacement. String
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
scope Changes to this property will trigger replacement. String

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

token String
The security token, signed by auth service
publicKey Changes to this property will trigger replacement. string
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
scope Changes to this property will trigger replacement. string

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

token string
The security token, signed by auth service
public_key Changes to this property will trigger replacement. str
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
scope Changes to this property will trigger replacement. str

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

token str
The security token, signed by auth service
publicKey Changes to this property will trigger replacement. String
A temporary public key, owned by the service. The service also owns the corresponding private key. This public key will by put inside the security token by the auth service after successful validation of the certificate.
scope Changes to this property will trigger replacement. String

Scope definition for the scoped access token

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

token String
The security token, signed by auth service

Import

GenerateScopedAccessToken can be imported using the id, e.g.

$ pulumi import oci:IdentityDataPlane/generatedScopedAccessToken:GeneratedScopedAccessToken test_generate_scoped_access_token "id"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.