yandex.KmsSymmetricKey
Explore with Pulumi AI
Import
A KMS symmetric key can be imported using the id
of the resource, e.g.
$ pulumi import yandex:index/kmsSymmetricKey:KmsSymmetricKey top-secret kms_key_id
Create KmsSymmetricKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KmsSymmetricKey(name: string, args?: KmsSymmetricKeyArgs, opts?: CustomResourceOptions);
@overload
def KmsSymmetricKey(resource_name: str,
args: Optional[KmsSymmetricKeyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def KmsSymmetricKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
default_algorithm: Optional[str] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
rotation_period: Optional[str] = None)
func NewKmsSymmetricKey(ctx *Context, name string, args *KmsSymmetricKeyArgs, opts ...ResourceOption) (*KmsSymmetricKey, error)
public KmsSymmetricKey(string name, KmsSymmetricKeyArgs? args = null, CustomResourceOptions? opts = null)
public KmsSymmetricKey(String name, KmsSymmetricKeyArgs args)
public KmsSymmetricKey(String name, KmsSymmetricKeyArgs args, CustomResourceOptions options)
type: yandex:KmsSymmetricKey
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 KmsSymmetricKeyArgs
- 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 KmsSymmetricKeyArgs
- 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 KmsSymmetricKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KmsSymmetricKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KmsSymmetricKeyArgs
- 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 kmsSymmetricKeyResource = new Yandex.KmsSymmetricKey("kmsSymmetricKeyResource", new()
{
DefaultAlgorithm = "string",
Description = "string",
FolderId = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
RotationPeriod = "string",
});
example, err := yandex.NewKmsSymmetricKey(ctx, "kmsSymmetricKeyResource", &yandex.KmsSymmetricKeyArgs{
DefaultAlgorithm: pulumi.String("string"),
Description: pulumi.String("string"),
FolderId: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
RotationPeriod: pulumi.String("string"),
})
var kmsSymmetricKeyResource = new KmsSymmetricKey("kmsSymmetricKeyResource", KmsSymmetricKeyArgs.builder()
.defaultAlgorithm("string")
.description("string")
.folderId("string")
.labels(Map.of("string", "string"))
.name("string")
.rotationPeriod("string")
.build());
kms_symmetric_key_resource = yandex.KmsSymmetricKey("kmsSymmetricKeyResource",
default_algorithm="string",
description="string",
folder_id="string",
labels={
"string": "string",
},
name="string",
rotation_period="string")
const kmsSymmetricKeyResource = new yandex.KmsSymmetricKey("kmsSymmetricKeyResource", {
defaultAlgorithm: "string",
description: "string",
folderId: "string",
labels: {
string: "string",
},
name: "string",
rotationPeriod: "string",
});
type: yandex:KmsSymmetricKey
properties:
defaultAlgorithm: string
description: string
folderId: string
labels:
string: string
name: string
rotationPeriod: string
KmsSymmetricKey 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 KmsSymmetricKey resource accepts the following input properties:
- Default
Algorithm string - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - Description string
- An optional description of the key.
- Folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Labels Dictionary<string, string>
- A set of key/value label pairs to assign to the key.
- Name string
- Name of the key.
- Rotation
Period string - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- Default
Algorithm string - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - Description string
- An optional description of the key.
- Folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Labels map[string]string
- A set of key/value label pairs to assign to the key.
- Name string
- Name of the key.
- Rotation
Period string - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- default
Algorithm String - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - description String
- An optional description of the key.
- folder
Id String - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Map<String,String>
- A set of key/value label pairs to assign to the key.
- name String
- Name of the key.
- rotation
Period String - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- default
Algorithm string - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - description string
- An optional description of the key.
- folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels {[key: string]: string}
- A set of key/value label pairs to assign to the key.
- name string
- Name of the key.
- rotation
Period string - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- default_
algorithm str - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - description str
- An optional description of the key.
- folder_
id str - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Mapping[str, str]
- A set of key/value label pairs to assign to the key.
- name str
- Name of the key.
- rotation_
period str - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- default
Algorithm String - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - description String
- An optional description of the key.
- folder
Id String - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Map<String>
- A set of key/value label pairs to assign to the key.
- name String
- Name of the key.
- rotation
Period String - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
Outputs
All input properties are implicitly available as output properties. Additionally, the KmsSymmetricKey resource produces the following output properties:
- created_
at str - Creation timestamp of the key.
- id str
- The provider-assigned unique ID for this managed resource.
- rotated_
at str - Last rotation timestamp of the key.
- status str
- The status of the key.
Look up Existing KmsSymmetricKey Resource
Get an existing KmsSymmetricKey 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?: KmsSymmetricKeyState, opts?: CustomResourceOptions): KmsSymmetricKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
default_algorithm: Optional[str] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
rotated_at: Optional[str] = None,
rotation_period: Optional[str] = None,
status: Optional[str] = None) -> KmsSymmetricKey
func GetKmsSymmetricKey(ctx *Context, name string, id IDInput, state *KmsSymmetricKeyState, opts ...ResourceOption) (*KmsSymmetricKey, error)
public static KmsSymmetricKey Get(string name, Input<string> id, KmsSymmetricKeyState? state, CustomResourceOptions? opts = null)
public static KmsSymmetricKey get(String name, Output<String> id, KmsSymmetricKeyState 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.
- Created
At string - Creation timestamp of the key.
- Default
Algorithm string - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - Description string
- An optional description of the key.
- Folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Labels Dictionary<string, string>
- A set of key/value label pairs to assign to the key.
- Name string
- Name of the key.
- Rotated
At string - Last rotation timestamp of the key.
- Rotation
Period string - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- Status string
- The status of the key.
- Created
At string - Creation timestamp of the key.
- Default
Algorithm string - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - Description string
- An optional description of the key.
- Folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Labels map[string]string
- A set of key/value label pairs to assign to the key.
- Name string
- Name of the key.
- Rotated
At string - Last rotation timestamp of the key.
- Rotation
Period string - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- Status string
- The status of the key.
- created
At String - Creation timestamp of the key.
- default
Algorithm String - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - description String
- An optional description of the key.
- folder
Id String - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Map<String,String>
- A set of key/value label pairs to assign to the key.
- name String
- Name of the key.
- rotated
At String - Last rotation timestamp of the key.
- rotation
Period String - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- status String
- The status of the key.
- created
At string - Creation timestamp of the key.
- default
Algorithm string - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - description string
- An optional description of the key.
- folder
Id string - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels {[key: string]: string}
- A set of key/value label pairs to assign to the key.
- name string
- Name of the key.
- rotated
At string - Last rotation timestamp of the key.
- rotation
Period string - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- status string
- The status of the key.
- created_
at str - Creation timestamp of the key.
- default_
algorithm str - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - description str
- An optional description of the key.
- folder_
id str - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Mapping[str, str]
- A set of key/value label pairs to assign to the key.
- name str
- Name of the key.
- rotated_
at str - Last rotation timestamp of the key.
- rotation_
period str - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- status str
- The status of the key.
- created
At String - Creation timestamp of the key.
- default
Algorithm String - Encryption algorithm to be used with a new key version,
generated with the next rotation. The default value is
AES_128
. - description String
- An optional description of the key.
- folder
Id String - The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Map<String>
- A set of key/value label pairs to assign to the key.
- name String
- Name of the key.
- rotated
At String - Last rotation timestamp of the key.
- rotation
Period String - Interval between automatic rotations. To disable automatic rotation, omit this parameter.
- status String
- The status of the key.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.