armservicenetworking

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 14 Imported by: 1

README

Azure Servicenetworking Module for Go

PkgGoDev

The armservicenetworking module provides operations for working with Azure Servicenetworking.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Servicenetworking module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Servicenetworking. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Servicenetworking module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armservicenetworking.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armservicenetworking.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewAssociationsInterfaceClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Servicenetworking label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type Association

type Association struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The resource-specific properties for this resource.
	Properties *AssociationProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Association Subresource of Traffic Controller

func (Association) MarshalJSON

func (a Association) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Association.

func (*Association) UnmarshalJSON

func (a *Association) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Association.

type AssociationListResult

type AssociationListResult struct {
	// REQUIRED; The Association items on this page
	Value []*Association

	// The link to the next page of items
	NextLink *string
}

AssociationListResult - The response of a Association list operation.

func (AssociationListResult) MarshalJSON

func (a AssociationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssociationListResult.

func (*AssociationListResult) UnmarshalJSON

func (a *AssociationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssociationListResult.

type AssociationProperties

type AssociationProperties struct {
	// REQUIRED; Association Type
	AssociationType *AssociationType

	// Association Subnet
	Subnet *AssociationSubnet

	// READ-ONLY; Provisioning State of Traffic Controller Association Resource
	ProvisioningState *ProvisioningState
}

AssociationProperties - Association Properties.

func (AssociationProperties) MarshalJSON

func (a AssociationProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssociationProperties.

func (*AssociationProperties) UnmarshalJSON

func (a *AssociationProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssociationProperties.

type AssociationSubnet

type AssociationSubnet struct {
	// REQUIRED; Association ID.
	ID *string
}

AssociationSubnet - Association Subnet.

func (AssociationSubnet) MarshalJSON

func (a AssociationSubnet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssociationSubnet.

func (*AssociationSubnet) UnmarshalJSON

func (a *AssociationSubnet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssociationSubnet.

type AssociationSubnetUpdate added in v0.3.0

type AssociationSubnetUpdate struct {
	// Association ID.
	ID *string
}

AssociationSubnetUpdate - Association Subnet.

func (AssociationSubnetUpdate) MarshalJSON added in v0.3.0

func (a AssociationSubnetUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssociationSubnetUpdate.

func (*AssociationSubnetUpdate) UnmarshalJSON added in v0.3.0

func (a *AssociationSubnetUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssociationSubnetUpdate.

type AssociationType added in v0.3.0

type AssociationType string
const (
	AssociationTypeSubnets AssociationType = "subnets"
)

func PossibleAssociationTypeValues added in v0.3.0

func PossibleAssociationTypeValues() []AssociationType

PossibleAssociationTypeValues returns the possible values for the AssociationType const type.

type AssociationUpdate

type AssociationUpdate struct {
	// The updatable properties of the Association.
	Properties *AssociationUpdateProperties

	// Resource tags.
	Tags map[string]*string
}

AssociationUpdate - The type used for update operations of the Association.

func (AssociationUpdate) MarshalJSON

func (a AssociationUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssociationUpdate.

func (*AssociationUpdate) UnmarshalJSON

func (a *AssociationUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssociationUpdate.

type AssociationUpdateProperties

type AssociationUpdateProperties struct {
	// Association Type
	AssociationType *AssociationType

	// Association Subnet
	Subnet *AssociationSubnetUpdate
}

AssociationUpdateProperties - The updatable properties of the Association.

func (AssociationUpdateProperties) MarshalJSON

func (a AssociationUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AssociationUpdateProperties.

func (*AssociationUpdateProperties) UnmarshalJSON

func (a *AssociationUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AssociationUpdateProperties.

type AssociationsInterfaceClient

type AssociationsInterfaceClient struct {
	// contains filtered or unexported fields
}

AssociationsInterfaceClient contains the methods for the AssociationsInterface group. Don't use this type directly, use NewAssociationsInterfaceClient() instead.

func NewAssociationsInterfaceClient

func NewAssociationsInterfaceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AssociationsInterfaceClient, error)

NewAssociationsInterfaceClient creates a new instance of AssociationsInterfaceClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*AssociationsInterfaceClient) BeginCreateOrUpdate

func (client *AssociationsInterfaceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, trafficControllerName string, associationName string, resource Association, options *AssociationsInterfaceClientBeginCreateOrUpdateOptions) (*runtime.Poller[AssociationsInterfaceClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a Association If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • associationName - Name of Association
  • resource - Resource create parameters.
  • options - AssociationsInterfaceClientBeginCreateOrUpdateOptions contains the optional parameters for the AssociationsInterfaceClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/AssociationPut.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAssociationsInterfaceClient().BeginCreateOrUpdate(ctx, "rg1", "tc1", "as1", armservicenetworking.Association{
		Location: to.Ptr("NorthCentralUS"),
		Properties: &armservicenetworking.AssociationProperties{
			AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets),
			Subnet: &armservicenetworking.AssociationSubnet{
				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Association = armservicenetworking.Association{
	// 	Name: to.Ptr("associatedvnet-1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/associations"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Properties: &armservicenetworking.AssociationProperties{
	// 		AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets),
	// 		ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
	// 		Subnet: &armservicenetworking.AssociationSubnet{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"),
	// 		},
	// 	},
	// }
}
Output:

func (*AssociationsInterfaceClient) BeginDelete

func (client *AssociationsInterfaceClient) BeginDelete(ctx context.Context, resourceGroupName string, trafficControllerName string, associationName string, options *AssociationsInterfaceClientBeginDeleteOptions) (*runtime.Poller[AssociationsInterfaceClientDeleteResponse], error)

BeginDelete - Delete a Association If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • associationName - Name of Association
  • options - AssociationsInterfaceClientBeginDeleteOptions contains the optional parameters for the AssociationsInterfaceClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/AssociationDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewAssociationsInterfaceClient().BeginDelete(ctx, "rg1", "tc1", "as1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*AssociationsInterfaceClient) Get

func (client *AssociationsInterfaceClient) Get(ctx context.Context, resourceGroupName string, trafficControllerName string, associationName string, options *AssociationsInterfaceClientGetOptions) (AssociationsInterfaceClientGetResponse, error)

Get - Get a Association If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • associationName - Name of Association
  • options - AssociationsInterfaceClientGetOptions contains the optional parameters for the AssociationsInterfaceClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/AssociationGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssociationsInterfaceClient().Get(ctx, "rg1", "tc1", "as1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Association = armservicenetworking.Association{
	// 	Name: to.Ptr("as1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/associations"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Properties: &armservicenetworking.AssociationProperties{
	// 		AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets),
	// 		ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
	// 		Subnet: &armservicenetworking.AssociationSubnet{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"),
	// 		},
	// 	},
	// }
}
Output:

func (*AssociationsInterfaceClient) NewListByTrafficControllerPager

NewListByTrafficControllerPager - List Association resources by TrafficController

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • options - AssociationsInterfaceClientListByTrafficControllerOptions contains the optional parameters for the AssociationsInterfaceClient.NewListByTrafficControllerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/AssociationsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAssociationsInterfaceClient().NewListByTrafficControllerPager("rg1", "tc1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AssociationListResult = armservicenetworking.AssociationListResult{
		// 	Value: []*armservicenetworking.Association{
		// 		{
		// 			Name: to.Ptr("as1"),
		// 			Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/associations"),
		// 			ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1"),
		// 			Location: to.Ptr("NorthCentralUS"),
		// 			Properties: &armservicenetworking.AssociationProperties{
		// 				AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets),
		// 				ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
		// 				Subnet: &armservicenetworking.AssociationSubnet{
		// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*AssociationsInterfaceClient) Update

func (client *AssociationsInterfaceClient) Update(ctx context.Context, resourceGroupName string, trafficControllerName string, associationName string, properties AssociationUpdate, options *AssociationsInterfaceClientUpdateOptions) (AssociationsInterfaceClientUpdateResponse, error)

Update - Update a Association If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • associationName - Name of Association
  • properties - The resource properties to be updated.
  • options - AssociationsInterfaceClientUpdateOptions contains the optional parameters for the AssociationsInterfaceClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/AssociationPatch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAssociationsInterfaceClient().Update(ctx, "rg1", "tc1", "as1", armservicenetworking.AssociationUpdate{
		Properties: &armservicenetworking.AssociationUpdateProperties{
			AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets),
			Subnet: &armservicenetworking.AssociationSubnetUpdate{
				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Association = armservicenetworking.Association{
	// 	Name: to.Ptr("as1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/associations"),
	// 	ID: to.Ptr("/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Properties: &armservicenetworking.AssociationProperties{
	// 		AssociationType: to.Ptr(armservicenetworking.AssociationTypeSubnets),
	// 		Subnet: &armservicenetworking.AssociationSubnet{
	// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet"),
	// 		},
	// 	},
	// }
}
Output:

type AssociationsInterfaceClientBeginCreateOrUpdateOptions

type AssociationsInterfaceClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AssociationsInterfaceClientBeginCreateOrUpdateOptions contains the optional parameters for the AssociationsInterfaceClient.BeginCreateOrUpdate method.

type AssociationsInterfaceClientBeginDeleteOptions

type AssociationsInterfaceClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

AssociationsInterfaceClientBeginDeleteOptions contains the optional parameters for the AssociationsInterfaceClient.BeginDelete method.

type AssociationsInterfaceClientCreateOrUpdateResponse

type AssociationsInterfaceClientCreateOrUpdateResponse struct {
	// Association Subresource of Traffic Controller
	Association
}

AssociationsInterfaceClientCreateOrUpdateResponse contains the response from method AssociationsInterfaceClient.BeginCreateOrUpdate.

type AssociationsInterfaceClientDeleteResponse

type AssociationsInterfaceClientDeleteResponse struct {
}

AssociationsInterfaceClientDeleteResponse contains the response from method AssociationsInterfaceClient.BeginDelete.

type AssociationsInterfaceClientGetOptions

type AssociationsInterfaceClientGetOptions struct {
}

AssociationsInterfaceClientGetOptions contains the optional parameters for the AssociationsInterfaceClient.Get method.

type AssociationsInterfaceClientGetResponse

type AssociationsInterfaceClientGetResponse struct {
	// Association Subresource of Traffic Controller
	Association
}

AssociationsInterfaceClientGetResponse contains the response from method AssociationsInterfaceClient.Get.

type AssociationsInterfaceClientListByTrafficControllerOptions

type AssociationsInterfaceClientListByTrafficControllerOptions struct {
}

AssociationsInterfaceClientListByTrafficControllerOptions contains the optional parameters for the AssociationsInterfaceClient.NewListByTrafficControllerPager method.

type AssociationsInterfaceClientListByTrafficControllerResponse

type AssociationsInterfaceClientListByTrafficControllerResponse struct {
	// The response of a Association list operation.
	AssociationListResult
}

AssociationsInterfaceClientListByTrafficControllerResponse contains the response from method AssociationsInterfaceClient.NewListByTrafficControllerPager.

type AssociationsInterfaceClientUpdateOptions

type AssociationsInterfaceClientUpdateOptions struct {
}

AssociationsInterfaceClientUpdateOptions contains the optional parameters for the AssociationsInterfaceClient.Update method.

type AssociationsInterfaceClientUpdateResponse

type AssociationsInterfaceClientUpdateResponse struct {
	// Association Subresource of Traffic Controller
	Association
}

AssociationsInterfaceClientUpdateResponse contains the response from method AssociationsInterfaceClient.Update.

type ClientFactory added in v0.2.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v0.2.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewAssociationsInterfaceClient added in v0.2.0

func (c *ClientFactory) NewAssociationsInterfaceClient() *AssociationsInterfaceClient

NewAssociationsInterfaceClient creates a new instance of AssociationsInterfaceClient.

func (*ClientFactory) NewFrontendsInterfaceClient added in v0.2.0

func (c *ClientFactory) NewFrontendsInterfaceClient() *FrontendsInterfaceClient

NewFrontendsInterfaceClient creates a new instance of FrontendsInterfaceClient.

func (*ClientFactory) NewOperationsClient added in v0.2.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewTrafficControllerInterfaceClient added in v0.2.0

func (c *ClientFactory) NewTrafficControllerInterfaceClient() *TrafficControllerInterfaceClient

NewTrafficControllerInterfaceClient creates a new instance of TrafficControllerInterfaceClient.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Frontend

type Frontend struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The resource-specific properties for this resource.
	Properties *FrontendProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Frontend Subresource of Traffic Controller.

func (Frontend) MarshalJSON

func (f Frontend) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Frontend.

func (*Frontend) UnmarshalJSON

func (f *Frontend) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Frontend.

type FrontendListResult

type FrontendListResult struct {
	// REQUIRED; The Frontend items on this page
	Value []*Frontend

	// The link to the next page of items
	NextLink *string
}

FrontendListResult - The response of a Frontend list operation.

func (FrontendListResult) MarshalJSON

func (f FrontendListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontendListResult.

func (*FrontendListResult) UnmarshalJSON

func (f *FrontendListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendListResult.

type FrontendProperties

type FrontendProperties struct {
	// READ-ONLY; The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend.
	Fqdn *string

	// READ-ONLY; Provisioning State of Traffic Controller Frontend Resource
	ProvisioningState *ProvisioningState
}

FrontendProperties - Frontend Properties.

func (FrontendProperties) MarshalJSON

func (f FrontendProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontendProperties.

func (*FrontendProperties) UnmarshalJSON

func (f *FrontendProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendProperties.

type FrontendUpdate

type FrontendUpdate struct {
	// Resource tags.
	Tags map[string]*string
}

FrontendUpdate - The type used for update operations of the Frontend.

func (FrontendUpdate) MarshalJSON

func (f FrontendUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type FrontendUpdate.

func (*FrontendUpdate) UnmarshalJSON

func (f *FrontendUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type FrontendUpdate.

type FrontendsInterfaceClient

type FrontendsInterfaceClient struct {
	// contains filtered or unexported fields
}

FrontendsInterfaceClient contains the methods for the FrontendsInterface group. Don't use this type directly, use NewFrontendsInterfaceClient() instead.

func NewFrontendsInterfaceClient

func NewFrontendsInterfaceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FrontendsInterfaceClient, error)

NewFrontendsInterfaceClient creates a new instance of FrontendsInterfaceClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*FrontendsInterfaceClient) BeginCreateOrUpdate

func (client *FrontendsInterfaceClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, trafficControllerName string, frontendName string, resource Frontend, options *FrontendsInterfaceClientBeginCreateOrUpdateOptions) (*runtime.Poller[FrontendsInterfaceClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a Frontend If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • frontendName - Frontends
  • resource - Resource create parameters.
  • options - FrontendsInterfaceClientBeginCreateOrUpdateOptions contains the optional parameters for the FrontendsInterfaceClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/FrontendPut.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewFrontendsInterfaceClient().BeginCreateOrUpdate(ctx, "rg1", "tc1", "fe1", armservicenetworking.Frontend{
		Location:   to.Ptr("NorthCentralUS"),
		Properties: &armservicenetworking.FrontendProperties{},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Frontend = armservicenetworking.Frontend{
	// 	Name: to.Ptr("fe1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/frontends"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Properties: &armservicenetworking.FrontendProperties{
	// 		Fqdn: to.Ptr("test.net"),
	// 		ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*FrontendsInterfaceClient) BeginDelete

func (client *FrontendsInterfaceClient) BeginDelete(ctx context.Context, resourceGroupName string, trafficControllerName string, frontendName string, options *FrontendsInterfaceClientBeginDeleteOptions) (*runtime.Poller[FrontendsInterfaceClientDeleteResponse], error)

BeginDelete - Delete a Frontend If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • frontendName - Frontends
  • options - FrontendsInterfaceClientBeginDeleteOptions contains the optional parameters for the FrontendsInterfaceClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/FrontendDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewFrontendsInterfaceClient().BeginDelete(ctx, "rg1", "tc1", "fe1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*FrontendsInterfaceClient) Get

func (client *FrontendsInterfaceClient) Get(ctx context.Context, resourceGroupName string, trafficControllerName string, frontendName string, options *FrontendsInterfaceClientGetOptions) (FrontendsInterfaceClientGetResponse, error)

Get - Get a Frontend If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • frontendName - Frontends
  • options - FrontendsInterfaceClientGetOptions contains the optional parameters for the FrontendsInterfaceClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/FrontendGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFrontendsInterfaceClient().Get(ctx, "rg1", "tc1", "fe1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Frontend = armservicenetworking.Frontend{
	// 	Name: to.Ptr("fe1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/frontends"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Properties: &armservicenetworking.FrontendProperties{
	// 		Fqdn: to.Ptr("test.net"),
	// 		ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

func (*FrontendsInterfaceClient) NewListByTrafficControllerPager

func (client *FrontendsInterfaceClient) NewListByTrafficControllerPager(resourceGroupName string, trafficControllerName string, options *FrontendsInterfaceClientListByTrafficControllerOptions) *runtime.Pager[FrontendsInterfaceClientListByTrafficControllerResponse]

NewListByTrafficControllerPager - List Frontend resources by TrafficController

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • options - FrontendsInterfaceClientListByTrafficControllerOptions contains the optional parameters for the FrontendsInterfaceClient.NewListByTrafficControllerPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/FrontendsGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewFrontendsInterfaceClient().NewListByTrafficControllerPager("rg1", "tc1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.FrontendListResult = armservicenetworking.FrontendListResult{
		// 	Value: []*armservicenetworking.Frontend{
		// 		{
		// 			Name: to.Ptr("fe1"),
		// 			Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/frontends"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
		// 			Location: to.Ptr("NorthCentralUS"),
		// 			Properties: &armservicenetworking.FrontendProperties{
		// 				Fqdn: to.Ptr("test.net"),
		// 				ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*FrontendsInterfaceClient) Update

func (client *FrontendsInterfaceClient) Update(ctx context.Context, resourceGroupName string, trafficControllerName string, frontendName string, properties FrontendUpdate, options *FrontendsInterfaceClientUpdateOptions) (FrontendsInterfaceClientUpdateResponse, error)

Update - Update a Frontend If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • frontendName - Frontends
  • properties - The resource properties to be updated.
  • options - FrontendsInterfaceClientUpdateOptions contains the optional parameters for the FrontendsInterfaceClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/FrontendPatch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewFrontendsInterfaceClient().Update(ctx, "rg1", "tc1", "fe1", armservicenetworking.FrontendUpdate{}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Frontend = armservicenetworking.Frontend{
	// 	Name: to.Ptr("fe1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/frontends"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Properties: &armservicenetworking.FrontendProperties{
	// 		Fqdn: to.Ptr("test.net"),
	// 		ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
	// 	},
	// }
}
Output:

type FrontendsInterfaceClientBeginCreateOrUpdateOptions

type FrontendsInterfaceClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

FrontendsInterfaceClientBeginCreateOrUpdateOptions contains the optional parameters for the FrontendsInterfaceClient.BeginCreateOrUpdate method.

type FrontendsInterfaceClientBeginDeleteOptions

type FrontendsInterfaceClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

FrontendsInterfaceClientBeginDeleteOptions contains the optional parameters for the FrontendsInterfaceClient.BeginDelete method.

type FrontendsInterfaceClientCreateOrUpdateResponse

type FrontendsInterfaceClientCreateOrUpdateResponse struct {
	// Frontend Subresource of Traffic Controller.
	Frontend
}

FrontendsInterfaceClientCreateOrUpdateResponse contains the response from method FrontendsInterfaceClient.BeginCreateOrUpdate.

type FrontendsInterfaceClientDeleteResponse

type FrontendsInterfaceClientDeleteResponse struct {
}

FrontendsInterfaceClientDeleteResponse contains the response from method FrontendsInterfaceClient.BeginDelete.

type FrontendsInterfaceClientGetOptions

type FrontendsInterfaceClientGetOptions struct {
}

FrontendsInterfaceClientGetOptions contains the optional parameters for the FrontendsInterfaceClient.Get method.

type FrontendsInterfaceClientGetResponse

type FrontendsInterfaceClientGetResponse struct {
	// Frontend Subresource of Traffic Controller.
	Frontend
}

FrontendsInterfaceClientGetResponse contains the response from method FrontendsInterfaceClient.Get.

type FrontendsInterfaceClientListByTrafficControllerOptions

type FrontendsInterfaceClientListByTrafficControllerOptions struct {
}

FrontendsInterfaceClientListByTrafficControllerOptions contains the optional parameters for the FrontendsInterfaceClient.NewListByTrafficControllerPager method.

type FrontendsInterfaceClientListByTrafficControllerResponse

type FrontendsInterfaceClientListByTrafficControllerResponse struct {
	// The response of a Frontend list operation.
	FrontendListResult
}

FrontendsInterfaceClientListByTrafficControllerResponse contains the response from method FrontendsInterfaceClient.NewListByTrafficControllerPager.

type FrontendsInterfaceClientUpdateOptions

type FrontendsInterfaceClientUpdateOptions struct {
}

FrontendsInterfaceClientUpdateOptions contains the optional parameters for the FrontendsInterfaceClient.Update method.

type FrontendsInterfaceClientUpdateResponse

type FrontendsInterfaceClientUpdateResponse struct {
	// Frontend Subresource of Traffic Controller.
	Frontend
}

FrontendsInterfaceClientUpdateResponse contains the response from method FrontendsInterfaceClient.Update.

type Operation

type Operation struct {
	// Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane
	// operations.
	IsDataAction *bool

	// READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write",
	// "Microsoft.Compute/virtualMachines/capture/action"
	Name *string

	// READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
	// value is "user,system"
	Origin *Origin
}

Operation - Details of a REST API operation, returned from the Resource Provider Operations API

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

type OperationDisplay struct {
	// READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views.
	Description *string

	// READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual
	// Machine", "Restart Virtual Machine".
	Operation *string

	// READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft
	// Compute".
	Provider *string

	// READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job
	// Schedule Collections".
	Resource *string
}

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; URL to get the next set of operation list results (if there are any).
	NextLink *string

	// READ-ONLY; List of operations supported by the resource provider
	Value []*Operation
}

OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - List the operations for the provider

Generated from API version 2023-11-01

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/OperationsList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationListResult = armservicenetworking.OperationListResult{
		// 	Value: []*armservicenetworking.Operation{
		// 		{
		// 			Name: to.Ptr("Microsoft.ServiceNetworking/trafficControllers/read"),
		// 			Display: &armservicenetworking.OperationDisplay{
		// 				Description: to.Ptr("Traffic Controller is a L7 Load Balancing solution for a Multi Cluster setup"),
		// 				Operation: to.Ptr("Get Traffic Controller configuration"),
		// 				Provider: to.Ptr("Microsoft Service Networking"),
		// 				Resource: to.Ptr("Traffic Controller"),
		// 			},
		// 			IsDataAction: to.Ptr(false),
		// 			Origin: to.Ptr(armservicenetworking.OriginUserSystem),
		// 	}},
		// }
	}
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"

const (
	OriginSystem     Origin = "system"
	OriginUser       Origin = "user"
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ResourceID

type ResourceID struct {
	// REQUIRED; Resource ID of child resource.
	ID *string
}

ResourceID - Resource ID definition used by parent to reference child resources.

func (ResourceID) MarshalJSON

func (r ResourceID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceID.

func (*ResourceID) UnmarshalJSON

func (r *ResourceID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceID.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TrafficController

type TrafficController struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// The resource-specific properties for this resource.
	Properties *TrafficControllerProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

TrafficController - Concrete tracked resource types can be created by aliasing this type using a specific property type.

func (TrafficController) MarshalJSON

func (t TrafficController) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrafficController.

func (*TrafficController) UnmarshalJSON

func (t *TrafficController) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrafficController.

type TrafficControllerInterfaceClient

type TrafficControllerInterfaceClient struct {
	// contains filtered or unexported fields
}

TrafficControllerInterfaceClient contains the methods for the TrafficControllerInterface group. Don't use this type directly, use NewTrafficControllerInterfaceClient() instead.

func NewTrafficControllerInterfaceClient

func NewTrafficControllerInterfaceClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TrafficControllerInterfaceClient, error)

NewTrafficControllerInterfaceClient creates a new instance of TrafficControllerInterfaceClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*TrafficControllerInterfaceClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Create a TrafficController If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • resource - Resource create parameters.
  • options - TrafficControllerInterfaceClientBeginCreateOrUpdateOptions contains the optional parameters for the TrafficControllerInterfaceClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/TrafficControllerPut.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTrafficControllerInterfaceClient().BeginCreateOrUpdate(ctx, "rg1", "tc1", armservicenetworking.TrafficController{
		Location: to.Ptr("NorthCentralUS"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TrafficController = armservicenetworking.TrafficController{
	// 	Name: to.Ptr("tc1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armservicenetworking.TrafficControllerProperties{
	// 		Associations: []*armservicenetworking.ResourceID{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"),
	// 		}},
	// 		ConfigurationEndpoints: []*string{
	// 			to.Ptr("abc.trafficcontroller.azure.net")},
	// 			Frontends: []*armservicenetworking.ResourceID{
	// 				{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
	// 			}},
	// 			ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*TrafficControllerInterfaceClient) BeginDelete

BeginDelete - Delete a TrafficController If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • options - TrafficControllerInterfaceClientBeginDeleteOptions contains the optional parameters for the TrafficControllerInterfaceClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/TrafficControllerDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewTrafficControllerInterfaceClient().BeginDelete(ctx, "rg1", "tc1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*TrafficControllerInterfaceClient) Get

Get - Get a TrafficController If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • options - TrafficControllerInterfaceClientGetOptions contains the optional parameters for the TrafficControllerInterfaceClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/TrafficControllerGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTrafficControllerInterfaceClient().Get(ctx, "rg1", "tc1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TrafficController = armservicenetworking.TrafficController{
	// 	Name: to.Ptr("tc1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armservicenetworking.TrafficControllerProperties{
	// 		Associations: []*armservicenetworking.ResourceID{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"),
	// 		}},
	// 		ConfigurationEndpoints: []*string{
	// 			to.Ptr("abc.trafficcontroller.azure.net")},
	// 			Frontends: []*armservicenetworking.ResourceID{
	// 				{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
	// 			}},
	// 			ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
	// 		},
	// 	}
}
Output:

func (*TrafficControllerInterfaceClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List TrafficController resources by resource group

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - TrafficControllerInterfaceClientListByResourceGroupOptions contains the optional parameters for the TrafficControllerInterfaceClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/TrafficControllersGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTrafficControllerInterfaceClient().NewListByResourceGroupPager("rg1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TrafficControllerListResult = armservicenetworking.TrafficControllerListResult{
		// 	Value: []*armservicenetworking.TrafficController{
		// 		{
		// 			Name: to.Ptr("tc1"),
		// 			Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"),
		// 			Location: to.Ptr("NorthCentralUS"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Properties: &armservicenetworking.TrafficControllerProperties{
		// 				Associations: []*armservicenetworking.ResourceID{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"),
		// 				}},
		// 				ConfigurationEndpoints: []*string{
		// 					to.Ptr("abc.trafficcontroller.azure.net")},
		// 					Frontends: []*armservicenetworking.ResourceID{
		// 						{
		// 							ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
		// 					}},
		// 					ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*TrafficControllerInterfaceClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List TrafficController resources by subscription ID

Generated from API version 2023-11-01

  • options - TrafficControllerInterfaceClientListBySubscriptionOptions contains the optional parameters for the TrafficControllerInterfaceClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/TrafficControllersGetList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewTrafficControllerInterfaceClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.TrafficControllerListResult = armservicenetworking.TrafficControllerListResult{
		// 	Value: []*armservicenetworking.TrafficController{
		// 		{
		// 			Name: to.Ptr("tc1"),
		// 			Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"),
		// 			ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"),
		// 			Location: to.Ptr("NorthCentralUS"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Properties: &armservicenetworking.TrafficControllerProperties{
		// 				Associations: []*armservicenetworking.ResourceID{
		// 					{
		// 						ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"),
		// 				}},
		// 				ConfigurationEndpoints: []*string{
		// 					to.Ptr("abc.trafficcontroller.azure.net")},
		// 					Frontends: []*armservicenetworking.ResourceID{
		// 						{
		// 							ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
		// 					}},
		// 					ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
		// 				},
		// 		}},
		// 	}
	}
}
Output:

func (*TrafficControllerInterfaceClient) Update

Update - Update a TrafficController If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-11-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • trafficControllerName - traffic controller name for path
  • properties - The resource properties to be updated.
  • options - TrafficControllerInterfaceClientUpdateOptions contains the optional parameters for the TrafficControllerInterfaceClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/stable/2023-11-01/examples/TrafficControllerPatch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/servicenetworking/armservicenetworking"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armservicenetworking.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewTrafficControllerInterfaceClient().Update(ctx, "rg1", "tc1", armservicenetworking.TrafficControllerUpdate{
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.TrafficController = armservicenetworking.TrafficController{
	// 	Name: to.Ptr("tc1"),
	// 	Type: to.Ptr("Microsoft.ServiceNetworking/trafficControllers"),
	// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1"),
	// 	Location: to.Ptr("NorthCentralUS"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Properties: &armservicenetworking.TrafficControllerProperties{
	// 		Associations: []*armservicenetworking.ResourceID{
	// 			{
	// 				ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1"),
	// 		}},
	// 		ConfigurationEndpoints: []*string{
	// 			to.Ptr("abc.trafficcontroller.azure.net")},
	// 			Frontends: []*armservicenetworking.ResourceID{
	// 				{
	// 					ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1"),
	// 			}},
	// 			ProvisioningState: to.Ptr(armservicenetworking.ProvisioningStateSucceeded),
	// 		},
	// 	}
}
Output:

type TrafficControllerInterfaceClientBeginCreateOrUpdateOptions

type TrafficControllerInterfaceClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TrafficControllerInterfaceClientBeginCreateOrUpdateOptions contains the optional parameters for the TrafficControllerInterfaceClient.BeginCreateOrUpdate method.

type TrafficControllerInterfaceClientBeginDeleteOptions

type TrafficControllerInterfaceClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

TrafficControllerInterfaceClientBeginDeleteOptions contains the optional parameters for the TrafficControllerInterfaceClient.BeginDelete method.

type TrafficControllerInterfaceClientCreateOrUpdateResponse

type TrafficControllerInterfaceClientCreateOrUpdateResponse struct {
	// Concrete tracked resource types can be created by aliasing this type using a specific property type.
	TrafficController
}

TrafficControllerInterfaceClientCreateOrUpdateResponse contains the response from method TrafficControllerInterfaceClient.BeginCreateOrUpdate.

type TrafficControllerInterfaceClientDeleteResponse

type TrafficControllerInterfaceClientDeleteResponse struct {
}

TrafficControllerInterfaceClientDeleteResponse contains the response from method TrafficControllerInterfaceClient.BeginDelete.

type TrafficControllerInterfaceClientGetOptions

type TrafficControllerInterfaceClientGetOptions struct {
}

TrafficControllerInterfaceClientGetOptions contains the optional parameters for the TrafficControllerInterfaceClient.Get method.

type TrafficControllerInterfaceClientGetResponse

type TrafficControllerInterfaceClientGetResponse struct {
	// Concrete tracked resource types can be created by aliasing this type using a specific property type.
	TrafficController
}

TrafficControllerInterfaceClientGetResponse contains the response from method TrafficControllerInterfaceClient.Get.

type TrafficControllerInterfaceClientListByResourceGroupOptions

type TrafficControllerInterfaceClientListByResourceGroupOptions struct {
}

TrafficControllerInterfaceClientListByResourceGroupOptions contains the optional parameters for the TrafficControllerInterfaceClient.NewListByResourceGroupPager method.

type TrafficControllerInterfaceClientListByResourceGroupResponse

type TrafficControllerInterfaceClientListByResourceGroupResponse struct {
	// The response of a TrafficController list operation.
	TrafficControllerListResult
}

TrafficControllerInterfaceClientListByResourceGroupResponse contains the response from method TrafficControllerInterfaceClient.NewListByResourceGroupPager.

type TrafficControllerInterfaceClientListBySubscriptionOptions

type TrafficControllerInterfaceClientListBySubscriptionOptions struct {
}

TrafficControllerInterfaceClientListBySubscriptionOptions contains the optional parameters for the TrafficControllerInterfaceClient.NewListBySubscriptionPager method.

type TrafficControllerInterfaceClientListBySubscriptionResponse

type TrafficControllerInterfaceClientListBySubscriptionResponse struct {
	// The response of a TrafficController list operation.
	TrafficControllerListResult
}

TrafficControllerInterfaceClientListBySubscriptionResponse contains the response from method TrafficControllerInterfaceClient.NewListBySubscriptionPager.

type TrafficControllerInterfaceClientUpdateOptions

type TrafficControllerInterfaceClientUpdateOptions struct {
}

TrafficControllerInterfaceClientUpdateOptions contains the optional parameters for the TrafficControllerInterfaceClient.Update method.

type TrafficControllerInterfaceClientUpdateResponse

type TrafficControllerInterfaceClientUpdateResponse struct {
	// Concrete tracked resource types can be created by aliasing this type using a specific property type.
	TrafficController
}

TrafficControllerInterfaceClientUpdateResponse contains the response from method TrafficControllerInterfaceClient.Update.

type TrafficControllerListResult

type TrafficControllerListResult struct {
	// REQUIRED; The TrafficController items on this page
	Value []*TrafficController

	// The link to the next page of items
	NextLink *string
}

TrafficControllerListResult - The response of a TrafficController list operation.

func (TrafficControllerListResult) MarshalJSON

func (t TrafficControllerListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrafficControllerListResult.

func (*TrafficControllerListResult) UnmarshalJSON

func (t *TrafficControllerListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrafficControllerListResult.

type TrafficControllerProperties

type TrafficControllerProperties struct {
	// READ-ONLY; Associations References List
	Associations []*ResourceID

	// READ-ONLY; Configuration Endpoints.
	ConfigurationEndpoints []*string

	// READ-ONLY; Frontends References List
	Frontends []*ResourceID

	// READ-ONLY; The status of the last operation.
	ProvisioningState *ProvisioningState
}

TrafficControllerProperties - Traffic Controller Properties.

func (TrafficControllerProperties) MarshalJSON

func (t TrafficControllerProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrafficControllerProperties.

func (*TrafficControllerProperties) UnmarshalJSON

func (t *TrafficControllerProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrafficControllerProperties.

type TrafficControllerUpdate

type TrafficControllerUpdate struct {
	// Resource tags.
	Tags map[string]*string
}

TrafficControllerUpdate - The type used for update operations of the TrafficController.

func (TrafficControllerUpdate) MarshalJSON

func (t TrafficControllerUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrafficControllerUpdate.

func (*TrafficControllerUpdate) UnmarshalJSON

func (t *TrafficControllerUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrafficControllerUpdate.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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