flexibleengine.KmsKeyV1
Explore with Pulumi AI
Manages a V1 key resource within KMS.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const key1 = new flexibleengine.KmsKeyV1("key1", {
isEnabled: true,
keyAlias: "key_1",
keyDescription: "first test key",
pendingDays: "7",
realm: "cn-north-1",
});
import pulumi
import pulumi_flexibleengine as flexibleengine
key1 = flexibleengine.KmsKeyV1("key1",
is_enabled=True,
key_alias="key_1",
key_description="first test key",
pending_days="7",
realm="cn-north-1")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewKmsKeyV1(ctx, "key1", &flexibleengine.KmsKeyV1Args{
IsEnabled: pulumi.Bool(true),
KeyAlias: pulumi.String("key_1"),
KeyDescription: pulumi.String("first test key"),
PendingDays: pulumi.String("7"),
Realm: pulumi.String("cn-north-1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var key1 = new Flexibleengine.KmsKeyV1("key1", new()
{
IsEnabled = true,
KeyAlias = "key_1",
KeyDescription = "first test key",
PendingDays = "7",
Realm = "cn-north-1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.KmsKeyV1;
import com.pulumi.flexibleengine.KmsKeyV1Args;
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) {
var key1 = new KmsKeyV1("key1", KmsKeyV1Args.builder()
.isEnabled(true)
.keyAlias("key_1")
.keyDescription("first test key")
.pendingDays("7")
.realm("cn-north-1")
.build());
}
}
resources:
key1:
type: flexibleengine:KmsKeyV1
properties:
isEnabled: true
keyAlias: key_1
keyDescription: first test key
pendingDays: '7'
realm: cn-north-1
Create KmsKeyV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KmsKeyV1(name: string, args: KmsKeyV1Args, opts?: CustomResourceOptions);
@overload
def KmsKeyV1(resource_name: str,
args: KmsKeyV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def KmsKeyV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
key_alias: Optional[str] = None,
is_enabled: Optional[bool] = None,
key_description: Optional[str] = None,
kms_key_v1_id: Optional[str] = None,
pending_days: Optional[str] = None,
realm: Optional[str] = None,
rotation_enabled: Optional[bool] = None,
rotation_interval: Optional[float] = None,
timeouts: Optional[KmsKeyV1TimeoutsArgs] = None)
func NewKmsKeyV1(ctx *Context, name string, args KmsKeyV1Args, opts ...ResourceOption) (*KmsKeyV1, error)
public KmsKeyV1(string name, KmsKeyV1Args args, CustomResourceOptions? opts = null)
public KmsKeyV1(String name, KmsKeyV1Args args)
public KmsKeyV1(String name, KmsKeyV1Args args, CustomResourceOptions options)
type: flexibleengine:KmsKeyV1
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 KmsKeyV1Args
- 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 KmsKeyV1Args
- 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 KmsKeyV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KmsKeyV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KmsKeyV1Args
- 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 kmsKeyV1Resource = new Flexibleengine.KmsKeyV1("kmsKeyV1Resource", new()
{
KeyAlias = "string",
IsEnabled = false,
KeyDescription = "string",
KmsKeyV1Id = "string",
PendingDays = "string",
Realm = "string",
RotationEnabled = false,
RotationInterval = 0,
Timeouts = new Flexibleengine.Inputs.KmsKeyV1TimeoutsArgs
{
Create = "string",
},
});
example, err := flexibleengine.NewKmsKeyV1(ctx, "kmsKeyV1Resource", &flexibleengine.KmsKeyV1Args{
KeyAlias: pulumi.String("string"),
IsEnabled: pulumi.Bool(false),
KeyDescription: pulumi.String("string"),
KmsKeyV1Id: pulumi.String("string"),
PendingDays: pulumi.String("string"),
Realm: pulumi.String("string"),
RotationEnabled: pulumi.Bool(false),
RotationInterval: pulumi.Float64(0),
Timeouts: &flexibleengine.KmsKeyV1TimeoutsArgs{
Create: pulumi.String("string"),
},
})
var kmsKeyV1Resource = new KmsKeyV1("kmsKeyV1Resource", KmsKeyV1Args.builder()
.keyAlias("string")
.isEnabled(false)
.keyDescription("string")
.kmsKeyV1Id("string")
.pendingDays("string")
.realm("string")
.rotationEnabled(false)
.rotationInterval(0)
.timeouts(KmsKeyV1TimeoutsArgs.builder()
.create("string")
.build())
.build());
kms_key_v1_resource = flexibleengine.KmsKeyV1("kmsKeyV1Resource",
key_alias="string",
is_enabled=False,
key_description="string",
kms_key_v1_id="string",
pending_days="string",
realm="string",
rotation_enabled=False,
rotation_interval=0,
timeouts={
"create": "string",
})
const kmsKeyV1Resource = new flexibleengine.KmsKeyV1("kmsKeyV1Resource", {
keyAlias: "string",
isEnabled: false,
keyDescription: "string",
kmsKeyV1Id: "string",
pendingDays: "string",
realm: "string",
rotationEnabled: false,
rotationInterval: 0,
timeouts: {
create: "string",
},
});
type: flexibleengine:KmsKeyV1
properties:
isEnabled: false
keyAlias: string
keyDescription: string
kmsKeyV1Id: string
pendingDays: string
realm: string
rotationEnabled: false
rotationInterval: 0
timeouts:
create: string
KmsKeyV1 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 KmsKeyV1 resource accepts the following input properties:
- Key
Alias string - Specifies the name of a KMS key.
- Is
Enabled bool - Specifies whether the key is enabled. Defaults to true.
- Key
Description string - Specifies the description of a KMS key.
- Kms
Key stringV1Id - The globally unique identifier for the key.
- Pending
Days string - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- Realm string
- Region where a key resides. Changing this creates a new key.
- Rotation
Enabled bool - Specifies whether the key rotation is enabled. Defaults to false.
- Rotation
Interval double - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- Timeouts
Kms
Key V1Timeouts
- Key
Alias string - Specifies the name of a KMS key.
- Is
Enabled bool - Specifies whether the key is enabled. Defaults to true.
- Key
Description string - Specifies the description of a KMS key.
- Kms
Key stringV1Id - The globally unique identifier for the key.
- Pending
Days string - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- Realm string
- Region where a key resides. Changing this creates a new key.
- Rotation
Enabled bool - Specifies whether the key rotation is enabled. Defaults to false.
- Rotation
Interval float64 - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- Timeouts
Kms
Key V1Timeouts Args
- key
Alias String - Specifies the name of a KMS key.
- is
Enabled Boolean - Specifies whether the key is enabled. Defaults to true.
- key
Description String - Specifies the description of a KMS key.
- kms
Key StringV1Id - The globally unique identifier for the key.
- pending
Days String - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- realm String
- Region where a key resides. Changing this creates a new key.
- rotation
Enabled Boolean - Specifies whether the key rotation is enabled. Defaults to false.
- rotation
Interval Double - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- timeouts
Kms
Key V1Timeouts
- key
Alias string - Specifies the name of a KMS key.
- is
Enabled boolean - Specifies whether the key is enabled. Defaults to true.
- key
Description string - Specifies the description of a KMS key.
- kms
Key stringV1Id - The globally unique identifier for the key.
- pending
Days string - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- realm string
- Region where a key resides. Changing this creates a new key.
- rotation
Enabled boolean - Specifies whether the key rotation is enabled. Defaults to false.
- rotation
Interval number - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- timeouts
Kms
Key V1Timeouts
- key_
alias str - Specifies the name of a KMS key.
- is_
enabled bool - Specifies whether the key is enabled. Defaults to true.
- key_
description str - Specifies the description of a KMS key.
- kms_
key_ strv1_ id - The globally unique identifier for the key.
- pending_
days str - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- realm str
- Region where a key resides. Changing this creates a new key.
- rotation_
enabled bool - Specifies whether the key rotation is enabled. Defaults to false.
- rotation_
interval float - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- timeouts
Kms
Key V1Timeouts Args
- key
Alias String - Specifies the name of a KMS key.
- is
Enabled Boolean - Specifies whether the key is enabled. Defaults to true.
- key
Description String - Specifies the description of a KMS key.
- kms
Key StringV1Id - The globally unique identifier for the key.
- pending
Days String - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- realm String
- Region where a key resides. Changing this creates a new key.
- rotation
Enabled Boolean - Specifies whether the key rotation is enabled. Defaults to false.
- rotation
Interval Number - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the KmsKeyV1 resource produces the following output properties:
- Creation
Date string - Creation time (time stamp) of a key.
- Default
Key stringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- Domain
Id string - ID of a user domain for the key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Origin string
- Origin of a key. The default value is kms.
- Rotation
Number double - The total number of key rotations.
- Creation
Date string - Creation time (time stamp) of a key.
- Default
Key stringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- Domain
Id string - ID of a user domain for the key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Origin string
- Origin of a key. The default value is kms.
- Rotation
Number float64 - The total number of key rotations.
- creation
Date String - Creation time (time stamp) of a key.
- default
Key StringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- domain
Id String - ID of a user domain for the key.
- id String
- The provider-assigned unique ID for this managed resource.
- origin String
- Origin of a key. The default value is kms.
- rotation
Number Double - The total number of key rotations.
- creation
Date string - Creation time (time stamp) of a key.
- default
Key stringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- domain
Id string - ID of a user domain for the key.
- id string
- The provider-assigned unique ID for this managed resource.
- origin string
- Origin of a key. The default value is kms.
- rotation
Number number - The total number of key rotations.
- creation_
date str - Creation time (time stamp) of a key.
- default_
key_ strflag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- domain_
id str - ID of a user domain for the key.
- id str
- The provider-assigned unique ID for this managed resource.
- origin str
- Origin of a key. The default value is kms.
- rotation_
number float - The total number of key rotations.
- creation
Date String - Creation time (time stamp) of a key.
- default
Key StringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- domain
Id String - ID of a user domain for the key.
- id String
- The provider-assigned unique ID for this managed resource.
- origin String
- Origin of a key. The default value is kms.
- rotation
Number Number - The total number of key rotations.
Look up Existing KmsKeyV1 Resource
Get an existing KmsKeyV1 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?: KmsKeyV1State, opts?: CustomResourceOptions): KmsKeyV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creation_date: Optional[str] = None,
default_key_flag: Optional[str] = None,
domain_id: Optional[str] = None,
is_enabled: Optional[bool] = None,
key_alias: Optional[str] = None,
key_description: Optional[str] = None,
kms_key_v1_id: Optional[str] = None,
origin: Optional[str] = None,
pending_days: Optional[str] = None,
realm: Optional[str] = None,
rotation_enabled: Optional[bool] = None,
rotation_interval: Optional[float] = None,
rotation_number: Optional[float] = None,
timeouts: Optional[KmsKeyV1TimeoutsArgs] = None) -> KmsKeyV1
func GetKmsKeyV1(ctx *Context, name string, id IDInput, state *KmsKeyV1State, opts ...ResourceOption) (*KmsKeyV1, error)
public static KmsKeyV1 Get(string name, Input<string> id, KmsKeyV1State? state, CustomResourceOptions? opts = null)
public static KmsKeyV1 get(String name, Output<String> id, KmsKeyV1State state, CustomResourceOptions options)
resources: _: type: flexibleengine:KmsKeyV1 get: id: ${id}
- 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.
- Creation
Date string - Creation time (time stamp) of a key.
- Default
Key stringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- Domain
Id string - ID of a user domain for the key.
- Is
Enabled bool - Specifies whether the key is enabled. Defaults to true.
- Key
Alias string - Specifies the name of a KMS key.
- Key
Description string - Specifies the description of a KMS key.
- Kms
Key stringV1Id - The globally unique identifier for the key.
- Origin string
- Origin of a key. The default value is kms.
- Pending
Days string - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- Realm string
- Region where a key resides. Changing this creates a new key.
- Rotation
Enabled bool - Specifies whether the key rotation is enabled. Defaults to false.
- Rotation
Interval double - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- Rotation
Number double - The total number of key rotations.
- Timeouts
Kms
Key V1Timeouts
- Creation
Date string - Creation time (time stamp) of a key.
- Default
Key stringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- Domain
Id string - ID of a user domain for the key.
- Is
Enabled bool - Specifies whether the key is enabled. Defaults to true.
- Key
Alias string - Specifies the name of a KMS key.
- Key
Description string - Specifies the description of a KMS key.
- Kms
Key stringV1Id - The globally unique identifier for the key.
- Origin string
- Origin of a key. The default value is kms.
- Pending
Days string - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- Realm string
- Region where a key resides. Changing this creates a new key.
- Rotation
Enabled bool - Specifies whether the key rotation is enabled. Defaults to false.
- Rotation
Interval float64 - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- Rotation
Number float64 - The total number of key rotations.
- Timeouts
Kms
Key V1Timeouts Args
- creation
Date String - Creation time (time stamp) of a key.
- default
Key StringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- domain
Id String - ID of a user domain for the key.
- is
Enabled Boolean - Specifies whether the key is enabled. Defaults to true.
- key
Alias String - Specifies the name of a KMS key.
- key
Description String - Specifies the description of a KMS key.
- kms
Key StringV1Id - The globally unique identifier for the key.
- origin String
- Origin of a key. The default value is kms.
- pending
Days String - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- realm String
- Region where a key resides. Changing this creates a new key.
- rotation
Enabled Boolean - Specifies whether the key rotation is enabled. Defaults to false.
- rotation
Interval Double - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- rotation
Number Double - The total number of key rotations.
- timeouts
Kms
Key V1Timeouts
- creation
Date string - Creation time (time stamp) of a key.
- default
Key stringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- domain
Id string - ID of a user domain for the key.
- is
Enabled boolean - Specifies whether the key is enabled. Defaults to true.
- key
Alias string - Specifies the name of a KMS key.
- key
Description string - Specifies the description of a KMS key.
- kms
Key stringV1Id - The globally unique identifier for the key.
- origin string
- Origin of a key. The default value is kms.
- pending
Days string - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- realm string
- Region where a key resides. Changing this creates a new key.
- rotation
Enabled boolean - Specifies whether the key rotation is enabled. Defaults to false.
- rotation
Interval number - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- rotation
Number number - The total number of key rotations.
- timeouts
Kms
Key V1Timeouts
- creation_
date str - Creation time (time stamp) of a key.
- default_
key_ strflag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- domain_
id str - ID of a user domain for the key.
- is_
enabled bool - Specifies whether the key is enabled. Defaults to true.
- key_
alias str - Specifies the name of a KMS key.
- key_
description str - Specifies the description of a KMS key.
- kms_
key_ strv1_ id - The globally unique identifier for the key.
- origin str
- Origin of a key. The default value is kms.
- pending_
days str - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- realm str
- Region where a key resides. Changing this creates a new key.
- rotation_
enabled bool - Specifies whether the key rotation is enabled. Defaults to false.
- rotation_
interval float - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- rotation_
number float - The total number of key rotations.
- timeouts
Kms
Key V1Timeouts Args
- creation
Date String - Creation time (time stamp) of a key.
- default
Key StringFlag - Identification of a Master Key. The value 1 indicates a Default Master Key, and the value 0 indicates a key.
- domain
Id String - ID of a user domain for the key.
- is
Enabled Boolean - Specifies whether the key is enabled. Defaults to true.
- key
Alias String - Specifies the name of a KMS key.
- key
Description String - Specifies the description of a KMS key.
- kms
Key StringV1Id - The globally unique identifier for the key.
- origin String
- Origin of a key. The default value is kms.
- pending
Days String - Specifies the duration in days after which the key is deleted after destruction of the resource, must be between 7 and 1096 days. Defaults to 7. It only will be used when delete a key.
- realm String
- Region where a key resides. Changing this creates a new key.
- rotation
Enabled Boolean - Specifies whether the key rotation is enabled. Defaults to false.
- rotation
Interval Number - Specifies the key rotation interval. The valid value is range from 30 to 365, defaults to 365.
- rotation
Number Number - The total number of key rotations.
- timeouts Property Map
Supporting Types
KmsKeyV1Timeouts, KmsKeyV1TimeoutsArgs
- Create string
- Create string
- create String
- create string
- create str
- create String
Import
KMS Keys can be imported using the id
, e.g.
$ pulumi import flexibleengine:index/kmsKeyV1:KmsKeyV1 key_1 7056d636-ac60-4663-8a6c-82d3c32c1c64
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.