replications

package
v0.20230417.1133559 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerregistry/2021-08-01-preview/replications Documentation

The replications SDK allows for interaction with the Azure Resource Manager Service containerregistry (API Version 2021-08-01-preview).

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/2021-08-01-preview/replications"

Client Initialization

client := replications.NewReplicationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReplicationsClient.Create

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

payload := replications.Replication{
	// ...
}


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

Example Usage: ReplicationsClient.Delete

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

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

Example Usage: ReplicationsClient.Get

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

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

ctx := context.TODO()
id := replications.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: ReplicationsClient.Update

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

payload := replications.ReplicationUpdateParameters{
	// ...
}


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 PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForZoneRedundancy

func PossibleValuesForZoneRedundancy() []string

func ValidateRegistryID

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

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

func ValidateReplicationID

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

ValidateReplicationID checks that 'input' can be parsed as a Replication ID

Types

type CreateOperationResponse

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

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        *Replication
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []Replication
}

type ListOperationResponse

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

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 added in v0.20230406.1124617

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) 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 Replication

type Replication struct {
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties *ReplicationProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ReplicationId

type ReplicationId struct {
	SubscriptionId    string
	ResourceGroupName string
	RegistryName      string
	ReplicationName   string
}

ReplicationId is a struct representing the Resource ID for a Replication

func NewReplicationID

func NewReplicationID(subscriptionId string, resourceGroupName string, registryName string, replicationName string) ReplicationId

NewReplicationID returns a new ReplicationId struct

func ParseReplicationID

func ParseReplicationID(input string) (*ReplicationId, error)

ParseReplicationID parses 'input' into a ReplicationId

func ParseReplicationIDInsensitively

func ParseReplicationIDInsensitively(input string) (*ReplicationId, error)

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

func (ReplicationId) ID

func (id ReplicationId) ID() string

ID returns the formatted Replication ID

func (ReplicationId) Segments

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

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

func (ReplicationId) String

func (id ReplicationId) String() string

String returns a human-readable description of this Replication ID

type ReplicationOperationPredicate

type ReplicationOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ReplicationOperationPredicate) Matches

type ReplicationProperties

type ReplicationProperties struct {
	ProvisioningState     *ProvisioningState `json:"provisioningState,omitempty"`
	RegionEndpointEnabled *bool              `json:"regionEndpointEnabled,omitempty"`
	Status                *Status            `json:"status,omitempty"`
	ZoneRedundancy        *ZoneRedundancy    `json:"zoneRedundancy,omitempty"`
}

type ReplicationUpdateParameters

type ReplicationUpdateParameters struct {
	Properties *ReplicationUpdateParametersProperties `json:"properties,omitempty"`
	Tags       *map[string]string                     `json:"tags,omitempty"`
}

type ReplicationUpdateParametersProperties

type ReplicationUpdateParametersProperties struct {
	RegionEndpointEnabled *bool `json:"regionEndpointEnabled,omitempty"`
}

type ReplicationsClient

type ReplicationsClient struct {
	Client *resourcemanager.Client
}

func NewReplicationsClientWithBaseURI

func NewReplicationsClientWithBaseURI(api environments.Api) (*ReplicationsClient, error)

func (ReplicationsClient) Create

Create ...

func (ReplicationsClient) CreateThenPoll

func (c ReplicationsClient) CreateThenPoll(ctx context.Context, id ReplicationId, input Replication) error

CreateThenPoll performs Create then polls until it's completed

func (ReplicationsClient) Delete

Delete ...

func (ReplicationsClient) DeleteThenPoll

func (c ReplicationsClient) DeleteThenPoll(ctx context.Context, id ReplicationId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ReplicationsClient) Get

Get ...

func (ReplicationsClient) List

List ...

func (ReplicationsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ReplicationsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ReplicationsClient) Update

Update ...

func (ReplicationsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type Status

type Status struct {
	DisplayStatus *string `json:"displayStatus,omitempty"`
	Message       *string `json:"message,omitempty"`
	Timestamp     *string `json:"timestamp,omitempty"`
}

func (*Status) GetTimestampAsTime

func (o *Status) GetTimestampAsTime() (*time.Time, error)

func (*Status) SetTimestampAsTime

func (o *Status) SetTimestampAsTime(input time.Time)

type UpdateOperationResponse

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

type ZoneRedundancy

type ZoneRedundancy string
const (
	ZoneRedundancyDisabled ZoneRedundancy = "Disabled"
	ZoneRedundancyEnabled  ZoneRedundancy = "Enabled"
)

func (*ZoneRedundancy) UnmarshalJSON added in v0.20230406.1124617

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

Jump to

Keyboard shortcuts

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