Class CreateSecret.Request

All Implemented Interfaces:
ApiRequest<CreateSecret.Request>
Enclosing class:
CreateSecret

public static final class CreateSecret.Request extends OciRequestBase<CreateSecret.Request>
Request object. Can be configured with additional headers, query parameters etc.
  • Method Details

    • builder

      public static CreateSecret.Request builder()
      Fluent API builder for configuring a request. The request builder is passed as is, without a build method. The equivalent of a build method is ApiJsonBuilder.toJson(jakarta.json.JsonBuilderFactory) used by the RestApi.
      Returns:
      new request builder
    • vaultId

      public CreateSecret.Request vaultId(String vaultOcid)
      The OCID of the vault where you want to create the secret. Required.
      Parameters:
      vaultOcid - vault OCI
      Returns:
      updated request
    • secretName

      public CreateSecret.Request secretName(String name)
      A user-friendly name for the secret. Secret names should be unique within a vault. Avoid entering confidential information. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Required.
      Parameters:
      name - name of the secret
      Returns:
      updated request
    • description

      public CreateSecret.Request description(String description)
      A brief description of the secret. Avoid entering confidential information. Optional.
      Parameters:
      description - description
      Returns:
      updated request
    • encryptionKeyId

      public CreateSecret.Request encryptionKeyId(String encryptionKeyOcid)
      The OCID of the master encryption key that is used to encrypt the secret. You must specify a symmetric key to encrypt the secret during import to the vault. You cannot encrypt secrets with asymmetric keys. Furthermore, the key must exist in the vault that you specify. This is required, even though the API docs mark it as optional.
      Parameters:
      encryptionKeyOcid - OCID of the encryption key
      Returns:
      updated request
    • secretContent

      public CreateSecret.Request secretContent(CreateSecret.SecretContent secretContent)
      Content of the secret.
      Parameters:
      secretContent - content
      Returns:
      updated request
    • compartmentId

      public CreateSecret.Request compartmentId(String compartmentOcid)
      The OCID of the compartment where you want to create the secret. Required.
      Parameters:
      compartmentOcid - compartment OCID
      Returns:
      updated request