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",
});
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")
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
})
}
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",
});
});
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();
var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
.name("example")
.applicationProviderArn("arn:aws:sso::aws:applicationProvider/custom")
.instanceArn(example.applyValue(getInstancesResult -> getInstancesResult.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());
}
}
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: {}
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 string
- The unique name of the resource.
- args ApplicationAccessScopeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ApplicationAccessScopeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationAccessScopeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
},
});
example, err := ssoadmin.NewApplicationAccessScope(ctx, "applicationAccessScopeResource", &ssoadmin.ApplicationAccessScopeArgs{
ApplicationArn: pulumi.String("string"),
Scope: pulumi.String("string"),
AuthorizedTargets: pulumi.StringArray{
pulumi.String("string"),
},
})
var applicationAccessScopeResource = new ApplicationAccessScope("applicationAccessScopeResource", ApplicationAccessScopeArgs.builder()
.applicationArn("string")
.scope("string")
.authorizedTargets("string")
.build());
application_access_scope_resource = aws.ssoadmin.ApplicationAccessScope("applicationAccessScopeResource",
application_arn="string",
scope="string",
authorized_targets=["string"])
const applicationAccessScopeResource = new aws.ssoadmin.ApplicationAccessScope("applicationAccessScopeResource", {
applicationArn: "string",
scope: "string",
authorizedTargets: ["string"],
});
type: aws:ssoadmin:ApplicationAccessScope
properties:
applicationArn: string
authorizedTargets:
- string
scope: string
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:
- Application
Arn string - Specifies the ARN of the application with the access scope with the targets to add or update.
- Scope string
Specifies the name of the access scope to be associated with the specified targets.
The following arguments are optional:
- List<string>
- Specifies an array list of ARNs that represent the authorized targets for this access scope.
- Application
Arn string - Specifies the ARN of the application with the access scope with the targets to add or update.
- Scope string
Specifies the name of the access scope to be associated with the specified targets.
The following arguments are optional:
- []string
- Specifies an array list of ARNs that represent the authorized targets for this access scope.
- application
Arn String - Specifies the ARN of the application with the access scope with the targets to add or update.
- scope String
Specifies the name of the access scope to be associated with the specified targets.
The following arguments are optional:
- List<String>
- Specifies an array list of ARNs that represent the authorized targets for this access scope.
- application
Arn string - Specifies the ARN of the application with the access scope with the targets to add or update.
- scope string
Specifies the name of the access scope to be associated with the specified targets.
The following arguments are optional:
- string[]
- Specifies an array list of ARNs that represent the authorized targets for this access scope.
- application_
arn str - Specifies the ARN of the application with the access scope with the targets to add or update.
- scope str
Specifies the name of the access scope to be associated with the specified targets.
The following arguments are optional:
- Sequence[str]
- Specifies an array list of ARNs that represent the authorized targets for this access scope.
- application
Arn String - Specifies the ARN of the application with the access scope with the targets to add or update.
- scope String
Specifies the name of the access scope to be associated with the specified targets.
The following arguments are optional:
- 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Application
Arn string - Specifies the ARN of the application with the access scope with the targets to add or update.
- 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:
- Application
Arn string - Specifies the ARN of the application with the access scope with the targets to add or update.
- []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 String - Specifies the ARN of the application with the access scope with the targets to add or update.
- 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:
- application
Arn string - Specifies the ARN of the application with the access scope with the targets to add or update.
- 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.
- 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:
- application
Arn String - Specifies the ARN of the application with the access scope with the targets to add or update.
- 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
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.