Class Secret
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.model.GenericModel
-
- com.ibm.cloud.secrets_manager_sdk.secrets_manager.v2.model.Secret
-
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
- Direct Known Subclasses:
ArbitrarySecret,CustomCredentialsSecret,IAMCredentialsSecret,ImportedCertificate,KVSecret,PrivateCertificate,PublicCertificate,ServiceCredentialsSecret,UsernamePasswordSecret
public class Secret extends com.ibm.cloud.sdk.core.service.model.GenericModelYour secret. Classes which extend this class: - ArbitrarySecret - IAMCredentialsSecret - ImportedCertificate - KVSecret - PrivateCertificate - PublicCertificate - ServiceCredentialsSecret - UsernamePasswordSecret - CustomCredentialsSecret
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSecret.SecretTypeThe secret type.static interfaceSecret.StateDescriptionA text representation of the secret state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getAccessGroups()Gets the accessGroups.StringgetAccountId()Gets the accountId.List<String>getAltNames()Gets the altNames.StringgetApiKey()Gets the apiKey.StringgetApiKeyId()Gets the apiKeyId.StringgetCa()Gets the ca.List<String>getCaChain()Gets the caChain.StringgetCertificate()Gets the certificate.StringgetCertificateAuthority()Gets the certificateAuthority.StringgetCertificateTemplate()Gets the certificateTemplate.StringgetCommonName()Gets the commonName.StringgetConfiguration()Gets the configuration.DategetCreatedAt()Gets the createdAt.StringgetCreatedBy()Gets the createdBy.ServiceCredentialsSecretCredentialsgetCredentials()Gets the credentials.Map<String,Object>getCredentialsContent()Gets the credentialsContent.StringgetCrn()Gets the crn.StringgetCsr()Gets the csr.Map<String,Object>getCustomMetadata()Gets the customMetadata.Map<String,Object>getData()Gets the data.StringgetDescription()Gets the description.StringgetDns()Gets the dns.DategetExpirationDate()Gets the expirationDate.StringgetId()Gets the id.StringgetIntermediate()Gets the intermediate.CertificateIssuanceInfogetIssuanceInfo()Gets the issuanceInfo.StringgetIssuer()Gets the issuer.StringgetIssuingCa()Gets the issuingCa.StringgetKeyAlgorithm()Gets the keyAlgorithm.List<String>getLabels()Gets the labels.StringgetLastFailedTaskId()Gets the lastFailedTaskId.LonggetLocksTotal()Gets the locksTotal.ImportedCertificateManagedCsrResponsegetManagedCsr()Gets the managedCsr.StringgetName()Gets the name.DategetNextRotationDate()Gets the nextRotationDate.Map<String,Object>getParameters()Gets the parameters.StringgetPassword()Gets the password.PasswordGenerationPolicyROgetPasswordGenerationPolicy()Gets the passwordGenerationPolicy.StringgetPayload()Gets the payload.StringgetPrivateKey()Gets the privateKey.StringgetProcessingTaskId()Gets the processingTaskId.LonggetQueuedTaskCount()Gets the queuedTaskCount.List<String>getReferencedBy()Gets the referencedBy.DategetRevocationTimeRfc3339()Gets the revocationTimeRfc3339.LonggetRevocationTimeSeconds()Gets the revocationTimeSeconds.RotationPolicygetRotation()Gets the rotation.StringgetSecretGroupId()Gets the secretGroupId.StringgetSecretType()Gets the secretType.StringgetSerialNumber()Gets the serialNumber.StringgetServiceId()Gets the serviceId.StringgetSigningAlgorithm()Gets the signingAlgorithm.ServiceCredentialsSecretSourceServiceROgetSourceService()Gets the sourceService.LonggetState()Gets the state.StringgetStateDescription()Gets the stateDescription.LonggetTaskCount()Gets the taskCount.StringgetTtl()Gets the ttl.DategetUpdatedAt()Gets the updatedAt.StringgetUsername()Gets the username.CertificateValiditygetValidity()Gets the validity.LonggetVersionsTotal()Gets the versionsTotal.BooleanisBundleCerts()Gets the bundleCerts.BooleanisDownloaded()Gets the downloaded.BooleanisIntermediateIncluded()Gets the intermediateIncluded.BooleanisPrivateKeyIncluded()Gets the privateKeyIncluded.BooleanisReuseApiKey()Gets the reuseApiKey.BooleanisServiceIdIsStatic()Gets the serviceIdIsStatic.
-
-
-
Method Detail
-
getCreatedBy
public String getCreatedBy()
Gets the createdBy. The unique identifier that is associated with the entity that created the secret.- Returns:
- the createdBy
-
getCreatedAt
public Date getCreatedAt()
Gets the createdAt. The date when the resource was created. The date format follows `RFC 3339`.- Returns:
- the createdAt
-
getCrn
public String getCrn()
Gets the crn. A CRN that uniquely identifies an IBM Cloud resource.- Returns:
- the crn
-
getCustomMetadata
public Map<String,Object> getCustomMetadata()
Gets the customMetadata. The secret metadata that a user can customize.- Returns:
- the customMetadata
-
getDescription
public String getDescription()
Gets the description. An extended description of your secret. To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.- Returns:
- the description
-
isDownloaded
public Boolean isDownloaded()
Gets the downloaded. This field indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.- Returns:
- the downloaded
-
getId
public String getId()
Gets the id. A UUID identifier.- Returns:
- the id
-
getLabels
public List<String> getLabels()
Gets the labels. Labels that you can use to search secrets in your instance. Only 30 labels can be created. Label can be between 2-64 characters, including spaces. To protect your privacy, do not use personal data, such as your name or location, as a label for your secret.- Returns:
- the labels
-
getLocksTotal
public Long getLocksTotal()
Gets the locksTotal. The number of locks of the secret.- Returns:
- the locksTotal
-
getName
public String getName()
Gets the name. The human-readable name of your secret.- Returns:
- the name
-
getSecretGroupId
public String getSecretGroupId()
Gets the secretGroupId. A UUID identifier, or `default` secret group.- Returns:
- the secretGroupId
-
getSecretType
public String getSecretType()
Gets the secretType. The secret type. Supported types are arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, kv, and username_password.- Returns:
- the secretType
-
getState
public Long getState()
Gets the state. The secret state that is based on `NIST SP 800-57`. States are integers and correspond to the `Pre-activation = 0`, `Active = 1`, `Suspended = 2`, `Deactivated = 3`, and `Destroyed = 5` values.- Returns:
- the state
-
getStateDescription
public String getStateDescription()
Gets the stateDescription. A text representation of the secret state.- Returns:
- the stateDescription
-
getUpdatedAt
public Date getUpdatedAt()
Gets the updatedAt. The date when a resource was modified. The date format follows `RFC 3339`.- Returns:
- the updatedAt
-
getVersionsTotal
public Long getVersionsTotal()
Gets the versionsTotal. The number of versions of your secret.- Returns:
- the versionsTotal
-
getReferencedBy
public List<String> getReferencedBy()
Gets the referencedBy. The list of configurations that have a reference to the secret.- Returns:
- the referencedBy
-
getExpirationDate
public Date getExpirationDate()
Gets the expirationDate. The date when the secret material expires. The date format follows the `RFC 3339` format. Supported secret types: arbitrary, imported_cert, public_cert, private_cert, iam_credentials, service_credentials, username_password, and custom_credentials.- Returns:
- the expirationDate
-
getPayload
public String getPayload()
Gets the payload. The secret data that is assigned to an `arbitrary` secret.- Returns:
- the payload
-
getTtl
public String getTtl()
Gets the ttl. The time-to-live (TTL) or lease duration to assign to credentials that are generated. Supported secret types: iam_credentials, service_credentials, custom_credentials. The TTL defines how long generated credentials remain valid. The value can be either an integer that specifies the number of seconds, or the string representation of a duration, such as `1440m` or `24h`. For the iam_credentials secret type, the TTL field is mandatory. The minimum duration is 1 minute. The maximum is 90 days. For the service_credentials secret type, the TTL field is optional. If it is set the minimum duration is 1 day. The maximum is 90 days. By default, the TTL is set to 0. After the TTL is modified, it will be applied only on the next secret rotation. For the custom_credentials secret type, the TTL field is optional. The minimum duration is 1 day. The maximum is 90 days.- Returns:
- the ttl
-
getAccessGroups
public List<String> getAccessGroups()
Gets the accessGroups. Access Groups that you can use for an `iam_credentials` secret. Up to 10 Access Groups can be used for each secret.- Returns:
- the accessGroups
-
getApiKeyId
public String getApiKeyId()
Gets the apiKeyId. The ID of the API key that is generated for this secret.- Returns:
- the apiKeyId
-
getServiceId
public String getServiceId()
Gets the serviceId. The service ID under which the API key (see the `api_key` field) is created. If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation, and adds it to the access groups that you assign. Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include the `access_groups` parameter.- Returns:
- the serviceId
-
getAccountId
public String getAccountId()
Gets the accountId. The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.- Returns:
- the accountId
-
isServiceIdIsStatic
public Boolean isServiceIdIsStatic()
Gets the serviceIdIsStatic. Indicates whether an `iam_credentials` secret was created with a static service ID. If it is set to `true`, the service ID for the secret was provided by the user at secret creation. If it is set to `false`, the service ID was generated by Secrets Manager.- Returns:
- the serviceIdIsStatic
-
isReuseApiKey
public Boolean isReuseApiKey()
Gets the reuseApiKey. (IAM credentials) This parameter indicates whether to reuse the service ID and API key for future read operations. If it is set to `true`, the service reuses the current credentials. If it is set to `false`, a new service ID and API key are generated each time that the secret is read or accessed.- Returns:
- the reuseApiKey
-
getRotation
public RotationPolicy getRotation()
Gets the rotation. This field indicates whether Secrets Manager rotates your secrets automatically. Supported secret types: username_password, private_cert, public_cert, iam_credentials, custom_credentials.- Returns:
- the rotation
-
getNextRotationDate
public Date getNextRotationDate()
Gets the nextRotationDate. The date that the secret is scheduled for automatic rotation. The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that can be auto-rotated and an existing rotation policy.- Returns:
- the nextRotationDate
-
getApiKey
public String getApiKey()
Gets the apiKey. The API key that is generated for this secret. After the secret reaches the end of its lease, the API key is deleted automatically. See the `time-to-live` field to understand the duration of the lease. If you want to continue to use the same API key for future read operations, see the `reuse_api_key` field.- Returns:
- the apiKey
-
getSigningAlgorithm
public String getSigningAlgorithm()
Gets the signingAlgorithm. The identifier for the cryptographic algorithm that is used by the issuing certificate authority to sign a certificate.- Returns:
- the signingAlgorithm
-
getAltNames
public List<String> getAltNames()
Gets the altNames. With the Subject Alternative Name field, you can specify additional hostnames to be protected by a single SSL certificate.- Returns:
- the altNames
-
getCommonName
public String getCommonName()
Gets the commonName. The Common Name (CN) represents the server name protected by the SSL certificate.- Returns:
- the commonName
-
isIntermediateIncluded
public Boolean isIntermediateIncluded()
Gets the intermediateIncluded. Indicates whether the certificate was imported with an associated intermediate certificate.- Returns:
- the intermediateIncluded
-
getIssuer
public String getIssuer()
Gets the issuer. The distinguished name that identifies the entity that signed and issued the certificate.- Returns:
- the issuer
-
getKeyAlgorithm
public String getKeyAlgorithm()
Gets the keyAlgorithm. The identifier for the cryptographic algorithm used to generate the public key that is associated with the certificate.- Returns:
- the keyAlgorithm
-
isPrivateKeyIncluded
public Boolean isPrivateKeyIncluded()
Gets the privateKeyIncluded. Indicates whether the certificate was imported with an associated private key.- Returns:
- the privateKeyIncluded
-
getSerialNumber
public String getSerialNumber()
Gets the serialNumber. The unique serial number that was assigned to a certificate by the issuing certificate authority.- Returns:
- the serialNumber
-
getValidity
public CertificateValidity getValidity()
Gets the validity. The date and time that the certificate validity period begins and ends.- Returns:
- the validity
-
getManagedCsr
public ImportedCertificateManagedCsrResponse getManagedCsr()
Gets the managedCsr. The data specified to create the CSR and the private key.- Returns:
- the managedCsr
-
getCertificate
public String getCertificate()
Gets the certificate. Your PEM-encoded certificate. The data must be formatted on a single line with embedded newline characters.- Returns:
- the certificate
-
getIntermediate
public String getIntermediate()
Gets the intermediate. The PEM-encoded intermediate certificate that is associated with the root certificate. The data must be formatted on a single line with embedded newline characters.- Returns:
- the intermediate
-
getPrivateKey
public String getPrivateKey()
Gets the privateKey. The PEM-encoded private key that is associated with the certificate. The data must be formatted on a single line with embedded newline characters.- Returns:
- the privateKey
-
getCsr
public String getCsr()
Gets the csr. The certificate signing request.- Returns:
- the csr
-
getData
public Map<String,Object> getData()
Gets the data. The payload data of a key-value secret.- Returns:
- the data
-
getCertificateAuthority
public String getCertificateAuthority()
Gets the certificateAuthority. The intermediate certificate authority that signed this certificate.- Returns:
- the certificateAuthority
-
getCertificateTemplate
public String getCertificateTemplate()
Gets the certificateTemplate. The name of the certificate template.- Returns:
- the certificateTemplate
-
getRevocationTimeSeconds
public Long getRevocationTimeSeconds()
Gets the revocationTimeSeconds. The timestamp of the certificate revocation.- Returns:
- the revocationTimeSeconds
-
getRevocationTimeRfc3339
public Date getRevocationTimeRfc3339()
Gets the revocationTimeRfc3339. The date and time that the certificate was revoked. The date format follows `RFC 3339`.- Returns:
- the revocationTimeRfc3339
-
getIssuingCa
public String getIssuingCa()
Gets the issuingCa. The PEM-encoded certificate of the certificate authority that signed and issued this certificate.- Returns:
- the issuingCa
-
getCaChain
public List<String> getCaChain()
Gets the caChain. The chain of certificate authorities that are associated with the certificate.- Returns:
- the caChain
-
getIssuanceInfo
public CertificateIssuanceInfo getIssuanceInfo()
Gets the issuanceInfo. Issuance information that is associated with your certificate.- Returns:
- the issuanceInfo
-
isBundleCerts
public Boolean isBundleCerts()
Gets the bundleCerts. Indicates whether the issued certificate is bundled with intermediate certificates.- Returns:
- the bundleCerts
-
getCa
public String getCa()
Gets the ca. The name of the certificate authority configuration.- Returns:
- the ca
-
getDns
public String getDns()
Gets the dns. The name of the DNS provider configuration.- Returns:
- the dns
-
getSourceService
public ServiceCredentialsSecretSourceServiceRO getSourceService()
Gets the sourceService. The properties of the resource key that was created for this source service instance.- Returns:
- the sourceService
-
getCredentials
public ServiceCredentialsSecretCredentials getCredentials()
Gets the credentials. The properties of the service credentials secret payload.- Returns:
- the credentials
-
getPasswordGenerationPolicy
public PasswordGenerationPolicyRO getPasswordGenerationPolicy()
Gets the passwordGenerationPolicy. Policy for auto-generated passwords.- Returns:
- the passwordGenerationPolicy
-
getUsername
public String getUsername()
Gets the username. The username that is assigned to an `username_password` secret.- Returns:
- the username
-
getPassword
public String getPassword()
Gets the password. The password that is assigned to an `username_password` secret.- Returns:
- the password
-
getTaskCount
public Long getTaskCount()
Gets the taskCount. The number of tasks that were created for this secret.- Returns:
- the taskCount
-
getProcessingTaskId
public String getProcessingTaskId()
Gets the processingTaskId. A Secret Manager task identifier.- Returns:
- the processingTaskId
-
getQueuedTaskCount
public Long getQueuedTaskCount()
Gets the queuedTaskCount. Number of queued tasks for this secret.- Returns:
- the queuedTaskCount
-
getLastFailedTaskId
public String getLastFailedTaskId()
Gets the lastFailedTaskId. A Secret Manager task identifier.- Returns:
- the lastFailedTaskId
-
getConfiguration
public String getConfiguration()
Gets the configuration. The name of the custom credentials configuration.- Returns:
- the configuration
-
getParameters
public Map<String,Object> getParameters()
Gets the parameters. The fields that can be passed to and from the custom credentials engine. Allowed types are 'string', 'integer' and 'boolean'.- Returns:
- the parameters
-
-