natgateways

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: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/natgateways Documentation

The natgateways SDK allows for interaction with Azure Resource Manager network (API Version 2023-09-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/natgateways"

Client Initialization

client := natgateways.NewNatGatewaysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NatGatewaysClient.CreateOrUpdate

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

payload := natgateways.NatGateway{
	// ...
}


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

Example Usage: NatGatewaysClient.Delete

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

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

Example Usage: NatGatewaysClient.Get

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

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

Example Usage: NatGatewaysClient.List

ctx := context.TODO()
id := commonids.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: NatGatewaysClient.ListAll

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

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

Example Usage: NatGatewaysClient.UpdateTags

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

payload := natgateways.TagsObject{
	// ...
}


read, err := client.UpdateTags(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 PossibleValuesForNatGatewaySkuName

func PossibleValuesForNatGatewaySkuName() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateNatGatewayID

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

ValidateNatGatewayID checks that 'input' can be parsed as a Nat Gateway ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NatGateway
}

type DeleteOperationResponse

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

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListAllCompleteResult

type ListAllCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []NatGateway
}

type ListAllCustomPager added in v0.20240628.1153531

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

type ListAllOperationResponse

type ListAllOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]NatGateway
}

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

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

type ListOperationResponse

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

type NatGateway

type NatGateway struct {
	Etag       *string                     `json:"etag,omitempty"`
	Id         *string                     `json:"id,omitempty"`
	Location   *string                     `json:"location,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *NatGatewayPropertiesFormat `json:"properties,omitempty"`
	Sku        *NatGatewaySku              `json:"sku,omitempty"`
	Tags       *map[string]string          `json:"tags,omitempty"`
	Type       *string                     `json:"type,omitempty"`
	Zones      *zones.Schema               `json:"zones,omitempty"`
}

type NatGatewayId

type NatGatewayId struct {
	SubscriptionId    string
	ResourceGroupName string
	NatGatewayName    string
}

NatGatewayId is a struct representing the Resource ID for a Nat Gateway

func NewNatGatewayID

func NewNatGatewayID(subscriptionId string, resourceGroupName string, natGatewayName string) NatGatewayId

NewNatGatewayID returns a new NatGatewayId struct

func ParseNatGatewayID

func ParseNatGatewayID(input string) (*NatGatewayId, error)

ParseNatGatewayID parses 'input' into a NatGatewayId

func ParseNatGatewayIDInsensitively

func ParseNatGatewayIDInsensitively(input string) (*NatGatewayId, error)

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

func (*NatGatewayId) FromParseResult

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

func (NatGatewayId) ID

func (id NatGatewayId) ID() string

ID returns the formatted Nat Gateway ID

func (NatGatewayId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Nat Gateway ID

func (NatGatewayId) String

func (id NatGatewayId) String() string

String returns a human-readable description of this Nat Gateway ID

type NatGatewayOperationPredicate

type NatGatewayOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (NatGatewayOperationPredicate) Matches

func (p NatGatewayOperationPredicate) Matches(input NatGateway) bool

type NatGatewayPropertiesFormat

type NatGatewayPropertiesFormat struct {
	IdleTimeoutInMinutes *int64             `json:"idleTimeoutInMinutes,omitempty"`
	ProvisioningState    *ProvisioningState `json:"provisioningState,omitempty"`
	PublicIPAddresses    *[]SubResource     `json:"publicIpAddresses,omitempty"`
	PublicIPPrefixes     *[]SubResource     `json:"publicIpPrefixes,omitempty"`
	ResourceGuid         *string            `json:"resourceGuid,omitempty"`
	Subnets              *[]SubResource     `json:"subnets,omitempty"`
}

type NatGatewaySku

type NatGatewaySku struct {
	Name *NatGatewaySkuName `json:"name,omitempty"`
}

type NatGatewaySkuName

type NatGatewaySkuName string
const (
	NatGatewaySkuNameStandard NatGatewaySkuName = "Standard"
)

func (*NatGatewaySkuName) UnmarshalJSON

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

type NatGatewaysClient

type NatGatewaysClient struct {
	Client *resourcemanager.Client
}

func NewNatGatewaysClientWithBaseURI

func NewNatGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*NatGatewaysClient, error)

func (NatGatewaysClient) CreateOrUpdate

func (c NatGatewaysClient) CreateOrUpdate(ctx context.Context, id NatGatewayId, input NatGateway) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (NatGatewaysClient) CreateOrUpdateThenPoll

func (c NatGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id NatGatewayId, input NatGateway) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (NatGatewaysClient) Delete

Delete ...

func (NatGatewaysClient) DeleteThenPoll

func (c NatGatewaysClient) DeleteThenPoll(ctx context.Context, id NatGatewayId) error

DeleteThenPoll performs Delete then polls until it's completed

func (NatGatewaysClient) Get

Get ...

func (NatGatewaysClient) List

List ...

func (NatGatewaysClient) ListAll

ListAll ...

func (NatGatewaysClient) ListAllComplete

ListAllComplete retrieves all the results into a single object

func (NatGatewaysClient) ListAllCompleteMatchingPredicate

func (c NatGatewaysClient) ListAllCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate NatGatewayOperationPredicate) (result ListAllCompleteResult, err error)

ListAllCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (NatGatewaysClient) ListComplete

ListComplete retrieves all the results into a single object

func (NatGatewaysClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (NatGatewaysClient) UpdateTags

func (c NatGatewaysClient) UpdateTags(ctx context.Context, id NatGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error)

UpdateTags ...

type ProvisioningState

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

func (*ProvisioningState) UnmarshalJSON

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

type SubResource

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

type TagsObject

type TagsObject struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type UpdateTagsOperationResponse

type UpdateTagsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NatGateway
}

Jump to

Keyboard shortcuts

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