mastersites

package
v0.20230727.1144132 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/mastersites Documentation

The mastersites SDK allows for interaction with the Azure Resource Manager Service migrate (API Version 2020-07-07).

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/migrate/2020-07-07/mastersites"

Client Initialization

client := mastersites.NewMasterSitesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MasterSitesClient.DeleteSite

ctx := context.TODO()
id := mastersites.NewMasterSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "masterSiteValue")

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

Example Usage: MasterSitesClient.GetSite

ctx := context.TODO()
id := mastersites.NewMasterSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "masterSiteValue")

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

Example Usage: MasterSitesClient.List

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

// 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: MasterSitesClient.ListBySubscription

ctx := context.TODO()
id := mastersites.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: MasterSitesClient.PatchSite

ctx := context.TODO()
id := mastersites.NewMasterSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "masterSiteValue")

payload := mastersites.MasterSite{
	// ...
}


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

Example Usage: MasterSitesClient.PutSite

ctx := context.TODO()
id := mastersites.NewMasterSiteID("12345678-1234-9876-4563-123456789012", "example-resource-group", "masterSiteValue")

payload := mastersites.MasterSite{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForPublicNetworkAccess

func PossibleValuesForPublicNetworkAccess() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateMasterSiteID

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

ValidateMasterSiteID checks that 'input' can be parsed as a Master Site ID

Types

type DeleteSiteOperationResponse

type DeleteSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetSiteOperationResponse

type GetSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MasterSite
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []MasterSite
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]MasterSite
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []MasterSite
}

type ListOperationResponse

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

type MasterSite

type MasterSite struct {
	ETag       *string                `json:"eTag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Location   *string                `json:"location,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *MasterSiteProperties  `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type MasterSiteId

type MasterSiteId struct {
	SubscriptionId    string
	ResourceGroupName string
	MasterSiteName    string
}

MasterSiteId is a struct representing the Resource ID for a Master Site

func NewMasterSiteID

func NewMasterSiteID(subscriptionId string, resourceGroupName string, masterSiteName string) MasterSiteId

NewMasterSiteID returns a new MasterSiteId struct

func ParseMasterSiteID

func ParseMasterSiteID(input string) (*MasterSiteId, error)

ParseMasterSiteID parses 'input' into a MasterSiteId

func ParseMasterSiteIDInsensitively

func ParseMasterSiteIDInsensitively(input string) (*MasterSiteId, error)

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

func (MasterSiteId) ID

func (id MasterSiteId) ID() string

ID returns the formatted Master Site ID

func (MasterSiteId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Master Site ID

func (MasterSiteId) String

func (id MasterSiteId) String() string

String returns a human-readable description of this Master Site ID

type MasterSiteOperationPredicate

type MasterSiteOperationPredicate struct {
	ETag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (MasterSiteOperationPredicate) Matches

func (p MasterSiteOperationPredicate) Matches(input MasterSite) bool

type MasterSiteProperties

type MasterSiteProperties struct {
	AllowMultipleSites          *bool                        `json:"allowMultipleSites,omitempty"`
	CustomerStorageAccountArmId *string                      `json:"customerStorageAccountArmId,omitempty"`
	PrivateEndpointConnections  *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
	PublicNetworkAccess         *PublicNetworkAccess         `json:"publicNetworkAccess,omitempty"`
	Sites                       *[]string                    `json:"sites,omitempty"`
}

type MasterSitesClient

type MasterSitesClient struct {
	Client *resourcemanager.Client
}

func NewMasterSitesClientWithBaseURI

func NewMasterSitesClientWithBaseURI(api environments.Api) (*MasterSitesClient, error)

func (MasterSitesClient) DeleteSite

func (c MasterSitesClient) DeleteSite(ctx context.Context, id MasterSiteId) (result DeleteSiteOperationResponse, err error)

DeleteSite ...

func (MasterSitesClient) GetSite

GetSite ...

func (MasterSitesClient) List

List ...

func (MasterSitesClient) ListBySubscription

ListBySubscription ...

func (MasterSitesClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (MasterSitesClient) ListBySubscriptionCompleteMatchingPredicate

func (c MasterSitesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MasterSiteOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MasterSitesClient) ListComplete

ListComplete retrieves all the results into a single object

func (MasterSitesClient) ListCompleteMatchingPredicate

func (c MasterSitesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MasterSiteOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MasterSitesClient) PatchSite

func (c MasterSitesClient) PatchSite(ctx context.Context, id MasterSiteId, input MasterSite) (result PatchSiteOperationResponse, err error)

PatchSite ...

func (MasterSitesClient) PutSite

func (c MasterSitesClient) PutSite(ctx context.Context, id MasterSiteId, input MasterSite) (result PutSiteOperationResponse, err error)

PutSite ...

type PatchSiteOperationResponse

type PatchSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MasterSite
}

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	ETag       *string                              `json:"eTag,omitempty"`
	Id         *string                              `json:"id,omitempty"`
	Name       *string                              `json:"name,omitempty"`
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData               `json:"systemData,omitempty"`
	Type       *string                              `json:"type,omitempty"`
}

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	PrivateEndpoint                   *ResourceId                        `json:"privateEndpoint,omitempty"`
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
	ProvisioningState                 *ProvisioningState                 `json:"provisioningState,omitempty"`
}

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	ActionsRequired *string `json:"actionsRequired,omitempty"`
	Description     *string `json:"description,omitempty"`
	Status          *Status `json:"status,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted   ProvisioningState = "Accepted"
	ProvisioningStateFailed     ProvisioningState = "Failed"
	ProvisioningStateInProgress ProvisioningState = "InProgress"
	ProvisioningStateSucceeded  ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON added in v0.20230516.1215417

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

type PublicNetworkAccess

type PublicNetworkAccess string
const (
	PublicNetworkAccessDisabled     PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled      PublicNetworkAccess = "Enabled"
	PublicNetworkAccessNotSpecified PublicNetworkAccess = "NotSpecified"
)

func (*PublicNetworkAccess) UnmarshalJSON added in v0.20230516.1215417

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

type PutSiteOperationResponse

type PutSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type ResourceId

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

type Status

type Status string
const (
	StatusApproved     Status = "Approved"
	StatusDisconnected Status = "Disconnected"
	StatusPending      Status = "Pending"
	StatusRejected     Status = "Rejected"
)

func (*Status) UnmarshalJSON added in v0.20230516.1215417

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

Jump to

Keyboard shortcuts

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