credentialsets

package
v0.20240227.1200200 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2023-07-01/credentialsets Documentation

The credentialsets SDK allows for interaction with the Azure Resource Manager Service containerregistry (API Version 2023-07-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/containerregistry/2023-07-01/credentialsets"

Client Initialization

client := credentialsets.NewCredentialSetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CredentialSetsClient.Create

ctx := context.TODO()
id := credentialsets.NewCredentialSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "credentialSetValue")

payload := credentialsets.CredentialSet{
	// ...
}


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

Example Usage: CredentialSetsClient.Delete

ctx := context.TODO()
id := credentialsets.NewCredentialSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "credentialSetValue")

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

Example Usage: CredentialSetsClient.Get

ctx := context.TODO()
id := credentialsets.NewCredentialSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "credentialSetValue")

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: CredentialSetsClient.List

ctx := context.TODO()
id := credentialsets.NewRegistryID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue")

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

Example Usage: CredentialSetsClient.Update

ctx := context.TODO()
id := credentialsets.NewCredentialSetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "registryValue", "credentialSetValue")

payload := credentialsets.CredentialSetUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForCredentialHealthStatus

func PossibleValuesForCredentialHealthStatus() []string

func PossibleValuesForCredentialName

func PossibleValuesForCredentialName() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateCredentialSetID

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

ValidateCredentialSetID checks that 'input' can be parsed as a Credential Set ID

func ValidateRegistryID

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

ValidateRegistryID checks that 'input' can be parsed as a Registry ID

Types

type AuthCredential

type AuthCredential struct {
	CredentialHealth         *CredentialHealth `json:"credentialHealth,omitempty"`
	Name                     *CredentialName   `json:"name,omitempty"`
	PasswordSecretIdentifier *string           `json:"passwordSecretIdentifier,omitempty"`
	UsernameSecretIdentifier *string           `json:"usernameSecretIdentifier,omitempty"`
}

type CreateOperationResponse

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

type CredentialHealth

type CredentialHealth struct {
	ErrorCode    *string                 `json:"errorCode,omitempty"`
	ErrorMessage *string                 `json:"errorMessage,omitempty"`
	Status       *CredentialHealthStatus `json:"status,omitempty"`
}

type CredentialHealthStatus

type CredentialHealthStatus string
const (
	CredentialHealthStatusHealthy   CredentialHealthStatus = "Healthy"
	CredentialHealthStatusUnhealthy CredentialHealthStatus = "Unhealthy"
)

func (*CredentialHealthStatus) UnmarshalJSON

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

type CredentialName

type CredentialName string
const (
	CredentialNameCredentialOne CredentialName = "Credential1"
)

func (*CredentialName) UnmarshalJSON

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

type CredentialSet

type CredentialSet struct {
	Id         *string                            `json:"id,omitempty"`
	Identity   *identity.SystemAndUserAssignedMap `json:"identity,omitempty"`
	Name       *string                            `json:"name,omitempty"`
	Properties *CredentialSetProperties           `json:"properties,omitempty"`
	SystemData *systemdata.SystemData             `json:"systemData,omitempty"`
	Type       *string                            `json:"type,omitempty"`
}

type CredentialSetId

type CredentialSetId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
	CredentialSetName string
}

CredentialSetId is a struct representing the Resource ID for a Credential Set

func NewCredentialSetID

func NewCredentialSetID(subscriptionId string, resourceGroupName string, registryName string, credentialSetName string) CredentialSetId

NewCredentialSetID returns a new CredentialSetId struct

func ParseCredentialSetID

func ParseCredentialSetID(input string) (*CredentialSetId, error)

ParseCredentialSetID parses 'input' into a CredentialSetId

func ParseCredentialSetIDInsensitively

func ParseCredentialSetIDInsensitively(input string) (*CredentialSetId, error)

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

func (*CredentialSetId) FromParseResult

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

func (CredentialSetId) ID

func (id CredentialSetId) ID() string

ID returns the formatted Credential Set ID

func (CredentialSetId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Credential Set ID

func (CredentialSetId) String

func (id CredentialSetId) String() string

String returns a human-readable description of this Credential Set ID

type CredentialSetOperationPredicate

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

func (CredentialSetOperationPredicate) Matches

type CredentialSetProperties

type CredentialSetProperties struct {
	AuthCredentials   *[]AuthCredential  `json:"authCredentials,omitempty"`
	CreationDate      *string            `json:"creationDate,omitempty"`
	LoginServer       *string            `json:"loginServer,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
}

func (*CredentialSetProperties) GetCreationDateAsTime

func (o *CredentialSetProperties) GetCreationDateAsTime() (*time.Time, error)

func (*CredentialSetProperties) SetCreationDateAsTime

func (o *CredentialSetProperties) SetCreationDateAsTime(input time.Time)

type CredentialSetUpdateParameters

type CredentialSetUpdateParameters struct {
	Identity   *identity.SystemAndUserAssignedMap `json:"identity,omitempty"`
	Properties *CredentialSetUpdateProperties     `json:"properties,omitempty"`
}

type CredentialSetUpdateProperties

type CredentialSetUpdateProperties struct {
	AuthCredentials *[]AuthCredential `json:"authCredentials,omitempty"`
}

type CredentialSetsClient

type CredentialSetsClient struct {
	Client *resourcemanager.Client
}

func NewCredentialSetsClientWithBaseURI

func NewCredentialSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*CredentialSetsClient, error)

func (CredentialSetsClient) Create

Create ...

func (CredentialSetsClient) CreateThenPoll

func (c CredentialSetsClient) CreateThenPoll(ctx context.Context, id CredentialSetId, input CredentialSet) error

CreateThenPoll performs Create then polls until it's completed

func (CredentialSetsClient) Delete

Delete ...

func (CredentialSetsClient) DeleteThenPoll

func (c CredentialSetsClient) DeleteThenPoll(ctx context.Context, id CredentialSetId) error

DeleteThenPoll performs Delete then polls until it's completed

func (CredentialSetsClient) Get

Get ...

func (CredentialSetsClient) List

List ...

func (CredentialSetsClient) ListComplete

ListComplete retrieves all the results into a single object

func (CredentialSetsClient) ListCompleteMatchingPredicate

func (c CredentialSetsClient) ListCompleteMatchingPredicate(ctx context.Context, id RegistryId, predicate CredentialSetOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (CredentialSetsClient) Update

Update ...

func (CredentialSetsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CredentialSet
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CredentialSet
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type RegistryId

type RegistryId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
}

RegistryId is a struct representing the Resource ID for a Registry

func NewRegistryID

func NewRegistryID(subscriptionId string, resourceGroupName string, registryName string) RegistryId

NewRegistryID returns a new RegistryId struct

func ParseRegistryID

func ParseRegistryID(input string) (*RegistryId, error)

ParseRegistryID parses 'input' into a RegistryId

func ParseRegistryIDInsensitively

func ParseRegistryIDInsensitively(input string) (*RegistryId, error)

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

func (*RegistryId) FromParseResult

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

func (RegistryId) ID

func (id RegistryId) ID() string

ID returns the formatted Registry ID

func (RegistryId) Segments

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

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

func (RegistryId) String

func (id RegistryId) String() string

String returns a human-readable description of this Registry ID

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CredentialSet
}

Jump to

Keyboard shortcuts

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