@pulumi/aws 6.13.1 → 6.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.PodIdentityAssociation = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * Resource for managing an AWS EKS (Elastic Kubernetes) Pod Identity Association.
10
+ *
11
+ * Creates an EKS Pod Identity association between a service account in an Amazon EKS cluster and an IAM role with EKS Pod Identity. Use EKS Pod Identity to give temporary IAM credentials to pods and the credentials are rotated automatically.
12
+ *
13
+ * Amazon EKS Pod Identity associations provide the ability to manage credentials for your applications, similar to the way that EC2 instance profiles provide credentials to Amazon EC2 instances.
14
+ *
15
+ * If a pod uses a service account that has an association, Amazon EKS sets environment variables in the containers of the pod. The environment variables configure the Amazon Web Services SDKs, including the Command Line Interface, to use the EKS Pod Identity credentials.
16
+ *
17
+ * Pod Identity is a simpler method than IAM roles for service accounts, as this method doesn’t use OIDC identity providers. Additionally, you can configure a role for Pod Identity once, and reuse it across clusters.
18
+ *
19
+ * ## Example Usage
20
+ * ### Basic Usage
21
+ *
22
+ * ```typescript
23
+ * import * as pulumi from "@pulumi/pulumi";
24
+ * import * as aws from "@pulumi/aws";
25
+ *
26
+ * const assumeRole = aws.iam.getPolicyDocument({
27
+ * statements: [{
28
+ * effect: "Allow",
29
+ * principals: [{
30
+ * type: "Service",
31
+ * identifiers: ["pods.eks.amazonaws.com"],
32
+ * }],
33
+ * actions: [
34
+ * "sts:AssumeRole",
35
+ * "sts:TagSession",
36
+ * ],
37
+ * }],
38
+ * });
39
+ * const exampleRole = new aws.iam.Role("exampleRole", {assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json)});
40
+ * const exampleS3 = new aws.iam.RolePolicyAttachment("exampleS3", {
41
+ * policyArn: "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess",
42
+ * role: exampleRole.name,
43
+ * });
44
+ * const examplePodIdentityAssociation = new aws.eks.PodIdentityAssociation("examplePodIdentityAssociation", {
45
+ * clusterName: aws_eks_cluster.example.name,
46
+ * namespace: "example",
47
+ * serviceAccount: "example-sa",
48
+ * roleArn: exampleRole.arn,
49
+ * });
50
+ * ```
51
+ *
52
+ * ## Import
53
+ *
54
+ * Using `pulumi import`, import EKS (Elastic Kubernetes) Pod Identity Association using the `cluster_name` and `association_id` separated by a comma (`,`). For example:
55
+ *
56
+ * ```sh
57
+ * $ pulumi import aws:eks/podIdentityAssociation:PodIdentityAssociation example example,a-12345678
58
+ * ```
59
+ */
60
+ class PodIdentityAssociation extends pulumi.CustomResource {
61
+ /**
62
+ * Get an existing PodIdentityAssociation resource's state with the given name, ID, and optional extra
63
+ * properties used to qualify the lookup.
64
+ *
65
+ * @param name The _unique_ name of the resulting resource.
66
+ * @param id The _unique_ provider ID of the resource to lookup.
67
+ * @param state Any extra arguments used during the lookup.
68
+ * @param opts Optional settings to control the behavior of the CustomResource.
69
+ */
70
+ static get(name, id, state, opts) {
71
+ return new PodIdentityAssociation(name, state, Object.assign(Object.assign({}, opts), { id: id }));
72
+ }
73
+ /**
74
+ * Returns true if the given object is an instance of PodIdentityAssociation. This is designed to work even
75
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
76
+ */
77
+ static isInstance(obj) {
78
+ if (obj === undefined || obj === null) {
79
+ return false;
80
+ }
81
+ return obj['__pulumiType'] === PodIdentityAssociation.__pulumiType;
82
+ }
83
+ constructor(name, argsOrState, opts) {
84
+ let resourceInputs = {};
85
+ opts = opts || {};
86
+ if (opts.id) {
87
+ const state = argsOrState;
88
+ resourceInputs["associationArn"] = state ? state.associationArn : undefined;
89
+ resourceInputs["associationId"] = state ? state.associationId : undefined;
90
+ resourceInputs["clusterName"] = state ? state.clusterName : undefined;
91
+ resourceInputs["namespace"] = state ? state.namespace : undefined;
92
+ resourceInputs["roleArn"] = state ? state.roleArn : undefined;
93
+ resourceInputs["serviceAccount"] = state ? state.serviceAccount : undefined;
94
+ resourceInputs["tags"] = state ? state.tags : undefined;
95
+ resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
96
+ }
97
+ else {
98
+ const args = argsOrState;
99
+ if ((!args || args.clusterName === undefined) && !opts.urn) {
100
+ throw new Error("Missing required property 'clusterName'");
101
+ }
102
+ if ((!args || args.namespace === undefined) && !opts.urn) {
103
+ throw new Error("Missing required property 'namespace'");
104
+ }
105
+ if ((!args || args.roleArn === undefined) && !opts.urn) {
106
+ throw new Error("Missing required property 'roleArn'");
107
+ }
108
+ if ((!args || args.serviceAccount === undefined) && !opts.urn) {
109
+ throw new Error("Missing required property 'serviceAccount'");
110
+ }
111
+ resourceInputs["clusterName"] = args ? args.clusterName : undefined;
112
+ resourceInputs["namespace"] = args ? args.namespace : undefined;
113
+ resourceInputs["roleArn"] = args ? args.roleArn : undefined;
114
+ resourceInputs["serviceAccount"] = args ? args.serviceAccount : undefined;
115
+ resourceInputs["tags"] = args ? args.tags : undefined;
116
+ resourceInputs["associationArn"] = undefined /*out*/;
117
+ resourceInputs["associationId"] = undefined /*out*/;
118
+ resourceInputs["tagsAll"] = undefined /*out*/;
119
+ }
120
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
121
+ const secretOpts = { additionalSecretOutputs: ["tagsAll"] };
122
+ opts = pulumi.mergeOptions(opts, secretOpts);
123
+ super(PodIdentityAssociation.__pulumiType, name, resourceInputs, opts);
124
+ }
125
+ }
126
+ exports.PodIdentityAssociation = PodIdentityAssociation;
127
+ /** @internal */
128
+ PodIdentityAssociation.__pulumiType = 'aws:eks/podIdentityAssociation:PodIdentityAssociation';
129
+ //# sourceMappingURL=podIdentityAssociation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"podIdentityAssociation.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4
  "description": "A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.",
5
5
  "keywords": [
6
6
  "pulumi",
@@ -0,0 +1,198 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "../types/input";
3
+ import * as outputs from "../types/output";
4
+ /**
5
+ * Provides a resource to manage an S3 Access Grant.
6
+ * Each access grant has its own ID and gives an IAM user or role or a directory user, or group (the grantee) access to a registered location. You determine the level of access, such as `READ` or `READWRITE`.
7
+ * Before you can create a grant, you must have an S3 Access Grants instance in the same Region as the S3 data.
8
+ *
9
+ * ## Example Usage
10
+ *
11
+ * ```typescript
12
+ * import * as pulumi from "@pulumi/pulumi";
13
+ * import * as aws from "@pulumi/aws";
14
+ *
15
+ * const exampleAccessGrantsInstance = new aws.s3control.AccessGrantsInstance("exampleAccessGrantsInstance", {});
16
+ * const exampleAccessGrantsLocation = new aws.s3control.AccessGrantsLocation("exampleAccessGrantsLocation", {
17
+ * iamRoleArn: aws_iam_role.example.arn,
18
+ * locationScope: `s3://${aws_s3_bucket.example.bucket}/prefixA*`,
19
+ * }, {
20
+ * dependsOn: [exampleAccessGrantsInstance],
21
+ * });
22
+ * const exampleAccessGrant = new aws.s3control.AccessGrant("exampleAccessGrant", {
23
+ * accessGrantsLocationId: exampleAccessGrantsLocation.accessGrantsLocationId,
24
+ * permission: "READ",
25
+ * accessGrantsLocationConfiguration: {
26
+ * s3SubPrefix: "prefixB*",
27
+ * },
28
+ * grantee: {
29
+ * granteeType: "IAM",
30
+ * granteeIdentifier: aws_iam_user.example.arn,
31
+ * },
32
+ * });
33
+ * ```
34
+ *
35
+ * ## Import
36
+ *
37
+ * Using `pulumi import`, import S3 Access Grants using the `account_id` and `access_grant_id`, separated by a comma (`,`). For example:
38
+ *
39
+ * ```sh
40
+ * $ pulumi import aws:s3control/accessGrant:AccessGrant example 123456789012,04549c5e-2f3c-4a07-824d-2cafe720aa22
41
+ * ```
42
+ */
43
+ export declare class AccessGrant extends pulumi.CustomResource {
44
+ /**
45
+ * Get an existing AccessGrant resource's state with the given name, ID, and optional extra
46
+ * properties used to qualify the lookup.
47
+ *
48
+ * @param name The _unique_ name of the resulting resource.
49
+ * @param id The _unique_ provider ID of the resource to lookup.
50
+ * @param state Any extra arguments used during the lookup.
51
+ * @param opts Optional settings to control the behavior of the CustomResource.
52
+ */
53
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccessGrantState, opts?: pulumi.CustomResourceOptions): AccessGrant;
54
+ /**
55
+ * Returns true if the given object is an instance of AccessGrant. This is designed to work even
56
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
57
+ */
58
+ static isInstance(obj: any): obj is AccessGrant;
59
+ /**
60
+ * Amazon Resource Name (ARN) of the S3 Access Grant.
61
+ */
62
+ readonly accessGrantArn: pulumi.Output<string>;
63
+ /**
64
+ * Unique ID of the S3 Access Grant.
65
+ */
66
+ readonly accessGrantId: pulumi.Output<string>;
67
+ /**
68
+ * See Location Configuration below for more details.
69
+ */
70
+ readonly accessGrantsLocationConfiguration: pulumi.Output<outputs.s3control.AccessGrantAccessGrantsLocationConfiguration | undefined>;
71
+ /**
72
+ * The ID of the S3 Access Grants location to with the access grant is giving access.
73
+ */
74
+ readonly accessGrantsLocationId: pulumi.Output<string>;
75
+ readonly accountId: pulumi.Output<string>;
76
+ /**
77
+ * The access grant's scope.
78
+ */
79
+ readonly grantScope: pulumi.Output<string>;
80
+ /**
81
+ * See Grantee below for more details.
82
+ */
83
+ readonly grantee: pulumi.Output<outputs.s3control.AccessGrantGrantee | undefined>;
84
+ /**
85
+ * The access grant's level of access. Valid values: `READ`, `WRITE`, `READWRITE`.
86
+ */
87
+ readonly permission: pulumi.Output<string>;
88
+ /**
89
+ * If you are creating an access grant that grants access to only one object, set this to `Object`. Valid values: `Object`.
90
+ */
91
+ readonly s3PrefixType: pulumi.Output<string | undefined>;
92
+ /**
93
+ * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
94
+ */
95
+ readonly tags: pulumi.Output<{
96
+ [key: string]: string;
97
+ } | undefined>;
98
+ /**
99
+ * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
100
+ *
101
+ * @deprecated Please use `tags` instead.
102
+ */
103
+ readonly tagsAll: pulumi.Output<{
104
+ [key: string]: string;
105
+ }>;
106
+ /**
107
+ * Create a AccessGrant resource with the given unique name, arguments, and options.
108
+ *
109
+ * @param name The _unique_ name of the resource.
110
+ * @param args The arguments to use to populate this resource's properties.
111
+ * @param opts A bag of options that control this resource's behavior.
112
+ */
113
+ constructor(name: string, args: AccessGrantArgs, opts?: pulumi.CustomResourceOptions);
114
+ }
115
+ /**
116
+ * Input properties used for looking up and filtering AccessGrant resources.
117
+ */
118
+ export interface AccessGrantState {
119
+ /**
120
+ * Amazon Resource Name (ARN) of the S3 Access Grant.
121
+ */
122
+ accessGrantArn?: pulumi.Input<string>;
123
+ /**
124
+ * Unique ID of the S3 Access Grant.
125
+ */
126
+ accessGrantId?: pulumi.Input<string>;
127
+ /**
128
+ * See Location Configuration below for more details.
129
+ */
130
+ accessGrantsLocationConfiguration?: pulumi.Input<inputs.s3control.AccessGrantAccessGrantsLocationConfiguration>;
131
+ /**
132
+ * The ID of the S3 Access Grants location to with the access grant is giving access.
133
+ */
134
+ accessGrantsLocationId?: pulumi.Input<string>;
135
+ accountId?: pulumi.Input<string>;
136
+ /**
137
+ * The access grant's scope.
138
+ */
139
+ grantScope?: pulumi.Input<string>;
140
+ /**
141
+ * See Grantee below for more details.
142
+ */
143
+ grantee?: pulumi.Input<inputs.s3control.AccessGrantGrantee>;
144
+ /**
145
+ * The access grant's level of access. Valid values: `READ`, `WRITE`, `READWRITE`.
146
+ */
147
+ permission?: pulumi.Input<string>;
148
+ /**
149
+ * If you are creating an access grant that grants access to only one object, set this to `Object`. Valid values: `Object`.
150
+ */
151
+ s3PrefixType?: pulumi.Input<string>;
152
+ /**
153
+ * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
154
+ */
155
+ tags?: pulumi.Input<{
156
+ [key: string]: pulumi.Input<string>;
157
+ }>;
158
+ /**
159
+ * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
160
+ *
161
+ * @deprecated Please use `tags` instead.
162
+ */
163
+ tagsAll?: pulumi.Input<{
164
+ [key: string]: pulumi.Input<string>;
165
+ }>;
166
+ }
167
+ /**
168
+ * The set of arguments for constructing a AccessGrant resource.
169
+ */
170
+ export interface AccessGrantArgs {
171
+ /**
172
+ * See Location Configuration below for more details.
173
+ */
174
+ accessGrantsLocationConfiguration?: pulumi.Input<inputs.s3control.AccessGrantAccessGrantsLocationConfiguration>;
175
+ /**
176
+ * The ID of the S3 Access Grants location to with the access grant is giving access.
177
+ */
178
+ accessGrantsLocationId: pulumi.Input<string>;
179
+ accountId?: pulumi.Input<string>;
180
+ /**
181
+ * See Grantee below for more details.
182
+ */
183
+ grantee?: pulumi.Input<inputs.s3control.AccessGrantGrantee>;
184
+ /**
185
+ * The access grant's level of access. Valid values: `READ`, `WRITE`, `READWRITE`.
186
+ */
187
+ permission: pulumi.Input<string>;
188
+ /**
189
+ * If you are creating an access grant that grants access to only one object, set this to `Object`. Valid values: `Object`.
190
+ */
191
+ s3PrefixType?: pulumi.Input<string>;
192
+ /**
193
+ * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
194
+ */
195
+ tags?: pulumi.Input<{
196
+ [key: string]: pulumi.Input<string>;
197
+ }>;
198
+ }
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.AccessGrant = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * Provides a resource to manage an S3 Access Grant.
10
+ * Each access grant has its own ID and gives an IAM user or role or a directory user, or group (the grantee) access to a registered location. You determine the level of access, such as `READ` or `READWRITE`.
11
+ * Before you can create a grant, you must have an S3 Access Grants instance in the same Region as the S3 data.
12
+ *
13
+ * ## Example Usage
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as aws from "@pulumi/aws";
18
+ *
19
+ * const exampleAccessGrantsInstance = new aws.s3control.AccessGrantsInstance("exampleAccessGrantsInstance", {});
20
+ * const exampleAccessGrantsLocation = new aws.s3control.AccessGrantsLocation("exampleAccessGrantsLocation", {
21
+ * iamRoleArn: aws_iam_role.example.arn,
22
+ * locationScope: `s3://${aws_s3_bucket.example.bucket}/prefixA*`,
23
+ * }, {
24
+ * dependsOn: [exampleAccessGrantsInstance],
25
+ * });
26
+ * const exampleAccessGrant = new aws.s3control.AccessGrant("exampleAccessGrant", {
27
+ * accessGrantsLocationId: exampleAccessGrantsLocation.accessGrantsLocationId,
28
+ * permission: "READ",
29
+ * accessGrantsLocationConfiguration: {
30
+ * s3SubPrefix: "prefixB*",
31
+ * },
32
+ * grantee: {
33
+ * granteeType: "IAM",
34
+ * granteeIdentifier: aws_iam_user.example.arn,
35
+ * },
36
+ * });
37
+ * ```
38
+ *
39
+ * ## Import
40
+ *
41
+ * Using `pulumi import`, import S3 Access Grants using the `account_id` and `access_grant_id`, separated by a comma (`,`). For example:
42
+ *
43
+ * ```sh
44
+ * $ pulumi import aws:s3control/accessGrant:AccessGrant example 123456789012,04549c5e-2f3c-4a07-824d-2cafe720aa22
45
+ * ```
46
+ */
47
+ class AccessGrant extends pulumi.CustomResource {
48
+ /**
49
+ * Get an existing AccessGrant resource's state with the given name, ID, and optional extra
50
+ * properties used to qualify the lookup.
51
+ *
52
+ * @param name The _unique_ name of the resulting resource.
53
+ * @param id The _unique_ provider ID of the resource to lookup.
54
+ * @param state Any extra arguments used during the lookup.
55
+ * @param opts Optional settings to control the behavior of the CustomResource.
56
+ */
57
+ static get(name, id, state, opts) {
58
+ return new AccessGrant(name, state, Object.assign(Object.assign({}, opts), { id: id }));
59
+ }
60
+ /**
61
+ * Returns true if the given object is an instance of AccessGrant. This is designed to work even
62
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
63
+ */
64
+ static isInstance(obj) {
65
+ if (obj === undefined || obj === null) {
66
+ return false;
67
+ }
68
+ return obj['__pulumiType'] === AccessGrant.__pulumiType;
69
+ }
70
+ constructor(name, argsOrState, opts) {
71
+ let resourceInputs = {};
72
+ opts = opts || {};
73
+ if (opts.id) {
74
+ const state = argsOrState;
75
+ resourceInputs["accessGrantArn"] = state ? state.accessGrantArn : undefined;
76
+ resourceInputs["accessGrantId"] = state ? state.accessGrantId : undefined;
77
+ resourceInputs["accessGrantsLocationConfiguration"] = state ? state.accessGrantsLocationConfiguration : undefined;
78
+ resourceInputs["accessGrantsLocationId"] = state ? state.accessGrantsLocationId : undefined;
79
+ resourceInputs["accountId"] = state ? state.accountId : undefined;
80
+ resourceInputs["grantScope"] = state ? state.grantScope : undefined;
81
+ resourceInputs["grantee"] = state ? state.grantee : undefined;
82
+ resourceInputs["permission"] = state ? state.permission : undefined;
83
+ resourceInputs["s3PrefixType"] = state ? state.s3PrefixType : undefined;
84
+ resourceInputs["tags"] = state ? state.tags : undefined;
85
+ resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
86
+ }
87
+ else {
88
+ const args = argsOrState;
89
+ if ((!args || args.accessGrantsLocationId === undefined) && !opts.urn) {
90
+ throw new Error("Missing required property 'accessGrantsLocationId'");
91
+ }
92
+ if ((!args || args.permission === undefined) && !opts.urn) {
93
+ throw new Error("Missing required property 'permission'");
94
+ }
95
+ resourceInputs["accessGrantsLocationConfiguration"] = args ? args.accessGrantsLocationConfiguration : undefined;
96
+ resourceInputs["accessGrantsLocationId"] = args ? args.accessGrantsLocationId : undefined;
97
+ resourceInputs["accountId"] = args ? args.accountId : undefined;
98
+ resourceInputs["grantee"] = args ? args.grantee : undefined;
99
+ resourceInputs["permission"] = args ? args.permission : undefined;
100
+ resourceInputs["s3PrefixType"] = args ? args.s3PrefixType : undefined;
101
+ resourceInputs["tags"] = args ? args.tags : undefined;
102
+ resourceInputs["accessGrantArn"] = undefined /*out*/;
103
+ resourceInputs["accessGrantId"] = undefined /*out*/;
104
+ resourceInputs["grantScope"] = undefined /*out*/;
105
+ resourceInputs["tagsAll"] = undefined /*out*/;
106
+ }
107
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
108
+ const secretOpts = { additionalSecretOutputs: ["tagsAll"] };
109
+ opts = pulumi.mergeOptions(opts, secretOpts);
110
+ super(AccessGrant.__pulumiType, name, resourceInputs, opts);
111
+ }
112
+ }
113
+ exports.AccessGrant = AccessGrant;
114
+ /** @internal */
115
+ AccessGrant.__pulumiType = 'aws:s3control/accessGrant:AccessGrant';
116
+ //# sourceMappingURL=accessGrant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessGrant.js","sourceRoot":"","sources":["../../s3control/accessGrant.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAIzC,0CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAClD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAClE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,WAAW,CAAC,YAAY,CAAC;IAC5D,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AAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACrD,cAAc,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACpD,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACjD,cAAc,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACjD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;;AAxHL,kCAyHC;AA3GG,gBAAgB;AACO,wBAAY,GAAG,uCAAuC,CAAC"}
@@ -0,0 +1,139 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Provides a resource to manage an S3 Access Grants instance, which serves as a logical grouping for access grants.
4
+ * You can have one S3 Access Grants instance per Region in your account.
5
+ *
6
+ * ## Example Usage
7
+ * ### Basic Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as aws from "@pulumi/aws";
12
+ *
13
+ * const example = new aws.s3control.AccessGrantsInstance("example", {});
14
+ * ```
15
+ * ### AWS IAM Identity Center
16
+ *
17
+ * ```typescript
18
+ * import * as pulumi from "@pulumi/pulumi";
19
+ * import * as aws from "@pulumi/aws";
20
+ *
21
+ * const example = new aws.s3control.AccessGrantsInstance("example", {identityCenterArn: "arn:aws:sso:::instance/ssoins-890759e9c7bfdc1d"});
22
+ * ```
23
+ *
24
+ * ## Import
25
+ *
26
+ * Using `pulumi import`, import S3 Access Grants instances using the `account_id`. For example:
27
+ *
28
+ * ```sh
29
+ * $ pulumi import aws:s3control/accessGrantsInstance:AccessGrantsInstance example 123456789012
30
+ * ```
31
+ */
32
+ export declare class AccessGrantsInstance extends pulumi.CustomResource {
33
+ /**
34
+ * Get an existing AccessGrantsInstance resource's state with the given name, ID, and optional extra
35
+ * properties used to qualify the lookup.
36
+ *
37
+ * @param name The _unique_ name of the resulting resource.
38
+ * @param id The _unique_ provider ID of the resource to lookup.
39
+ * @param state Any extra arguments used during the lookup.
40
+ * @param opts Optional settings to control the behavior of the CustomResource.
41
+ */
42
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccessGrantsInstanceState, opts?: pulumi.CustomResourceOptions): AccessGrantsInstance;
43
+ /**
44
+ * Returns true if the given object is an instance of AccessGrantsInstance. This is designed to work even
45
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
46
+ */
47
+ static isInstance(obj: any): obj is AccessGrantsInstance;
48
+ /**
49
+ * Amazon Resource Name (ARN) of the S3 Access Grants instance.
50
+ */
51
+ readonly accessGrantsInstanceArn: pulumi.Output<string>;
52
+ /**
53
+ * Unique ID of the S3 Access Grants instance.
54
+ */
55
+ readonly accessGrantsInstanceId: pulumi.Output<string>;
56
+ readonly accountId: pulumi.Output<string>;
57
+ /**
58
+ * The ARN of the AWS IAM Identity Center instance application; a subresource of the original Identity Center instance.
59
+ */
60
+ readonly identityCenterApplicationArn: pulumi.Output<string>;
61
+ /**
62
+ * The ARN of the AWS IAM Identity Center instance associated with the S3 Access Grants instance.
63
+ */
64
+ readonly identityCenterArn: pulumi.Output<string | undefined>;
65
+ /**
66
+ * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
67
+ */
68
+ readonly tags: pulumi.Output<{
69
+ [key: string]: string;
70
+ } | undefined>;
71
+ /**
72
+ * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
73
+ *
74
+ * @deprecated Please use `tags` instead.
75
+ */
76
+ readonly tagsAll: pulumi.Output<{
77
+ [key: string]: string;
78
+ }>;
79
+ /**
80
+ * Create a AccessGrantsInstance resource with the given unique name, arguments, and options.
81
+ *
82
+ * @param name The _unique_ name of the resource.
83
+ * @param args The arguments to use to populate this resource's properties.
84
+ * @param opts A bag of options that control this resource's behavior.
85
+ */
86
+ constructor(name: string, args?: AccessGrantsInstanceArgs, opts?: pulumi.CustomResourceOptions);
87
+ }
88
+ /**
89
+ * Input properties used for looking up and filtering AccessGrantsInstance resources.
90
+ */
91
+ export interface AccessGrantsInstanceState {
92
+ /**
93
+ * Amazon Resource Name (ARN) of the S3 Access Grants instance.
94
+ */
95
+ accessGrantsInstanceArn?: pulumi.Input<string>;
96
+ /**
97
+ * Unique ID of the S3 Access Grants instance.
98
+ */
99
+ accessGrantsInstanceId?: pulumi.Input<string>;
100
+ accountId?: pulumi.Input<string>;
101
+ /**
102
+ * The ARN of the AWS IAM Identity Center instance application; a subresource of the original Identity Center instance.
103
+ */
104
+ identityCenterApplicationArn?: pulumi.Input<string>;
105
+ /**
106
+ * The ARN of the AWS IAM Identity Center instance associated with the S3 Access Grants instance.
107
+ */
108
+ identityCenterArn?: pulumi.Input<string>;
109
+ /**
110
+ * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
111
+ */
112
+ tags?: pulumi.Input<{
113
+ [key: string]: pulumi.Input<string>;
114
+ }>;
115
+ /**
116
+ * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
117
+ *
118
+ * @deprecated Please use `tags` instead.
119
+ */
120
+ tagsAll?: pulumi.Input<{
121
+ [key: string]: pulumi.Input<string>;
122
+ }>;
123
+ }
124
+ /**
125
+ * The set of arguments for constructing a AccessGrantsInstance resource.
126
+ */
127
+ export interface AccessGrantsInstanceArgs {
128
+ accountId?: pulumi.Input<string>;
129
+ /**
130
+ * The ARN of the AWS IAM Identity Center instance associated with the S3 Access Grants instance.
131
+ */
132
+ identityCenterArn?: pulumi.Input<string>;
133
+ /**
134
+ * Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
135
+ */
136
+ tags?: pulumi.Input<{
137
+ [key: string]: pulumi.Input<string>;
138
+ }>;
139
+ }