...

Package secrets

import "github.com/oracle/oci-go-sdk/secrets"
Overview
Index

Overview ▾

Index ▾

type Base64SecretBundleContentDetails
    func (m Base64SecretBundleContentDetails) MarshalJSON() (buff []byte, e error)
    func (m Base64SecretBundleContentDetails) String() string
type GetSecretBundleRequest
    func (request GetSecretBundleRequest) HTTPRequest(method, path string) (http.Request, error)
    func (request GetSecretBundleRequest) RetryPolicy() *common.RetryPolicy
    func (request GetSecretBundleRequest) String() string
type GetSecretBundleResponse
    func (response GetSecretBundleResponse) HTTPResponse() *http.Response
    func (response GetSecretBundleResponse) String() string
type GetSecretBundleStageEnum
    func GetGetSecretBundleStageEnumValues() []GetSecretBundleStageEnum
type ListSecretBundleVersionsRequest
    func (request ListSecretBundleVersionsRequest) HTTPRequest(method, path string) (http.Request, error)
    func (request ListSecretBundleVersionsRequest) RetryPolicy() *common.RetryPolicy
    func (request ListSecretBundleVersionsRequest) String() string
type ListSecretBundleVersionsResponse
    func (response ListSecretBundleVersionsResponse) HTTPResponse() *http.Response
    func (response ListSecretBundleVersionsResponse) String() string
type ListSecretBundleVersionsSortByEnum
    func GetListSecretBundleVersionsSortByEnumValues() []ListSecretBundleVersionsSortByEnum
type ListSecretBundleVersionsSortOrderEnum
    func GetListSecretBundleVersionsSortOrderEnumValues() []ListSecretBundleVersionsSortOrderEnum
type SecretBundle
    func (m SecretBundle) String() string
    func (m *SecretBundle) UnmarshalJSON(data []byte) (e error)
type SecretBundleContentDetails
type SecretBundleContentDetailsContentTypeEnum
    func GetSecretBundleContentDetailsContentTypeEnumValues() []SecretBundleContentDetailsContentTypeEnum
type SecretBundleStagesEnum
    func GetSecretBundleStagesEnumValues() []SecretBundleStagesEnum
type SecretBundleVersionSummary
    func (m SecretBundleVersionSummary) String() string
type SecretBundleVersionSummaryStagesEnum
    func GetSecretBundleVersionSummaryStagesEnumValues() []SecretBundleVersionSummaryStagesEnum
type SecretsClient
    func NewSecretsClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client SecretsClient, err error)
    func NewSecretsClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client SecretsClient, err error)
    func (client *SecretsClient) ConfigurationProvider() *common.ConfigurationProvider
    func (client SecretsClient) GetSecretBundle(ctx context.Context, request GetSecretBundleRequest) (response GetSecretBundleResponse, err error)
    func (client SecretsClient) ListSecretBundleVersions(ctx context.Context, request ListSecretBundleVersionsRequest) (response ListSecretBundleVersionsResponse, err error)
    func (client *SecretsClient) SetRegion(region string)

Package files

base64_secret_bundle_content_details.go get_secret_bundle_request_response.go list_secret_bundle_versions_request_response.go secret_bundle.go secret_bundle_content_details.go secret_bundle_version_summary.go secrets_client.go

type Base64SecretBundleContentDetails

Base64SecretBundleContentDetails The contents of the secret.

type Base64SecretBundleContentDetails struct {

    // The base64-encoded content of the secret.
    Content *string `mandatory:"false" json:"content"`
}

func (Base64SecretBundleContentDetails) MarshalJSON

func (m Base64SecretBundleContentDetails) MarshalJSON() (buff []byte, e error)

MarshalJSON marshals to json representation

func (Base64SecretBundleContentDetails) String

func (m Base64SecretBundleContentDetails) String() string

type GetSecretBundleRequest

GetSecretBundleRequest wrapper for the GetSecretBundle operation

See also

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 (GetSecretBundleRequest) HTTPRequest

func (request GetSecretBundleRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (GetSecretBundleRequest) RetryPolicy

func (request GetSecretBundleRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (GetSecretBundleRequest) String

func (request GetSecretBundleRequest) String() string

type GetSecretBundleResponse

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 (GetSecretBundleResponse) HTTPResponse

func (response GetSecretBundleResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (GetSecretBundleResponse) String

func (response GetSecretBundleResponse) String() string

type GetSecretBundleStageEnum

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

func GetGetSecretBundleStageEnumValues() []GetSecretBundleStageEnum

GetGetSecretBundleStageEnumValues Enumerates the set of values for GetSecretBundleStageEnum

type ListSecretBundleVersionsRequest

ListSecretBundleVersionsRequest wrapper for the ListSecretBundleVersions operation

See also

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 (ListSecretBundleVersionsRequest) HTTPRequest

func (request ListSecretBundleVersionsRequest) HTTPRequest(method, path string) (http.Request, error)

HTTPRequest implements the OCIRequest interface

func (ListSecretBundleVersionsRequest) RetryPolicy

func (request ListSecretBundleVersionsRequest) RetryPolicy() *common.RetryPolicy

RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.

func (ListSecretBundleVersionsRequest) String

func (request ListSecretBundleVersionsRequest) String() string

type ListSecretBundleVersionsResponse

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 (ListSecretBundleVersionsResponse) HTTPResponse

func (response ListSecretBundleVersionsResponse) HTTPResponse() *http.Response

HTTPResponse implements the OCIResponse interface

func (ListSecretBundleVersionsResponse) String

func (response ListSecretBundleVersionsResponse) String() string

type ListSecretBundleVersionsSortByEnum

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

func GetListSecretBundleVersionsSortByEnumValues() []ListSecretBundleVersionsSortByEnum

GetListSecretBundleVersionsSortByEnumValues Enumerates the set of values for ListSecretBundleVersionsSortByEnum

type ListSecretBundleVersionsSortOrderEnum

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

func GetListSecretBundleVersionsSortOrderEnumValues() []ListSecretBundleVersionsSortOrderEnum

GetListSecretBundleVersionsSortOrderEnumValues Enumerates the set of values for ListSecretBundleVersionsSortOrderEnum

type SecretBundle

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 (SecretBundle) String

func (m SecretBundle) String() string

func (*SecretBundle) UnmarshalJSON

func (m *SecretBundle) UnmarshalJSON(data []byte) (e error)

UnmarshalJSON unmarshals from json

type SecretBundleContentDetails

SecretBundleContentDetails The contents of the secret.

type SecretBundleContentDetails interface {
}

type SecretBundleContentDetailsContentTypeEnum

SecretBundleContentDetailsContentTypeEnum Enum with underlying type: string

type SecretBundleContentDetailsContentTypeEnum string

Set of constants representing the allowable values for SecretBundleContentDetailsContentTypeEnum

const (
    SecretBundleContentDetailsContentTypeBase64 SecretBundleContentDetailsContentTypeEnum = "BASE64"
)

func GetSecretBundleContentDetailsContentTypeEnumValues

func GetSecretBundleContentDetailsContentTypeEnumValues() []SecretBundleContentDetailsContentTypeEnum

GetSecretBundleContentDetailsContentTypeEnumValues Enumerates the set of values for SecretBundleContentDetailsContentTypeEnum

type SecretBundleStagesEnum

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

func GetSecretBundleStagesEnumValues() []SecretBundleStagesEnum

GetSecretBundleStagesEnumValues Enumerates the set of values for SecretBundleStagesEnum

type SecretBundleVersionSummary

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 (SecretBundleVersionSummary) String

func (m SecretBundleVersionSummary) String() string

type SecretBundleVersionSummaryStagesEnum

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

func GetSecretBundleVersionSummaryStagesEnumValues() []SecretBundleVersionSummaryStagesEnum

GetSecretBundleVersionSummaryStagesEnumValues Enumerates the set of values for SecretBundleVersionSummaryStagesEnum

type SecretsClient

SecretsClient a client for Secrets

type SecretsClient struct {
    common.BaseClient
    // contains filtered or unexported fields
}

func NewSecretsClientWithConfigurationProvider

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

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 (*SecretsClient) ConfigurationProvider

func (client *SecretsClient) ConfigurationProvider() *common.ConfigurationProvider

ConfigurationProvider the ConfigurationProvider used in this client, or null if none set

func (SecretsClient) GetSecretBundle

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.

See also

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 (SecretsClient) ListSecretBundleVersions

func (client SecretsClient) ListSecretBundleVersions(ctx context.Context, request ListSecretBundleVersionsRequest) (response ListSecretBundleVersionsResponse, err error)

ListSecretBundleVersions Lists all secret bundle versions for the specified secret.

See also

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 (*SecretsClient) SetRegion

func (client *SecretsClient) SetRegion(region string)

SetRegion overrides the region of this client.