UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

133 lines (132 loc) 6.02 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a customer managed policy attachment for a Single Sign-On (SSO) Permission Set resource * * > **NOTE:** Creating this resource will automatically [Provision the Permission Set](https://docs.aws.amazon.com/singlesignon/latest/APIReference/API_ProvisionPermissionSet.html) to apply the corresponding updates to all assigned accounts. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ssoadmin.getInstances({}); * const examplePermissionSet = new aws.ssoadmin.PermissionSet("example", { * name: "Example", * instanceArn: example.then(example => example.arns?.[0]), * }); * const examplePolicy = new aws.iam.Policy("example", { * name: "TestPolicy", * description: "My test policy", * policy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: ["ec2:Describe*"], * Effect: "Allow", * Resource: "*", * }], * }), * }); * const exampleCustomerManagedPolicyAttachment = new aws.ssoadmin.CustomerManagedPolicyAttachment("example", { * instanceArn: examplePermissionSet.instanceArn, * permissionSetArn: examplePermissionSet.arn, * customerManagedPolicyReference: { * name: examplePolicy.name, * path: "/", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import SSO Managed Policy Attachments using the `name`, `path`, `permission_set_arn`, and `instance_arn` separated by a comma (`,`). For example: * * ```sh * $ pulumi import aws:ssoadmin/customerManagedPolicyAttachment:CustomerManagedPolicyAttachment example TestPolicy,/,arn:aws:sso:::permissionSet/ssoins-2938j0x8920sbj72/ps-80383020jr9302rk,arn:aws:sso:::instance/ssoins-2938j0x8920sbj72 * ``` */ export declare class CustomerManagedPolicyAttachment extends pulumi.CustomResource { /** * Get an existing CustomerManagedPolicyAttachment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CustomerManagedPolicyAttachmentState, opts?: pulumi.CustomResourceOptions): CustomerManagedPolicyAttachment; /** * Returns true if the given object is an instance of CustomerManagedPolicyAttachment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CustomerManagedPolicyAttachment; /** * Specifies the name and path of a customer managed policy. See below. */ readonly customerManagedPolicyReference: pulumi.Output<outputs.ssoadmin.CustomerManagedPolicyAttachmentCustomerManagedPolicyReference>; /** * The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed. */ readonly instanceArn: pulumi.Output<string>; /** * The Amazon Resource Name (ARN) of the Permission Set. */ readonly permissionSetArn: pulumi.Output<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * Create a CustomerManagedPolicyAttachment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CustomerManagedPolicyAttachmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CustomerManagedPolicyAttachment resources. */ export interface CustomerManagedPolicyAttachmentState { /** * Specifies the name and path of a customer managed policy. See below. */ customerManagedPolicyReference?: pulumi.Input<inputs.ssoadmin.CustomerManagedPolicyAttachmentCustomerManagedPolicyReference>; /** * The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed. */ instanceArn?: pulumi.Input<string>; /** * The Amazon Resource Name (ARN) of the Permission Set. */ permissionSetArn?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; } /** * The set of arguments for constructing a CustomerManagedPolicyAttachment resource. */ export interface CustomerManagedPolicyAttachmentArgs { /** * Specifies the name and path of a customer managed policy. See below. */ customerManagedPolicyReference: pulumi.Input<inputs.ssoadmin.CustomerManagedPolicyAttachmentCustomerManagedPolicyReference>; /** * The Amazon Resource Name (ARN) of the SSO Instance under which the operation will be executed. */ instanceArn: pulumi.Input<string>; /** * The Amazon Resource Name (ARN) of the Permission Set. */ permissionSetArn: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; }