github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/kms/replicaExternalKey.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package kms 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Manages a KMS multi-Region replica key that uses external key material. 16 // See the [AWS KMS Developer Guide](https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html) for more information on importing key material into multi-Region keys. 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kms" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := kms.NewExternalKey(ctx, "primary", &kms.ExternalKeyArgs{ 34 // Description: pulumi.String("Multi-Region primary key"), 35 // DeletionWindowInDays: pulumi.Int(30), 36 // MultiRegion: pulumi.Bool(true), 37 // Enabled: pulumi.Bool(true), 38 // KeyMaterialBase64: pulumi.String("..."), 39 // }) 40 // if err != nil { 41 // return err 42 // } 43 // _, err = kms.NewReplicaExternalKey(ctx, "replica", &kms.ReplicaExternalKeyArgs{ 44 // Description: pulumi.String("Multi-Region replica key"), 45 // DeletionWindowInDays: pulumi.Int(7), 46 // PrimaryKeyArn: pulumi.Any(primaryAwsKmsExternal.Arn), 47 // KeyMaterialBase64: pulumi.String("..."), 48 // }) 49 // if err != nil { 50 // return err 51 // } 52 // return nil 53 // }) 54 // } 55 // 56 // ``` 57 // <!--End PulumiCodeChooser --> 58 // 59 // ## Import 60 // 61 // Using `pulumi import`, import KMS multi-Region replica keys using the `id`. For example: 62 // 63 // ```sh 64 // $ pulumi import aws:kms/replicaExternalKey:ReplicaExternalKey example 1234abcd-12ab-34cd-56ef-1234567890ab 65 // ``` 66 type ReplicaExternalKey struct { 67 pulumi.CustomResourceState 68 69 // The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value. 70 Arn pulumi.StringOutput `pulumi:"arn"` 71 // A flag to indicate whether to bypass the key policy lockout safety check. 72 // Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. 73 // For more information, refer to the scenario in the [Default Key Policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. 74 // The default value is `false`. 75 BypassPolicyLockoutSafetyCheck pulumi.BoolPtrOutput `pulumi:"bypassPolicyLockoutSafetyCheck"` 76 // The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. 77 // If you specify a value, it must be between `7` and `30`, inclusive. If you do not specify a value, it defaults to `30`. 78 DeletionWindowInDays pulumi.IntPtrOutput `pulumi:"deletionWindowInDays"` 79 // A description of the KMS key. 80 Description pulumi.StringPtrOutput `pulumi:"description"` 81 // Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be `false`. Imported keys default to `true` unless expired. 82 Enabled pulumi.BoolOutput `pulumi:"enabled"` 83 // Whether the key material expires. Empty when pending key material import, otherwise `KEY_MATERIAL_EXPIRES` or `KEY_MATERIAL_DOES_NOT_EXPIRE`. 84 ExpirationModel pulumi.StringOutput `pulumi:"expirationModel"` 85 // The key ID of the replica key. Related multi-Region keys have the same key ID. 86 KeyId pulumi.StringOutput `pulumi:"keyId"` 87 // Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be [reimported](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material), but you cannot import different key material. 88 KeyMaterialBase64 pulumi.StringPtrOutput `pulumi:"keyMaterialBase64"` 89 // The state of the replica key. 90 KeyState pulumi.StringOutput `pulumi:"keyState"` 91 // The [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. This is a shared property of multi-Region keys. 92 KeyUsage pulumi.StringOutput `pulumi:"keyUsage"` 93 // The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. 94 Policy pulumi.StringOutput `pulumi:"policy"` 95 // The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region. 96 PrimaryKeyArn pulumi.StringOutput `pulumi:"primaryKeyArn"` 97 // A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 98 Tags pulumi.StringMapOutput `pulumi:"tags"` 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 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 103 // Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 104 ValidTo pulumi.StringPtrOutput `pulumi:"validTo"` 105 } 106 107 // NewReplicaExternalKey registers a new resource with the given unique name, arguments, and options. 108 func NewReplicaExternalKey(ctx *pulumi.Context, 109 name string, args *ReplicaExternalKeyArgs, opts ...pulumi.ResourceOption) (*ReplicaExternalKey, error) { 110 if args == nil { 111 return nil, errors.New("missing one or more required arguments") 112 } 113 114 if args.PrimaryKeyArn == nil { 115 return nil, errors.New("invalid value for required argument 'PrimaryKeyArn'") 116 } 117 if args.KeyMaterialBase64 != nil { 118 args.KeyMaterialBase64 = pulumi.ToSecret(args.KeyMaterialBase64).(pulumi.StringPtrInput) 119 } 120 secrets := pulumi.AdditionalSecretOutputs([]string{ 121 "keyMaterialBase64", 122 }) 123 opts = append(opts, secrets) 124 opts = internal.PkgResourceDefaultOpts(opts) 125 var resource ReplicaExternalKey 126 err := ctx.RegisterResource("aws:kms/replicaExternalKey:ReplicaExternalKey", name, args, &resource, opts...) 127 if err != nil { 128 return nil, err 129 } 130 return &resource, nil 131 } 132 133 // GetReplicaExternalKey gets an existing ReplicaExternalKey resource's state with the given name, ID, and optional 134 // state properties that are used to uniquely qualify the lookup (nil if not required). 135 func GetReplicaExternalKey(ctx *pulumi.Context, 136 name string, id pulumi.IDInput, state *ReplicaExternalKeyState, opts ...pulumi.ResourceOption) (*ReplicaExternalKey, error) { 137 var resource ReplicaExternalKey 138 err := ctx.ReadResource("aws:kms/replicaExternalKey:ReplicaExternalKey", name, id, state, &resource, opts...) 139 if err != nil { 140 return nil, err 141 } 142 return &resource, nil 143 } 144 145 // Input properties used for looking up and filtering ReplicaExternalKey resources. 146 type replicaExternalKeyState struct { 147 // The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value. 148 Arn *string `pulumi:"arn"` 149 // A flag to indicate whether to bypass the key policy lockout safety check. 150 // Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. 151 // For more information, refer to the scenario in the [Default Key Policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. 152 // The default value is `false`. 153 BypassPolicyLockoutSafetyCheck *bool `pulumi:"bypassPolicyLockoutSafetyCheck"` 154 // The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. 155 // If you specify a value, it must be between `7` and `30`, inclusive. If you do not specify a value, it defaults to `30`. 156 DeletionWindowInDays *int `pulumi:"deletionWindowInDays"` 157 // A description of the KMS key. 158 Description *string `pulumi:"description"` 159 // Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be `false`. Imported keys default to `true` unless expired. 160 Enabled *bool `pulumi:"enabled"` 161 // Whether the key material expires. Empty when pending key material import, otherwise `KEY_MATERIAL_EXPIRES` or `KEY_MATERIAL_DOES_NOT_EXPIRE`. 162 ExpirationModel *string `pulumi:"expirationModel"` 163 // The key ID of the replica key. Related multi-Region keys have the same key ID. 164 KeyId *string `pulumi:"keyId"` 165 // Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be [reimported](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material), but you cannot import different key material. 166 KeyMaterialBase64 *string `pulumi:"keyMaterialBase64"` 167 // The state of the replica key. 168 KeyState *string `pulumi:"keyState"` 169 // The [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. This is a shared property of multi-Region keys. 170 KeyUsage *string `pulumi:"keyUsage"` 171 // The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. 172 Policy *string `pulumi:"policy"` 173 // The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region. 174 PrimaryKeyArn *string `pulumi:"primaryKeyArn"` 175 // A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 176 Tags map[string]string `pulumi:"tags"` 177 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 178 // 179 // Deprecated: Please use `tags` instead. 180 TagsAll map[string]string `pulumi:"tagsAll"` 181 // Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 182 ValidTo *string `pulumi:"validTo"` 183 } 184 185 type ReplicaExternalKeyState struct { 186 // The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value. 187 Arn pulumi.StringPtrInput 188 // A flag to indicate whether to bypass the key policy lockout safety check. 189 // Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. 190 // For more information, refer to the scenario in the [Default Key Policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. 191 // The default value is `false`. 192 BypassPolicyLockoutSafetyCheck pulumi.BoolPtrInput 193 // The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. 194 // If you specify a value, it must be between `7` and `30`, inclusive. If you do not specify a value, it defaults to `30`. 195 DeletionWindowInDays pulumi.IntPtrInput 196 // A description of the KMS key. 197 Description pulumi.StringPtrInput 198 // Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be `false`. Imported keys default to `true` unless expired. 199 Enabled pulumi.BoolPtrInput 200 // Whether the key material expires. Empty when pending key material import, otherwise `KEY_MATERIAL_EXPIRES` or `KEY_MATERIAL_DOES_NOT_EXPIRE`. 201 ExpirationModel pulumi.StringPtrInput 202 // The key ID of the replica key. Related multi-Region keys have the same key ID. 203 KeyId pulumi.StringPtrInput 204 // Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be [reimported](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material), but you cannot import different key material. 205 KeyMaterialBase64 pulumi.StringPtrInput 206 // The state of the replica key. 207 KeyState pulumi.StringPtrInput 208 // The [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. This is a shared property of multi-Region keys. 209 KeyUsage pulumi.StringPtrInput 210 // The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. 211 Policy pulumi.StringPtrInput 212 // The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region. 213 PrimaryKeyArn pulumi.StringPtrInput 214 // A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 215 Tags pulumi.StringMapInput 216 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 217 // 218 // Deprecated: Please use `tags` instead. 219 TagsAll pulumi.StringMapInput 220 // Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 221 ValidTo pulumi.StringPtrInput 222 } 223 224 func (ReplicaExternalKeyState) ElementType() reflect.Type { 225 return reflect.TypeOf((*replicaExternalKeyState)(nil)).Elem() 226 } 227 228 type replicaExternalKeyArgs struct { 229 // A flag to indicate whether to bypass the key policy lockout safety check. 230 // Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. 231 // For more information, refer to the scenario in the [Default Key Policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. 232 // The default value is `false`. 233 BypassPolicyLockoutSafetyCheck *bool `pulumi:"bypassPolicyLockoutSafetyCheck"` 234 // The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. 235 // If you specify a value, it must be between `7` and `30`, inclusive. If you do not specify a value, it defaults to `30`. 236 DeletionWindowInDays *int `pulumi:"deletionWindowInDays"` 237 // A description of the KMS key. 238 Description *string `pulumi:"description"` 239 // Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be `false`. Imported keys default to `true` unless expired. 240 Enabled *bool `pulumi:"enabled"` 241 // Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be [reimported](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material), but you cannot import different key material. 242 KeyMaterialBase64 *string `pulumi:"keyMaterialBase64"` 243 // The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. 244 Policy *string `pulumi:"policy"` 245 // The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region. 246 PrimaryKeyArn string `pulumi:"primaryKeyArn"` 247 // A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 248 Tags map[string]string `pulumi:"tags"` 249 // Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 250 ValidTo *string `pulumi:"validTo"` 251 } 252 253 // The set of arguments for constructing a ReplicaExternalKey resource. 254 type ReplicaExternalKeyArgs struct { 255 // A flag to indicate whether to bypass the key policy lockout safety check. 256 // Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. 257 // For more information, refer to the scenario in the [Default Key Policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. 258 // The default value is `false`. 259 BypassPolicyLockoutSafetyCheck pulumi.BoolPtrInput 260 // The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. 261 // If you specify a value, it must be between `7` and `30`, inclusive. If you do not specify a value, it defaults to `30`. 262 DeletionWindowInDays pulumi.IntPtrInput 263 // A description of the KMS key. 264 Description pulumi.StringPtrInput 265 // Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be `false`. Imported keys default to `true` unless expired. 266 Enabled pulumi.BoolPtrInput 267 // Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be [reimported](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material), but you cannot import different key material. 268 KeyMaterialBase64 pulumi.StringPtrInput 269 // The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. 270 Policy pulumi.StringPtrInput 271 // The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region. 272 PrimaryKeyArn pulumi.StringInput 273 // A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 274 Tags pulumi.StringMapInput 275 // Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 276 ValidTo pulumi.StringPtrInput 277 } 278 279 func (ReplicaExternalKeyArgs) ElementType() reflect.Type { 280 return reflect.TypeOf((*replicaExternalKeyArgs)(nil)).Elem() 281 } 282 283 type ReplicaExternalKeyInput interface { 284 pulumi.Input 285 286 ToReplicaExternalKeyOutput() ReplicaExternalKeyOutput 287 ToReplicaExternalKeyOutputWithContext(ctx context.Context) ReplicaExternalKeyOutput 288 } 289 290 func (*ReplicaExternalKey) ElementType() reflect.Type { 291 return reflect.TypeOf((**ReplicaExternalKey)(nil)).Elem() 292 } 293 294 func (i *ReplicaExternalKey) ToReplicaExternalKeyOutput() ReplicaExternalKeyOutput { 295 return i.ToReplicaExternalKeyOutputWithContext(context.Background()) 296 } 297 298 func (i *ReplicaExternalKey) ToReplicaExternalKeyOutputWithContext(ctx context.Context) ReplicaExternalKeyOutput { 299 return pulumi.ToOutputWithContext(ctx, i).(ReplicaExternalKeyOutput) 300 } 301 302 // ReplicaExternalKeyArrayInput is an input type that accepts ReplicaExternalKeyArray and ReplicaExternalKeyArrayOutput values. 303 // You can construct a concrete instance of `ReplicaExternalKeyArrayInput` via: 304 // 305 // ReplicaExternalKeyArray{ ReplicaExternalKeyArgs{...} } 306 type ReplicaExternalKeyArrayInput interface { 307 pulumi.Input 308 309 ToReplicaExternalKeyArrayOutput() ReplicaExternalKeyArrayOutput 310 ToReplicaExternalKeyArrayOutputWithContext(context.Context) ReplicaExternalKeyArrayOutput 311 } 312 313 type ReplicaExternalKeyArray []ReplicaExternalKeyInput 314 315 func (ReplicaExternalKeyArray) ElementType() reflect.Type { 316 return reflect.TypeOf((*[]*ReplicaExternalKey)(nil)).Elem() 317 } 318 319 func (i ReplicaExternalKeyArray) ToReplicaExternalKeyArrayOutput() ReplicaExternalKeyArrayOutput { 320 return i.ToReplicaExternalKeyArrayOutputWithContext(context.Background()) 321 } 322 323 func (i ReplicaExternalKeyArray) ToReplicaExternalKeyArrayOutputWithContext(ctx context.Context) ReplicaExternalKeyArrayOutput { 324 return pulumi.ToOutputWithContext(ctx, i).(ReplicaExternalKeyArrayOutput) 325 } 326 327 // ReplicaExternalKeyMapInput is an input type that accepts ReplicaExternalKeyMap and ReplicaExternalKeyMapOutput values. 328 // You can construct a concrete instance of `ReplicaExternalKeyMapInput` via: 329 // 330 // ReplicaExternalKeyMap{ "key": ReplicaExternalKeyArgs{...} } 331 type ReplicaExternalKeyMapInput interface { 332 pulumi.Input 333 334 ToReplicaExternalKeyMapOutput() ReplicaExternalKeyMapOutput 335 ToReplicaExternalKeyMapOutputWithContext(context.Context) ReplicaExternalKeyMapOutput 336 } 337 338 type ReplicaExternalKeyMap map[string]ReplicaExternalKeyInput 339 340 func (ReplicaExternalKeyMap) ElementType() reflect.Type { 341 return reflect.TypeOf((*map[string]*ReplicaExternalKey)(nil)).Elem() 342 } 343 344 func (i ReplicaExternalKeyMap) ToReplicaExternalKeyMapOutput() ReplicaExternalKeyMapOutput { 345 return i.ToReplicaExternalKeyMapOutputWithContext(context.Background()) 346 } 347 348 func (i ReplicaExternalKeyMap) ToReplicaExternalKeyMapOutputWithContext(ctx context.Context) ReplicaExternalKeyMapOutput { 349 return pulumi.ToOutputWithContext(ctx, i).(ReplicaExternalKeyMapOutput) 350 } 351 352 type ReplicaExternalKeyOutput struct{ *pulumi.OutputState } 353 354 func (ReplicaExternalKeyOutput) ElementType() reflect.Type { 355 return reflect.TypeOf((**ReplicaExternalKey)(nil)).Elem() 356 } 357 358 func (o ReplicaExternalKeyOutput) ToReplicaExternalKeyOutput() ReplicaExternalKeyOutput { 359 return o 360 } 361 362 func (o ReplicaExternalKeyOutput) ToReplicaExternalKeyOutputWithContext(ctx context.Context) ReplicaExternalKeyOutput { 363 return o 364 } 365 366 // The Amazon Resource Name (ARN) of the replica key. The key ARNs of related multi-Region keys differ only in the Region value. 367 func (o ReplicaExternalKeyOutput) Arn() pulumi.StringOutput { 368 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 369 } 370 371 // A flag to indicate whether to bypass the key policy lockout safety check. 372 // Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. 373 // For more information, refer to the scenario in the [Default Key Policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) section in the _AWS Key Management Service Developer Guide_. 374 // The default value is `false`. 375 func (o ReplicaExternalKeyOutput) BypassPolicyLockoutSafetyCheck() pulumi.BoolPtrOutput { 376 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.BoolPtrOutput { return v.BypassPolicyLockoutSafetyCheck }).(pulumi.BoolPtrOutput) 377 } 378 379 // The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. 380 // If you specify a value, it must be between `7` and `30`, inclusive. If you do not specify a value, it defaults to `30`. 381 func (o ReplicaExternalKeyOutput) DeletionWindowInDays() pulumi.IntPtrOutput { 382 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.IntPtrOutput { return v.DeletionWindowInDays }).(pulumi.IntPtrOutput) 383 } 384 385 // A description of the KMS key. 386 func (o ReplicaExternalKeyOutput) Description() pulumi.StringPtrOutput { 387 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 388 } 389 390 // Specifies whether the replica key is enabled. Disabled KMS keys cannot be used in cryptographic operations. Keys pending import can only be `false`. Imported keys default to `true` unless expired. 391 func (o ReplicaExternalKeyOutput) Enabled() pulumi.BoolOutput { 392 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput) 393 } 394 395 // Whether the key material expires. Empty when pending key material import, otherwise `KEY_MATERIAL_EXPIRES` or `KEY_MATERIAL_DOES_NOT_EXPIRE`. 396 func (o ReplicaExternalKeyOutput) ExpirationModel() pulumi.StringOutput { 397 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringOutput { return v.ExpirationModel }).(pulumi.StringOutput) 398 } 399 400 // The key ID of the replica key. Related multi-Region keys have the same key ID. 401 func (o ReplicaExternalKeyOutput) KeyId() pulumi.StringOutput { 402 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringOutput { return v.KeyId }).(pulumi.StringOutput) 403 } 404 405 // Base64 encoded 256-bit symmetric encryption key material to import. The KMS key is permanently associated with this key material. The same key material can be [reimported](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material), but you cannot import different key material. 406 func (o ReplicaExternalKeyOutput) KeyMaterialBase64() pulumi.StringPtrOutput { 407 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringPtrOutput { return v.KeyMaterialBase64 }).(pulumi.StringPtrOutput) 408 } 409 410 // The state of the replica key. 411 func (o ReplicaExternalKeyOutput) KeyState() pulumi.StringOutput { 412 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringOutput { return v.KeyState }).(pulumi.StringOutput) 413 } 414 415 // The [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) for which you can use the KMS key. This is a shared property of multi-Region keys. 416 func (o ReplicaExternalKeyOutput) KeyUsage() pulumi.StringOutput { 417 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringOutput { return v.KeyUsage }).(pulumi.StringOutput) 418 } 419 420 // The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the [default key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) to the KMS key. 421 func (o ReplicaExternalKeyOutput) Policy() pulumi.StringOutput { 422 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringOutput { return v.Policy }).(pulumi.StringOutput) 423 } 424 425 // The ARN of the multi-Region primary key to replicate. The primary key must be in a different AWS Region of the same AWS Partition. You can create only one replica of a given primary key in each AWS Region. 426 func (o ReplicaExternalKeyOutput) PrimaryKeyArn() pulumi.StringOutput { 427 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringOutput { return v.PrimaryKeyArn }).(pulumi.StringOutput) 428 } 429 430 // A map of tags to assign to the replica key. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 431 func (o ReplicaExternalKeyOutput) Tags() pulumi.StringMapOutput { 432 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 433 } 434 435 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 436 // 437 // Deprecated: Please use `tags` instead. 438 func (o ReplicaExternalKeyOutput) TagsAll() pulumi.StringMapOutput { 439 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 440 } 441 442 // Time at which the imported key material expires. When the key material expires, AWS KMS deletes the key material and the key becomes unusable. If not specified, key material does not expire. Valid values: [RFC3339 time string](https://tools.ietf.org/html/rfc3339#section-5.8) (`YYYY-MM-DDTHH:MM:SSZ`) 443 func (o ReplicaExternalKeyOutput) ValidTo() pulumi.StringPtrOutput { 444 return o.ApplyT(func(v *ReplicaExternalKey) pulumi.StringPtrOutput { return v.ValidTo }).(pulumi.StringPtrOutput) 445 } 446 447 type ReplicaExternalKeyArrayOutput struct{ *pulumi.OutputState } 448 449 func (ReplicaExternalKeyArrayOutput) ElementType() reflect.Type { 450 return reflect.TypeOf((*[]*ReplicaExternalKey)(nil)).Elem() 451 } 452 453 func (o ReplicaExternalKeyArrayOutput) ToReplicaExternalKeyArrayOutput() ReplicaExternalKeyArrayOutput { 454 return o 455 } 456 457 func (o ReplicaExternalKeyArrayOutput) ToReplicaExternalKeyArrayOutputWithContext(ctx context.Context) ReplicaExternalKeyArrayOutput { 458 return o 459 } 460 461 func (o ReplicaExternalKeyArrayOutput) Index(i pulumi.IntInput) ReplicaExternalKeyOutput { 462 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicaExternalKey { 463 return vs[0].([]*ReplicaExternalKey)[vs[1].(int)] 464 }).(ReplicaExternalKeyOutput) 465 } 466 467 type ReplicaExternalKeyMapOutput struct{ *pulumi.OutputState } 468 469 func (ReplicaExternalKeyMapOutput) ElementType() reflect.Type { 470 return reflect.TypeOf((*map[string]*ReplicaExternalKey)(nil)).Elem() 471 } 472 473 func (o ReplicaExternalKeyMapOutput) ToReplicaExternalKeyMapOutput() ReplicaExternalKeyMapOutput { 474 return o 475 } 476 477 func (o ReplicaExternalKeyMapOutput) ToReplicaExternalKeyMapOutputWithContext(ctx context.Context) ReplicaExternalKeyMapOutput { 478 return o 479 } 480 481 func (o ReplicaExternalKeyMapOutput) MapIndex(k pulumi.StringInput) ReplicaExternalKeyOutput { 482 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicaExternalKey { 483 return vs[0].(map[string]*ReplicaExternalKey)[vs[1].(string)] 484 }).(ReplicaExternalKeyOutput) 485 } 486 487 func init() { 488 pulumi.RegisterInputType(reflect.TypeOf((*ReplicaExternalKeyInput)(nil)).Elem(), &ReplicaExternalKey{}) 489 pulumi.RegisterInputType(reflect.TypeOf((*ReplicaExternalKeyArrayInput)(nil)).Elem(), ReplicaExternalKeyArray{}) 490 pulumi.RegisterInputType(reflect.TypeOf((*ReplicaExternalKeyMapInput)(nil)).Elem(), ReplicaExternalKeyMap{}) 491 pulumi.RegisterOutputType(ReplicaExternalKeyOutput{}) 492 pulumi.RegisterOutputType(ReplicaExternalKeyArrayOutput{}) 493 pulumi.RegisterOutputType(ReplicaExternalKeyMapOutput{}) 494 }