secrets

package
v0.20241023.1122425 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/secrets Documentation

The secrets SDK allows for interaction with Azure Resource Manager cdn (API Version 2024-02-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/cdn/2024-02-01/secrets"

Client Initialization

client := secrets.NewSecretsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SecretsClient.Create

ctx := context.TODO()
id := secrets.NewSecretID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "secretName")

payload := secrets.Secret{
	// ...
}


if err := client.CreateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: SecretsClient.Delete

ctx := context.TODO()
id := secrets.NewSecretID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "secretName")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: SecretsClient.Get

ctx := context.TODO()
id := secrets.NewSecretID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName", "secretName")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SecretsClient.ListByProfile

ctx := context.TODO()
id := secrets.NewProfileID("12345678-1234-9876-4563-123456789012", "example-resource-group", "profileName")

// alternatively `client.ListByProfile(ctx, id)` can be used to do batched pagination
items, err := client.ListByProfileComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAfdProvisioningState

func PossibleValuesForAfdProvisioningState() []string

func PossibleValuesForDeploymentStatus

func PossibleValuesForDeploymentStatus() []string

func PossibleValuesForSecretType

func PossibleValuesForSecretType() []string

func ValidateProfileID

func ValidateProfileID(input interface{}, key string) (warnings []string, errors []error)

ValidateProfileID checks that 'input' can be parsed as a Profile ID

func ValidateSecretID

func ValidateSecretID(input interface{}, key string) (warnings []string, errors []error)

ValidateSecretID checks that 'input' can be parsed as a Secret ID

Types

type AfdProvisioningState

type AfdProvisioningState string
const (
	AfdProvisioningStateCreating  AfdProvisioningState = "Creating"
	AfdProvisioningStateDeleting  AfdProvisioningState = "Deleting"
	AfdProvisioningStateFailed    AfdProvisioningState = "Failed"
	AfdProvisioningStateSucceeded AfdProvisioningState = "Succeeded"
	AfdProvisioningStateUpdating  AfdProvisioningState = "Updating"
)

func (*AfdProvisioningState) UnmarshalJSON

func (s *AfdProvisioningState) UnmarshalJSON(bytes []byte) error

type AzureFirstPartyManagedCertificateParameters

type AzureFirstPartyManagedCertificateParameters struct {
	CertificateAuthority    *string            `json:"certificateAuthority,omitempty"`
	ExpirationDate          *string            `json:"expirationDate,omitempty"`
	SecretSource            *ResourceReference `json:"secretSource,omitempty"`
	Subject                 *string            `json:"subject,omitempty"`
	SubjectAlternativeNames *[]string          `json:"subjectAlternativeNames,omitempty"`
	Thumbprint              *string            `json:"thumbprint,omitempty"`

	Type SecretType `json:"type"`
}

func (AzureFirstPartyManagedCertificateParameters) MarshalJSON

func (AzureFirstPartyManagedCertificateParameters) SecretParameters

type BaseSecretParametersImpl

type BaseSecretParametersImpl struct {
	Type SecretType `json:"type"`
}

func (BaseSecretParametersImpl) SecretParameters

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Secret
}

type CustomerCertificateParameters

type CustomerCertificateParameters struct {
	CertificateAuthority    *string           `json:"certificateAuthority,omitempty"`
	ExpirationDate          *string           `json:"expirationDate,omitempty"`
	SecretSource            ResourceReference `json:"secretSource"`
	SecretVersion           *string           `json:"secretVersion,omitempty"`
	Subject                 *string           `json:"subject,omitempty"`
	SubjectAlternativeNames *[]string         `json:"subjectAlternativeNames,omitempty"`
	Thumbprint              *string           `json:"thumbprint,omitempty"`
	UseLatestVersion        *bool             `json:"useLatestVersion,omitempty"`

	Type SecretType `json:"type"`
}

func (CustomerCertificateParameters) MarshalJSON

func (s CustomerCertificateParameters) MarshalJSON() ([]byte, error)

func (CustomerCertificateParameters) SecretParameters

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DeploymentStatus

type DeploymentStatus string
const (
	DeploymentStatusFailed     DeploymentStatus = "Failed"
	DeploymentStatusInProgress DeploymentStatus = "InProgress"
	DeploymentStatusNotStarted DeploymentStatus = "NotStarted"
	DeploymentStatusSucceeded  DeploymentStatus = "Succeeded"
)

func (*DeploymentStatus) UnmarshalJSON

func (s *DeploymentStatus) UnmarshalJSON(bytes []byte) error

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Secret
}

type ListByProfileCompleteResult

type ListByProfileCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Secret
}

type ListByProfileCustomPager

type ListByProfileCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByProfileCustomPager) NextPageLink() *odata.Link

type ListByProfileOperationResponse

type ListByProfileOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Secret
}

type ManagedCertificateParameters

type ManagedCertificateParameters struct {
	ExpirationDate *string `json:"expirationDate,omitempty"`
	Subject        *string `json:"subject,omitempty"`

	Type SecretType `json:"type"`
}

func (ManagedCertificateParameters) MarshalJSON

func (s ManagedCertificateParameters) MarshalJSON() ([]byte, error)

func (ManagedCertificateParameters) SecretParameters

type ProfileId

type ProfileId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
}

ProfileId is a struct representing the Resource ID for a Profile

func NewProfileID

func NewProfileID(subscriptionId string, resourceGroupName string, profileName string) ProfileId

NewProfileID returns a new ProfileId struct

func ParseProfileID

func ParseProfileID(input string) (*ProfileId, error)

ParseProfileID parses 'input' into a ProfileId

func ParseProfileIDInsensitively

func ParseProfileIDInsensitively(input string) (*ProfileId, error)

ParseProfileIDInsensitively parses 'input' case-insensitively into a ProfileId note: this method should only be used for API response data and not user input

func (*ProfileId) FromParseResult

func (id *ProfileId) FromParseResult(input resourceids.ParseResult) error

func (ProfileId) ID

func (id ProfileId) ID() string

ID returns the formatted Profile ID

func (ProfileId) Segments

func (id ProfileId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Profile ID

func (ProfileId) String

func (id ProfileId) String() string

String returns a human-readable description of this Profile ID

type RawSecretParametersImpl

type RawSecretParametersImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawSecretParametersImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawSecretParametersImpl) SecretParameters

type ResourceReference

type ResourceReference struct {
	Id *string `json:"id,omitempty"`
}

type Secret

type Secret struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *SecretProperties      `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type SecretId

type SecretId struct {
	SubscriptionId    string
	ResourceGroupName string
	ProfileName       string
	SecretName        string
}

SecretId is a struct representing the Resource ID for a Secret

func NewSecretID

func NewSecretID(subscriptionId string, resourceGroupName string, profileName string, secretName string) SecretId

NewSecretID returns a new SecretId struct

func ParseSecretID

func ParseSecretID(input string) (*SecretId, error)

ParseSecretID parses 'input' into a SecretId

func ParseSecretIDInsensitively

func ParseSecretIDInsensitively(input string) (*SecretId, error)

ParseSecretIDInsensitively parses 'input' case-insensitively into a SecretId note: this method should only be used for API response data and not user input

func (*SecretId) FromParseResult

func (id *SecretId) FromParseResult(input resourceids.ParseResult) error

func (SecretId) ID

func (id SecretId) ID() string

ID returns the formatted Secret ID

func (SecretId) Segments

func (id SecretId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Secret ID

func (SecretId) String

func (id SecretId) String() string

String returns a human-readable description of this Secret ID

type SecretOperationPredicate

type SecretOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (SecretOperationPredicate) Matches

func (p SecretOperationPredicate) Matches(input Secret) bool

type SecretParameters

type SecretParameters interface {
	SecretParameters() BaseSecretParametersImpl
}

func UnmarshalSecretParametersImplementation

func UnmarshalSecretParametersImplementation(input []byte) (SecretParameters, error)

type SecretProperties

type SecretProperties struct {
	DeploymentStatus  *DeploymentStatus     `json:"deploymentStatus,omitempty"`
	Parameters        SecretParameters      `json:"parameters"`
	ProfileName       *string               `json:"profileName,omitempty"`
	ProvisioningState *AfdProvisioningState `json:"provisioningState,omitempty"`
}

func (*SecretProperties) UnmarshalJSON

func (s *SecretProperties) UnmarshalJSON(bytes []byte) error

type SecretType

type SecretType string
const (
	SecretTypeAzureFirstPartyManagedCertificate SecretType = "AzureFirstPartyManagedCertificate"
	SecretTypeCustomerCertificate               SecretType = "CustomerCertificate"
	SecretTypeManagedCertificate                SecretType = "ManagedCertificate"
	SecretTypeURLSigningKey                     SecretType = "UrlSigningKey"
)

func (*SecretType) UnmarshalJSON

func (s *SecretType) UnmarshalJSON(bytes []byte) error

type SecretsClient

type SecretsClient struct {
	Client *resourcemanager.Client
}

func NewSecretsClientWithBaseURI

func NewSecretsClientWithBaseURI(sdkApi sdkEnv.Api) (*SecretsClient, error)

func (SecretsClient) Create

func (c SecretsClient) Create(ctx context.Context, id SecretId, input Secret) (result CreateOperationResponse, err error)

Create ...

func (SecretsClient) CreateThenPoll

func (c SecretsClient) CreateThenPoll(ctx context.Context, id SecretId, input Secret) error

CreateThenPoll performs Create then polls until it's completed

func (SecretsClient) Delete

func (c SecretsClient) Delete(ctx context.Context, id SecretId) (result DeleteOperationResponse, err error)

Delete ...

func (SecretsClient) DeleteThenPoll

func (c SecretsClient) DeleteThenPoll(ctx context.Context, id SecretId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SecretsClient) Get

func (c SecretsClient) Get(ctx context.Context, id SecretId) (result GetOperationResponse, err error)

Get ...

func (SecretsClient) ListByProfile

func (c SecretsClient) ListByProfile(ctx context.Context, id ProfileId) (result ListByProfileOperationResponse, err error)

ListByProfile ...

func (SecretsClient) ListByProfileComplete

func (c SecretsClient) ListByProfileComplete(ctx context.Context, id ProfileId) (ListByProfileCompleteResult, error)

ListByProfileComplete retrieves all the results into a single object

func (SecretsClient) ListByProfileCompleteMatchingPredicate

func (c SecretsClient) ListByProfileCompleteMatchingPredicate(ctx context.Context, id ProfileId, predicate SecretOperationPredicate) (result ListByProfileCompleteResult, err error)

ListByProfileCompleteMatchingPredicate retrieves all the results and then applies the predicate

type URLSigningKeyParameters added in v0.20241009.1142232

type URLSigningKeyParameters struct {
	KeyId         string            `json:"keyId"`
	SecretSource  ResourceReference `json:"secretSource"`
	SecretVersion *string           `json:"secretVersion,omitempty"`

	Type SecretType `json:"type"`
}

func (URLSigningKeyParameters) MarshalJSON added in v0.20241009.1142232

func (s URLSigningKeyParameters) MarshalJSON() ([]byte, error)

func (URLSigningKeyParameters) SecretParameters added in v0.20241009.1142232

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL