SshKeyGenerationContext

class oci.vault.models.SshKeyGenerationContext(**kwargs)

Bases: oci.vault.models.secret_generation_context.SecretGenerationContext

Generates ssh keys. By default, the keys are stored as - {“publicKey”: “%GENERATED_PUBLIC_KEY%”, “privateKey”: “%GENERATED_PRIVATE_KEY%”} in PEM format. The SecretTemplate must have both %GENERATED_PUBLIC_KEY% and %GENERATED_PRIVATE_KEY% keywords which is later replaced with the respective keys, if provided.

Attributes

GENERATION_TEMPLATE_RSA_2048 A constant which can be used with the generation_template property of a SshKeyGenerationContext.
GENERATION_TEMPLATE_RSA_3072 A constant which can be used with the generation_template property of a SshKeyGenerationContext.
GENERATION_TEMPLATE_RSA_4096 A constant which can be used with the generation_template property of a SshKeyGenerationContext.
GENERATION_TYPE_BYTES str(object=’’) -> str
GENERATION_TYPE_PASSPHRASE str(object=’’) -> str
GENERATION_TYPE_SSH_KEY str(object=’’) -> str
generation_template [Required] Gets the generation_template of this SshKeyGenerationContext.
generation_type [Required] Gets the generation_type of this SecretGenerationContext.
secret_template Gets the secret_template of this SecretGenerationContext.

Methods

__init__(**kwargs) Initializes a new SshKeyGenerationContext object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
GENERATION_TEMPLATE_RSA_2048 = 'RSA_2048'

A constant which can be used with the generation_template property of a SshKeyGenerationContext. This constant has a value of “RSA_2048”

GENERATION_TEMPLATE_RSA_3072 = 'RSA_3072'

A constant which can be used with the generation_template property of a SshKeyGenerationContext. This constant has a value of “RSA_3072”

GENERATION_TEMPLATE_RSA_4096 = 'RSA_4096'

A constant which can be used with the generation_template property of a SshKeyGenerationContext. This constant has a value of “RSA_4096”

GENERATION_TYPE_BYTES = 'BYTES'
GENERATION_TYPE_PASSPHRASE = 'PASSPHRASE'
GENERATION_TYPE_SSH_KEY = 'SSH_KEY'
__init__(**kwargs)

Initializes a new SshKeyGenerationContext object with values from keyword arguments. The default value of the generation_type attribute of this class is SSH_KEY and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • generation_type (str) – The value to assign to the generation_type property of this SshKeyGenerationContext. Allowed values for this property are: “PASSPHRASE”, “SSH_KEY”, “BYTES”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • secret_template (str) – The value to assign to the secret_template property of this SshKeyGenerationContext.
  • generation_template (str) – The value to assign to the generation_template property of this SshKeyGenerationContext. Allowed values for this property are: “RSA_2048”, “RSA_3072”, “RSA_4096”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
generation_template

[Required] Gets the generation_template of this SshKeyGenerationContext. Name of SSH key generation template to generate SSH key type secret.

Allowed values for this property are: “RSA_2048”, “RSA_3072”, “RSA_4096”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The generation_template of this SshKeyGenerationContext.
Return type:str
generation_type

[Required] Gets the generation_type of this SecretGenerationContext. Name of the predefined secret generation type.

Allowed values for this property are: “PASSPHRASE”, “SSH_KEY”, “BYTES”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The generation_type of this SecretGenerationContext.
Return type:str
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

secret_template

Gets the secret_template of this SecretGenerationContext. SecretTemplate captures structure in which customer wants to store secrets. This is optional and a default structure is available for each secret type. The template can have any structure with static values that are not generated. Within the template, you can insert predefined placeholders to store secrets. These placeholders are later replaced with the generated content and saved as a Base64 encoded content.

Returns:The secret_template of this SecretGenerationContext.
Return type:str