1. Packages
  2. AWS
  3. API Docs
  4. ssoadmin
  5. ApplicationAccessScope
AWS v6.78.0 published on Thursday, Apr 24, 2025 by Pulumi

aws.ssoadmin.ApplicationAccessScope

Explore with Pulumi AI

Resource for managing an AWS SSO Admin Application Access Scope.

Example Usage

Basic Usage

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

const example = aws.ssoadmin.getInstances({});
const exampleApplication = new aws.ssoadmin.Application("example", {
    name: "example",
    applicationProviderArn: "arn:aws:sso::aws:applicationProvider/custom",
    instanceArn: example.then(example => example.arns?.[0]),
});
const exampleApplicationAccessScope = new aws.ssoadmin.ApplicationAccessScope("example", {
    applicationArn: exampleApplication.applicationArn,
    authorizedTargets: ["arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012"],
    scope: "sso:account:access",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.ssoadmin.get_instances()
example_application = aws.ssoadmin.Application("example",
    name="example",
    application_provider_arn="arn:aws:sso::aws:applicationProvider/custom",
    instance_arn=example.arns[0])
example_application_access_scope = aws.ssoadmin.ApplicationAccessScope("example",
    application_arn=example_application.application_arn,
    authorized_targets=["arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012"],
    scope="sso:account:access")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		exampleApplication, err := ssoadmin.NewApplication(ctx, "example", &ssoadmin.ApplicationArgs{
			Name:                   pulumi.String("example"),
			ApplicationProviderArn: pulumi.String("arn:aws:sso::aws:applicationProvider/custom"),
			InstanceArn:            pulumi.String(example.Arns[0]),
		})
		if err != nil {
			return err
		}
		_, err = ssoadmin.NewApplicationAccessScope(ctx, "example", &ssoadmin.ApplicationAccessScopeArgs{
			ApplicationArn: exampleApplication.ApplicationArn,
			AuthorizedTargets: pulumi.StringArray{
				pulumi.String("arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012"),
			},
			Scope: pulumi.String("sso:account:access"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.SsoAdmin.GetInstances.Invoke();

    var exampleApplication = new Aws.SsoAdmin.Application("example", new()
    {
        Name = "example",
        ApplicationProviderArn = "arn:aws:sso::aws:applicationProvider/custom",
        InstanceArn = example.Apply(getInstancesResult => getInstancesResult.Arns[0]),
    });

    var exampleApplicationAccessScope = new Aws.SsoAdmin.ApplicationAccessScope("example", new()
    {
        ApplicationArn = exampleApplication.ApplicationArn,
        AuthorizedTargets = new[]
        {
            "arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012",
        },
        Scope = "sso:account:access",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssoadmin.SsoadminFunctions;
import com.pulumi.aws.ssoadmin.Application;
import com.pulumi.aws.ssoadmin.ApplicationArgs;
import com.pulumi.aws.ssoadmin.ApplicationAccessScope;
import com.pulumi.aws.ssoadmin.ApplicationAccessScopeArgs;
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 example = SsoadminFunctions.getInstances(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);

        var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
            .name("example")
            .applicationProviderArn("arn:aws:sso::aws:applicationProvider/custom")
            .instanceArn(example.arns()[0])
            .build());

        var exampleApplicationAccessScope = new ApplicationAccessScope("exampleApplicationAccessScope", ApplicationAccessScopeArgs.builder()
            .applicationArn(exampleApplication.applicationArn())
            .authorizedTargets("arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012")
            .scope("sso:account:access")
            .build());

    }
}
Copy
resources:
  exampleApplication:
    type: aws:ssoadmin:Application
    name: example
    properties:
      name: example
      applicationProviderArn: arn:aws:sso::aws:applicationProvider/custom
      instanceArn: ${example.arns[0]}
  exampleApplicationAccessScope:
    type: aws:ssoadmin:ApplicationAccessScope
    name: example
    properties:
      applicationArn: ${exampleApplication.applicationArn}
      authorizedTargets:
        - arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012
      scope: sso:account:access
variables:
  example:
    fn::invoke:
      function: aws:ssoadmin:getInstances
      arguments: {}
Copy

Create ApplicationAccessScope Resource

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

Constructor syntax

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

@overload
def ApplicationAccessScope(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           application_arn: Optional[str] = None,
                           scope: Optional[str] = None,
                           authorized_targets: Optional[Sequence[str]] = None)
func NewApplicationAccessScope(ctx *Context, name string, args ApplicationAccessScopeArgs, opts ...ResourceOption) (*ApplicationAccessScope, error)
public ApplicationAccessScope(string name, ApplicationAccessScopeArgs args, CustomResourceOptions? opts = null)
public ApplicationAccessScope(String name, ApplicationAccessScopeArgs args)
public ApplicationAccessScope(String name, ApplicationAccessScopeArgs args, CustomResourceOptions options)
type: aws:ssoadmin:ApplicationAccessScope
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. ApplicationAccessScopeArgs
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. ApplicationAccessScopeArgs
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. ApplicationAccessScopeArgs
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. ApplicationAccessScopeArgs
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. ApplicationAccessScopeArgs
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 applicationAccessScopeResource = new Aws.SsoAdmin.ApplicationAccessScope("applicationAccessScopeResource", new()
{
    ApplicationArn = "string",
    Scope = "string",
    AuthorizedTargets = new[]
    {
        "string",
    },
});
Copy
example, err := ssoadmin.NewApplicationAccessScope(ctx, "applicationAccessScopeResource", &ssoadmin.ApplicationAccessScopeArgs{
	ApplicationArn: pulumi.String("string"),
	Scope:          pulumi.String("string"),
	AuthorizedTargets: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var applicationAccessScopeResource = new ApplicationAccessScope("applicationAccessScopeResource", ApplicationAccessScopeArgs.builder()
    .applicationArn("string")
    .scope("string")
    .authorizedTargets("string")
    .build());
Copy
application_access_scope_resource = aws.ssoadmin.ApplicationAccessScope("applicationAccessScopeResource",
    application_arn="string",
    scope="string",
    authorized_targets=["string"])
Copy
const applicationAccessScopeResource = new aws.ssoadmin.ApplicationAccessScope("applicationAccessScopeResource", {
    applicationArn: "string",
    scope: "string",
    authorizedTargets: ["string"],
});
Copy
type: aws:ssoadmin:ApplicationAccessScope
properties:
    applicationArn: string
    authorizedTargets:
        - string
    scope: string
Copy

ApplicationAccessScope 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 ApplicationAccessScope resource accepts the following input properties:

ApplicationArn This property is required. string
Specifies the ARN of the application with the access scope with the targets to add or update.
Scope This property is required. string

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

AuthorizedTargets List<string>
Specifies an array list of ARNs that represent the authorized targets for this access scope.
ApplicationArn This property is required. string
Specifies the ARN of the application with the access scope with the targets to add or update.
Scope This property is required. string

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

AuthorizedTargets []string
Specifies an array list of ARNs that represent the authorized targets for this access scope.
applicationArn This property is required. String
Specifies the ARN of the application with the access scope with the targets to add or update.
scope This property is required. String

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

authorizedTargets List<String>
Specifies an array list of ARNs that represent the authorized targets for this access scope.
applicationArn This property is required. string
Specifies the ARN of the application with the access scope with the targets to add or update.
scope This property is required. string

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

authorizedTargets string[]
Specifies an array list of ARNs that represent the authorized targets for this access scope.
application_arn This property is required. str
Specifies the ARN of the application with the access scope with the targets to add or update.
scope This property is required. str

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

authorized_targets Sequence[str]
Specifies an array list of ARNs that represent the authorized targets for this access scope.
applicationArn This property is required. String
Specifies the ARN of the application with the access scope with the targets to add or update.
scope This property is required. String

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

authorizedTargets List<String>
Specifies an array list of ARNs that represent the authorized targets for this access scope.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ApplicationAccessScope Resource

Get an existing ApplicationAccessScope 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?: ApplicationAccessScopeState, opts?: CustomResourceOptions): ApplicationAccessScope
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_arn: Optional[str] = None,
        authorized_targets: Optional[Sequence[str]] = None,
        scope: Optional[str] = None) -> ApplicationAccessScope
func GetApplicationAccessScope(ctx *Context, name string, id IDInput, state *ApplicationAccessScopeState, opts ...ResourceOption) (*ApplicationAccessScope, error)
public static ApplicationAccessScope Get(string name, Input<string> id, ApplicationAccessScopeState? state, CustomResourceOptions? opts = null)
public static ApplicationAccessScope get(String name, Output<String> id, ApplicationAccessScopeState state, CustomResourceOptions options)
resources:  _:    type: aws:ssoadmin:ApplicationAccessScope    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:
ApplicationArn string
Specifies the ARN of the application with the access scope with the targets to add or update.
AuthorizedTargets List<string>
Specifies an array list of ARNs that represent the authorized targets for this access scope.
Scope string

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

ApplicationArn string
Specifies the ARN of the application with the access scope with the targets to add or update.
AuthorizedTargets []string
Specifies an array list of ARNs that represent the authorized targets for this access scope.
Scope string

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

applicationArn String
Specifies the ARN of the application with the access scope with the targets to add or update.
authorizedTargets List<String>
Specifies an array list of ARNs that represent the authorized targets for this access scope.
scope String

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

applicationArn string
Specifies the ARN of the application with the access scope with the targets to add or update.
authorizedTargets string[]
Specifies an array list of ARNs that represent the authorized targets for this access scope.
scope string

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

application_arn str
Specifies the ARN of the application with the access scope with the targets to add or update.
authorized_targets Sequence[str]
Specifies an array list of ARNs that represent the authorized targets for this access scope.
scope str

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

applicationArn String
Specifies the ARN of the application with the access scope with the targets to add or update.
authorizedTargets List<String>
Specifies an array list of ARNs that represent the authorized targets for this access scope.
scope String

Specifies the name of the access scope to be associated with the specified targets.

The following arguments are optional:

Import

Using pulumi import, import SSO Admin Application Access Scope using the id. For example:

$ pulumi import aws:ssoadmin/applicationAccessScope:ApplicationAccessScope example arn:aws:sso::123456789012:application/ssoins-123456789012/apl-123456789012,sso:account:access
Copy

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

Package Details

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