Base64SecretBundleContentDetails The contents of the secret.
type Base64SecretBundleContentDetails struct { // The base64-encoded content of the secret. Content *string `mandatory:"false" json:"content"` }
func (m Base64SecretBundleContentDetails) MarshalJSON() (buff []byte, e error)
MarshalJSON marshals to json representation
func (m Base64SecretBundleContentDetails) String() string
GetSecretBundleRequest wrapper for the GetSecretBundle operation
Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/36.1.0/secrets/GetSecretBundle.go.html to see an example of how to use GetSecretBundleRequest.
type GetSecretBundleRequest struct { // The OCID of the secret. SecretId *string `mandatory:"true" contributesTo:"path" name:"secretId"` // Unique identifier for the request. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // The version number of the secret. VersionNumber *int64 `mandatory:"false" contributesTo:"query" name:"versionNumber"` // The name of the secret. (This might be referred to as the name of the secret version. Names are unique across the different versions of a secret.) SecretVersionName *string `mandatory:"false" contributesTo:"query" name:"secretVersionName"` // The rotation state of the secret version. Stage GetSecretBundleStageEnum `mandatory:"false" contributesTo:"query" name:"stage" omitEmpty:"true"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata }
func (request GetSecretBundleRequest) HTTPRequest(method, path string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (request GetSecretBundleRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request GetSecretBundleRequest) String() string
GetSecretBundleResponse wrapper for the GetSecretBundle operation
type GetSecretBundleResponse struct { // The underlying http response RawResponse *http.Response // The SecretBundle instance SecretBundle `presentIn:"body"` // For optimistic concurrency control. See `if-match`. Etag *string `presentIn:"header" name:"etag"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` }
func (response GetSecretBundleResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
func (response GetSecretBundleResponse) String() string
GetSecretBundleStageEnum Enum with underlying type: string
type GetSecretBundleStageEnum string
Set of constants representing the allowable values for GetSecretBundleStageEnum
const ( GetSecretBundleStageCurrent GetSecretBundleStageEnum = "CURRENT" GetSecretBundleStagePending GetSecretBundleStageEnum = "PENDING" GetSecretBundleStageLatest GetSecretBundleStageEnum = "LATEST" GetSecretBundleStagePrevious GetSecretBundleStageEnum = "PREVIOUS" GetSecretBundleStageDeprecated GetSecretBundleStageEnum = "DEPRECATED" )
func GetGetSecretBundleStageEnumValues() []GetSecretBundleStageEnum
GetGetSecretBundleStageEnumValues Enumerates the set of values for GetSecretBundleStageEnum
ListSecretBundleVersionsRequest wrapper for the ListSecretBundleVersions operation
Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/36.1.0/secrets/ListSecretBundleVersions.go.html to see an example of how to use ListSecretBundleVersionsRequest.
type ListSecretBundleVersionsRequest struct { // The OCID of the secret. SecretId *string `mandatory:"true" contributesTo:"path" name:"secretId"` // Unique identifier for the request. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` // The maximum number of items to return in a paginated "List" call. For information about pagination, see // List Pagination (https://docs.cloud.oracle.comAPI/Concepts/usingapi.htm#List_Pagination). Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` // The value of the `opc-next-page` response header from the previous "List" call. For information about // pagination, see List Pagination (https://docs.cloud.oracle.comAPI/Concepts/usingapi.htm#List_Pagination). Page *string `mandatory:"false" contributesTo:"query" name:"page"` // The field to sort by. You can specify only one sort order. The default // order for `VERSION_NUMBER` is ascending. SortBy ListSecretBundleVersionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` // The sort order to use, either ascending (`ASC`) or descending (`DESC`). SortOrder ListSecretBundleVersionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata }
func (request ListSecretBundleVersionsRequest) HTTPRequest(method, path string) (http.Request, error)
HTTPRequest implements the OCIRequest interface
func (request ListSecretBundleVersionsRequest) RetryPolicy() *common.RetryPolicy
RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request ListSecretBundleVersionsRequest) String() string
ListSecretBundleVersionsResponse wrapper for the ListSecretBundleVersions operation
type ListSecretBundleVersionsResponse struct { // The underlying http response RawResponse *http.Response // A list of []SecretBundleVersionSummary instances Items []SecretBundleVersionSummary `presentIn:"body"` // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `presentIn:"header" name:"opc-request-id"` // For pagination of a list of items. When paging through a list, if this header appears in the response, // then there are additional items still to get. Include this value as the `page` parameter for the // subsequent GET request. For information about pagination, see // List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#List_Pagination). OpcNextPage *string `presentIn:"header" name:"opc-next-page"` }
func (response ListSecretBundleVersionsResponse) HTTPResponse() *http.Response
HTTPResponse implements the OCIResponse interface
func (response ListSecretBundleVersionsResponse) String() string
ListSecretBundleVersionsSortByEnum Enum with underlying type: string
type ListSecretBundleVersionsSortByEnum string
Set of constants representing the allowable values for ListSecretBundleVersionsSortByEnum
const ( ListSecretBundleVersionsSortByVersionNumber ListSecretBundleVersionsSortByEnum = "VERSION_NUMBER" )
func GetListSecretBundleVersionsSortByEnumValues() []ListSecretBundleVersionsSortByEnum
GetListSecretBundleVersionsSortByEnumValues Enumerates the set of values for ListSecretBundleVersionsSortByEnum
ListSecretBundleVersionsSortOrderEnum Enum with underlying type: string
type ListSecretBundleVersionsSortOrderEnum string
Set of constants representing the allowable values for ListSecretBundleVersionsSortOrderEnum
const ( ListSecretBundleVersionsSortOrderAsc ListSecretBundleVersionsSortOrderEnum = "ASC" ListSecretBundleVersionsSortOrderDesc ListSecretBundleVersionsSortOrderEnum = "DESC" )
func GetListSecretBundleVersionsSortOrderEnumValues() []ListSecretBundleVersionsSortOrderEnum
GetListSecretBundleVersionsSortOrderEnumValues Enumerates the set of values for ListSecretBundleVersionsSortOrderEnum
SecretBundle The contents of the secret, properties of the secret (and secret version), and user-provided contextual metadata for the secret.
type SecretBundle struct { // The OCID of the secret. SecretId *string `mandatory:"true" json:"secretId"` // The version number of the secret. VersionNumber *int64 `mandatory:"true" json:"versionNumber"` // The time when the secret bundle was created. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` // The name of the secret version. Labels are unique across the different versions of a particular secret. VersionName *string `mandatory:"false" json:"versionName"` SecretBundleContent SecretBundleContentDetails `mandatory:"false" json:"secretBundleContent"` // An optional property indicating when to delete the secret version, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. // Example: `2019-04-03T21:10:29.600Z` TimeOfDeletion *common.SDKTime `mandatory:"false" json:"timeOfDeletion"` // An optional property indicating when the secret version will expire, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. // Example: `2019-04-03T21:10:29.600Z` TimeOfExpiry *common.SDKTime `mandatory:"false" json:"timeOfExpiry"` // A list of possible rotation states for the secret version. Stages []SecretBundleStagesEnum `mandatory:"false" json:"stages,omitempty"` // Customer-provided contextual metadata for the secret. Metadata map[string]interface{} `mandatory:"false" json:"metadata"` }
func (m SecretBundle) String() string
func (m *SecretBundle) UnmarshalJSON(data []byte) (e error)
UnmarshalJSON unmarshals from json
SecretBundleContentDetails The contents of the secret.
type SecretBundleContentDetails interface { }
SecretBundleContentDetailsContentTypeEnum Enum with underlying type: string
type SecretBundleContentDetailsContentTypeEnum string
Set of constants representing the allowable values for SecretBundleContentDetailsContentTypeEnum
const ( SecretBundleContentDetailsContentTypeBase64 SecretBundleContentDetailsContentTypeEnum = "BASE64" )
func GetSecretBundleContentDetailsContentTypeEnumValues() []SecretBundleContentDetailsContentTypeEnum
GetSecretBundleContentDetailsContentTypeEnumValues Enumerates the set of values for SecretBundleContentDetailsContentTypeEnum
SecretBundleStagesEnum Enum with underlying type: string
type SecretBundleStagesEnum string
Set of constants representing the allowable values for SecretBundleStagesEnum
const ( SecretBundleStagesCurrent SecretBundleStagesEnum = "CURRENT" SecretBundleStagesPending SecretBundleStagesEnum = "PENDING" SecretBundleStagesLatest SecretBundleStagesEnum = "LATEST" SecretBundleStagesPrevious SecretBundleStagesEnum = "PREVIOUS" SecretBundleStagesDeprecated SecretBundleStagesEnum = "DEPRECATED" )
func GetSecretBundleStagesEnumValues() []SecretBundleStagesEnum
GetSecretBundleStagesEnumValues Enumerates the set of values for SecretBundleStagesEnum
SecretBundleVersionSummary The properties of the secret bundle. (Secret bundle version summary objects do not include the actual contents of the secret.)
type SecretBundleVersionSummary struct { // The OCID of the secret. SecretId *string `mandatory:"true" json:"secretId"` // The version number of the secret. VersionNumber *int64 `mandatory:"true" json:"versionNumber"` // The time when the secret bundle was created. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` // The version name of the secret bundle, as provided when the secret was created or last rotated. VersionName *string `mandatory:"false" json:"versionName"` // An optional property indicating when to delete the secret version, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. // Example: `2019-04-03T21:10:29.600Z` TimeOfDeletion *common.SDKTime `mandatory:"false" json:"timeOfDeletion"` // An optional property indicating when the secret version will expire, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format. // Example: `2019-04-03T21:10:29.600Z` TimeOfExpiry *common.SDKTime `mandatory:"false" json:"timeOfExpiry"` // A list of possible rotation states for the secret bundle. Stages []SecretBundleVersionSummaryStagesEnum `mandatory:"false" json:"stages,omitempty"` }
func (m SecretBundleVersionSummary) String() string
SecretBundleVersionSummaryStagesEnum Enum with underlying type: string
type SecretBundleVersionSummaryStagesEnum string
Set of constants representing the allowable values for SecretBundleVersionSummaryStagesEnum
const ( SecretBundleVersionSummaryStagesCurrent SecretBundleVersionSummaryStagesEnum = "CURRENT" SecretBundleVersionSummaryStagesPending SecretBundleVersionSummaryStagesEnum = "PENDING" SecretBundleVersionSummaryStagesLatest SecretBundleVersionSummaryStagesEnum = "LATEST" SecretBundleVersionSummaryStagesPrevious SecretBundleVersionSummaryStagesEnum = "PREVIOUS" SecretBundleVersionSummaryStagesDeprecated SecretBundleVersionSummaryStagesEnum = "DEPRECATED" )
func GetSecretBundleVersionSummaryStagesEnumValues() []SecretBundleVersionSummaryStagesEnum
GetSecretBundleVersionSummaryStagesEnumValues Enumerates the set of values for SecretBundleVersionSummaryStagesEnum
SecretsClient a client for Secrets
type SecretsClient struct { common.BaseClient // contains filtered or unexported fields }
func NewSecretsClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client SecretsClient, err error)
NewSecretsClientWithConfigurationProvider Creates a new default Secrets client with the given configuration provider. the configuration provider will be used for the default signer as well as reading the region
func NewSecretsClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client SecretsClient, err error)
NewSecretsClientWithOboToken Creates a new default Secrets client with the given configuration provider. The obotoken will be added to default headers and signed; the configuration provider will be used for the signer
as well as reading the region
func (client *SecretsClient) ConfigurationProvider() *common.ConfigurationProvider
ConfigurationProvider the ConfigurationProvider used in this client, or null if none set
func (client SecretsClient) GetSecretBundle(ctx context.Context, request GetSecretBundleRequest) (response GetSecretBundleResponse, err error)
GetSecretBundle Gets a secret bundle that matches either the specified `stage`, `label`, or `versionNumber` parameter. If none of these parameters are provided, the bundle for the secret version marked as `CURRENT` will be returned.
Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/36.1.0/secrets/GetSecretBundle.go.html to see an example of how to use GetSecretBundle API.
func (client SecretsClient) ListSecretBundleVersions(ctx context.Context, request ListSecretBundleVersionsRequest) (response ListSecretBundleVersionsResponse, err error)
ListSecretBundleVersions Lists all secret bundle versions for the specified secret.
Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/36.1.0/secrets/ListSecretBundleVersions.go.html to see an example of how to use ListSecretBundleVersions API.
func (client *SecretsClient) SetRegion(region string)
SetRegion overrides the region of this client.