README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-09-01/localnetworkgateways
Documentation
The localnetworkgateways
SDK allows for interaction with the Azure Resource Manager Service 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/localnetworkgateways"
Client Initialization
client := localnetworkgateways.NewLocalNetworkGatewaysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: LocalNetworkGatewaysClient.CreateOrUpdate
ctx := context.TODO()
id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue")
payload := localnetworkgateways.LocalNetworkGateway{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: LocalNetworkGatewaysClient.Delete
ctx := context.TODO()
id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: LocalNetworkGatewaysClient.Get
ctx := context.TODO()
id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue")
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: LocalNetworkGatewaysClient.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: LocalNetworkGatewaysClient.UpdateTags
ctx := context.TODO()
id := localnetworkgateways.NewLocalNetworkGatewayID("12345678-1234-9876-4563-123456789012", "example-resource-group", "localNetworkGatewayValue")
payload := localnetworkgateways.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 ¶
- func PossibleValuesForProvisioningState() []string
- func ValidateLocalNetworkGatewayID(input interface{}, key string) (warnings []string, errors []error)
- type AddressSpace
- type BgpSettings
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type IPConfigurationBgpPeeringAddress
- type ListCompleteResult
- type ListOperationResponse
- type LocalNetworkGateway
- type LocalNetworkGatewayId
- type LocalNetworkGatewayOperationPredicate
- type LocalNetworkGatewayPropertiesFormat
- type LocalNetworkGatewaysClient
- func (c LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, id LocalNetworkGatewayId, input LocalNetworkGateway) (result CreateOrUpdateOperationResponse, err error)
- func (c LocalNetworkGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id LocalNetworkGatewayId, input LocalNetworkGateway) error
- func (c LocalNetworkGatewaysClient) Delete(ctx context.Context, id LocalNetworkGatewayId) (result DeleteOperationResponse, err error)
- func (c LocalNetworkGatewaysClient) DeleteThenPoll(ctx context.Context, id LocalNetworkGatewayId) error
- func (c LocalNetworkGatewaysClient) Get(ctx context.Context, id LocalNetworkGatewayId) (result GetOperationResponse, err error)
- func (c LocalNetworkGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error)
- func (c LocalNetworkGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error)
- func (c LocalNetworkGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListCompleteResult, err error)
- func (c LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, id LocalNetworkGatewayId, input TagsObject) (result UpdateTagsOperationResponse, err error)
- type ProvisioningState
- type TagsObject
- type UpdateTagsOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForProvisioningState ¶
func PossibleValuesForProvisioningState() []string
func ValidateLocalNetworkGatewayID ¶
func ValidateLocalNetworkGatewayID(input interface{}, key string) (warnings []string, errors []error)
ValidateLocalNetworkGatewayID checks that 'input' can be parsed as a Local Network Gateway ID
Types ¶
type AddressSpace ¶
type AddressSpace struct {
AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
}
type BgpSettings ¶
type BgpSettings struct { Asn *int64 `json:"asn,omitempty"` BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` BgpPeeringAddresses *[]IPConfigurationBgpPeeringAddress `json:"bgpPeeringAddresses,omitempty"` PeerWeight *int64 `json:"peerWeight,omitempty"` }
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *LocalNetworkGateway }
type IPConfigurationBgpPeeringAddress ¶
type IPConfigurationBgpPeeringAddress struct { CustomBgpIPAddresses *[]string `json:"customBgpIpAddresses,omitempty"` DefaultBgpIPAddresses *[]string `json:"defaultBgpIpAddresses,omitempty"` IPconfigurationId *string `json:"ipconfigurationId,omitempty"` TunnelIPAddresses *[]string `json:"tunnelIpAddresses,omitempty"` }
type ListCompleteResult ¶
type ListCompleteResult struct { LatestHttpResponse *http.Response Items []LocalNetworkGateway }
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]LocalNetworkGateway }
type LocalNetworkGateway ¶
type LocalNetworkGateway struct { Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` Location *string `json:"location,omitempty"` Name *string `json:"name,omitempty"` Properties LocalNetworkGatewayPropertiesFormat `json:"properties"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type LocalNetworkGatewayId ¶
type LocalNetworkGatewayId struct { SubscriptionId string ResourceGroupName string LocalNetworkGatewayName string }
LocalNetworkGatewayId is a struct representing the Resource ID for a Local Network Gateway
func NewLocalNetworkGatewayID ¶
func NewLocalNetworkGatewayID(subscriptionId string, resourceGroupName string, localNetworkGatewayName string) LocalNetworkGatewayId
NewLocalNetworkGatewayID returns a new LocalNetworkGatewayId struct
func ParseLocalNetworkGatewayID ¶
func ParseLocalNetworkGatewayID(input string) (*LocalNetworkGatewayId, error)
ParseLocalNetworkGatewayID parses 'input' into a LocalNetworkGatewayId
func ParseLocalNetworkGatewayIDInsensitively ¶
func ParseLocalNetworkGatewayIDInsensitively(input string) (*LocalNetworkGatewayId, error)
ParseLocalNetworkGatewayIDInsensitively parses 'input' case-insensitively into a LocalNetworkGatewayId note: this method should only be used for API response data and not user input
func (*LocalNetworkGatewayId) FromParseResult ¶
func (id *LocalNetworkGatewayId) FromParseResult(input resourceids.ParseResult) error
func (LocalNetworkGatewayId) ID ¶
func (id LocalNetworkGatewayId) ID() string
ID returns the formatted Local Network Gateway ID
func (LocalNetworkGatewayId) Segments ¶
func (id LocalNetworkGatewayId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Local Network Gateway ID
func (LocalNetworkGatewayId) String ¶
func (id LocalNetworkGatewayId) String() string
String returns a human-readable description of this Local Network Gateway ID
type LocalNetworkGatewayOperationPredicate ¶
type LocalNetworkGatewayOperationPredicate struct { Etag *string Id *string Location *string Name *string Type *string }
func (LocalNetworkGatewayOperationPredicate) Matches ¶
func (p LocalNetworkGatewayOperationPredicate) Matches(input LocalNetworkGateway) bool
type LocalNetworkGatewayPropertiesFormat ¶
type LocalNetworkGatewayPropertiesFormat struct { BgpSettings *BgpSettings `json:"bgpSettings,omitempty"` Fqdn *string `json:"fqdn,omitempty"` GatewayIPAddress *string `json:"gatewayIpAddress,omitempty"` LocalNetworkAddressSpace *AddressSpace `json:"localNetworkAddressSpace,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` ResourceGuid *string `json:"resourceGuid,omitempty"` }
type LocalNetworkGatewaysClient ¶
type LocalNetworkGatewaysClient struct {
Client *resourcemanager.Client
}
func NewLocalNetworkGatewaysClientWithBaseURI ¶
func NewLocalNetworkGatewaysClientWithBaseURI(sdkApi sdkEnv.Api) (*LocalNetworkGatewaysClient, error)
func (LocalNetworkGatewaysClient) CreateOrUpdate ¶
func (c LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, id LocalNetworkGatewayId, input LocalNetworkGateway) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (LocalNetworkGatewaysClient) CreateOrUpdateThenPoll ¶
func (c LocalNetworkGatewaysClient) CreateOrUpdateThenPoll(ctx context.Context, id LocalNetworkGatewayId, input LocalNetworkGateway) error
CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (LocalNetworkGatewaysClient) Delete ¶
func (c LocalNetworkGatewaysClient) Delete(ctx context.Context, id LocalNetworkGatewayId) (result DeleteOperationResponse, err error)
Delete ...
func (LocalNetworkGatewaysClient) DeleteThenPoll ¶
func (c LocalNetworkGatewaysClient) DeleteThenPoll(ctx context.Context, id LocalNetworkGatewayId) error
DeleteThenPoll performs Delete then polls until it's completed
func (LocalNetworkGatewaysClient) Get ¶
func (c LocalNetworkGatewaysClient) Get(ctx context.Context, id LocalNetworkGatewayId) (result GetOperationResponse, err error)
Get ...
func (LocalNetworkGatewaysClient) List ¶
func (c LocalNetworkGatewaysClient) List(ctx context.Context, id commonids.ResourceGroupId) (result ListOperationResponse, err error)
List ...
func (LocalNetworkGatewaysClient) ListComplete ¶
func (c LocalNetworkGatewaysClient) ListComplete(ctx context.Context, id commonids.ResourceGroupId) (ListCompleteResult, error)
ListComplete retrieves all the results into a single object
func (LocalNetworkGatewaysClient) ListCompleteMatchingPredicate ¶
func (c LocalNetworkGatewaysClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LocalNetworkGatewayOperationPredicate) (result ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (LocalNetworkGatewaysClient) UpdateTags ¶
func (c LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, id LocalNetworkGatewayId, 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 TagsObject ¶
type UpdateTagsOperationResponse ¶
type UpdateTagsOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *LocalNetworkGateway }
Source Files ¶
- client.go
- constants.go
- id_localnetworkgateway.go
- method_createorupdate.go
- method_delete.go
- method_get.go
- method_list.go
- method_updatetags.go
- model_addressspace.go
- model_bgpsettings.go
- model_ipconfigurationbgppeeringaddress.go
- model_localnetworkgateway.go
- model_localnetworkgatewaypropertiesformat.go
- model_tagsobject.go
- predicates.go
- version.go