Class Secret.Builder

  • Enclosing class:
    Secret

    public static class Secret.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • compartmentId

        public Secret.Builder compartmentId​(String compartmentId)
        The OCID of the compartment where you want to create the secret.
        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • currentVersionNumber

        public Secret.Builder currentVersionNumber​(Long currentVersionNumber)
        The version number of the secret version that’s currently in use.
        Parameters:
        currentVersionNumber - the value to set
        Returns:
        this builder
      • definedTags

        public Secret.Builder definedTags​(Map<String,​Map<String,​Object>> definedTags)
        Defined tags for this resource.

        Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {“Operations”: {“CostCenter”: “42”}}

        Parameters:
        definedTags - the value to set
        Returns:
        this builder
      • description

        public Secret.Builder description​(String description)
        A brief description of the secret.

        Avoid entering confidential information.

        Parameters:
        description - the value to set
        Returns:
        this builder
      • freeformTags

        public Secret.Builder freeformTags​(Map<String,​String> freeformTags)
        Free-form tags for this resource.

        Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {“Department”: “Finance”}

        Parameters:
        freeformTags - the value to set
        Returns:
        this builder
      • id

        public Secret.Builder id​(String id)
        The OCID of the secret.
        Parameters:
        id - the value to set
        Returns:
        this builder
      • keyId

        public Secret.Builder keyId​(String keyId)
        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.

        Parameters:
        keyId - the value to set
        Returns:
        this builder
      • lifecycleDetails

        public Secret.Builder lifecycleDetails​(String lifecycleDetails)
        Additional information about the current lifecycle state of the secret.
        Parameters:
        lifecycleDetails - the value to set
        Returns:
        this builder
      • lifecycleState

        public Secret.Builder lifecycleState​(Secret.LifecycleState lifecycleState)
        The current lifecycle state of the secret.
        Parameters:
        lifecycleState - the value to set
        Returns:
        this builder
      • metadata

        public Secret.Builder metadata​(Map<String,​Object> metadata)
        Additional metadata that you can use to provide context about how to use the secret or during rotation or other administrative tasks.

        For example, for a secret that you use to connect to a database, the additional metadata might specify the connection endpoint and the connection string. Provide additional metadata as key-value pairs.

        Parameters:
        metadata - the value to set
        Returns:
        this builder
      • rotationStatus

        public Secret.Builder rotationStatus​(Secret.RotationStatus rotationStatus)
        Additional information about the status of the secret rotation
        Parameters:
        rotationStatus - the value to set
        Returns:
        this builder
      • lastRotationTime

        public Secret.Builder lastRotationTime​(Date lastRotationTime)
        A property indicating when the secret was last rotated successfully, expressed in RFC 3339 timestamp format.

        Example: 2019-04-03T21:10:29.600Z

        Parameters:
        lastRotationTime - the value to set
        Returns:
        this builder
      • nextRotationTime

        public Secret.Builder nextRotationTime​(Date nextRotationTime)
        A property indicating when the secret is scheduled to be rotated, expressed in RFC 3339 timestamp format.

        Example: 2019-04-03T21:10:29.600Z

        Parameters:
        nextRotationTime - the value to set
        Returns:
        this builder
      • secretName

        public Secret.Builder secretName​(String secretName)
        The user-friendly name of the secret.

        Avoid entering confidential information.

        Parameters:
        secretName - the value to set
        Returns:
        this builder
      • secretRules

        public Secret.Builder secretRules​(List<SecretRule> secretRules)
        A list of rules that control how the secret is used and managed.
        Parameters:
        secretRules - the value to set
        Returns:
        this builder
      • timeCreated

        public Secret.Builder timeCreated​(Date timeCreated)
        A property indicating when the secret was created, expressed in RFC 3339 timestamp format.

        Example: 2019-04-03T21:10:29.600Z

        Parameters:
        timeCreated - the value to set
        Returns:
        this builder
      • timeOfCurrentVersionExpiry

        public Secret.Builder timeOfCurrentVersionExpiry​(Date timeOfCurrentVersionExpiry)
        An optional property indicating when the current secret version will expire, expressed in RFC 3339 timestamp format.

        Example: 2019-04-03T21:10:29.600Z

        Parameters:
        timeOfCurrentVersionExpiry - the value to set
        Returns:
        this builder
      • timeOfDeletion

        public Secret.Builder timeOfDeletion​(Date timeOfDeletion)
        An optional property indicating when to delete the secret, expressed in RFC 3339 timestamp format.

        Example: 2019-04-03T21:10:29.600Z

        Parameters:
        timeOfDeletion - the value to set
        Returns:
        this builder
      • vaultId

        public Secret.Builder vaultId​(String vaultId)
        The OCID of the vault where the secret exists.
        Parameters:
        vaultId - the value to set
        Returns:
        this builder
      • isAutoGenerationEnabled

        public Secret.Builder isAutoGenerationEnabled​(Boolean isAutoGenerationEnabled)
        The value of this flag determines whether or not secret content will be generated automatically.
        Parameters:
        isAutoGenerationEnabled - the value to set
        Returns:
        this builder
      • build

        public Secret build()