armstandbypool

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 14 Imported by: 1

README

Azure Standbypool Module for Go

PkgGoDev

The armstandbypool module provides operations for working with Azure Standbypool.

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 Standbypool module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Standbypool. 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 Standbypool 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 := armstandbypool.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 := armstandbypool.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.NewStandbyContainerGroupPoolRuntimeViewsClient()

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 Standbypool 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 - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.

const (
	// ActionTypeInternal - Actions are for internal-only APIs.
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type ClientFactory

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

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. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewStandbyContainerGroupPoolRuntimeViewsClient added in v1.0.0

func (c *ClientFactory) NewStandbyContainerGroupPoolRuntimeViewsClient() *StandbyContainerGroupPoolRuntimeViewsClient

NewStandbyContainerGroupPoolRuntimeViewsClient creates a new instance of StandbyContainerGroupPoolRuntimeViewsClient.

func (*ClientFactory) NewStandbyContainerGroupPoolsClient

func (c *ClientFactory) NewStandbyContainerGroupPoolsClient() *StandbyContainerGroupPoolsClient

NewStandbyContainerGroupPoolsClient creates a new instance of StandbyContainerGroupPoolsClient.

func (*ClientFactory) NewStandbyVirtualMachinePoolRuntimeViewsClient added in v1.0.0

func (c *ClientFactory) NewStandbyVirtualMachinePoolRuntimeViewsClient() *StandbyVirtualMachinePoolRuntimeViewsClient

NewStandbyVirtualMachinePoolRuntimeViewsClient creates a new instance of StandbyVirtualMachinePoolRuntimeViewsClient.

func (*ClientFactory) NewStandbyVirtualMachinePoolsClient

func (c *ClientFactory) NewStandbyVirtualMachinePoolsClient() *StandbyVirtualMachinePoolsClient

NewStandbyVirtualMachinePoolsClient creates a new instance of StandbyVirtualMachinePoolsClient.

func (*ClientFactory) NewStandbyVirtualMachinesClient

func (c *ClientFactory) NewStandbyVirtualMachinesClient() *StandbyVirtualMachinesClient

NewStandbyVirtualMachinesClient creates a new instance of StandbyVirtualMachinesClient.

type ContainerGroupInstanceCountSummary added in v1.0.0

type ContainerGroupInstanceCountSummary struct {
	// REQUIRED; The count of pooled resources in each state.
	InstanceCountsByState []*PoolResourceStateCount
}

ContainerGroupInstanceCountSummary - Displays the counts of container groups in each state, as known by the StandbyPool resource provider.

func (ContainerGroupInstanceCountSummary) MarshalJSON added in v1.0.0

func (c ContainerGroupInstanceCountSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerGroupInstanceCountSummary.

func (*ContainerGroupInstanceCountSummary) UnmarshalJSON added in v1.0.0

func (c *ContainerGroupInstanceCountSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerGroupInstanceCountSummary.

type ContainerGroupProfile

type ContainerGroupProfile struct {
	// REQUIRED; Specifies container group profile id of standby container groups.
	ID *string

	// Specifies revision of container group profile.
	Revision *int64
}

ContainerGroupProfile - Details of the ContainerGroupProfile.

func (ContainerGroupProfile) MarshalJSON

func (c ContainerGroupProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerGroupProfile.

func (*ContainerGroupProfile) UnmarshalJSON

func (c *ContainerGroupProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerGroupProfile.

type ContainerGroupProperties

type ContainerGroupProperties struct {
	// REQUIRED; Specifies container group profile of standby container groups.
	ContainerGroupProfile *ContainerGroupProfile

	// Specifies subnet Ids for container group.
	SubnetIDs []*Subnet
}

ContainerGroupProperties - Details of the ContainerGroupProperties.

func (ContainerGroupProperties) MarshalJSON

func (c ContainerGroupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ContainerGroupProperties.

func (*ContainerGroupProperties) UnmarshalJSON

func (c *ContainerGroupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ContainerGroupProperties.

type CreatedByType

type CreatedByType string

CreatedByType - The kind of entity that created the resource.

const (
	// CreatedByTypeApplication - The entity was created by an application.
	CreatedByTypeApplication CreatedByType = "Application"
	// CreatedByTypeKey - The entity was created by a key.
	CreatedByTypeKey CreatedByType = "Key"
	// CreatedByTypeManagedIdentity - The entity was created by a managed identity.
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	// CreatedByTypeUser - The entity was created by a user.
	CreatedByTypeUser CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type Operation

type Operation struct {
	// Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
	ActionType *ActionType

	// READ-ONLY; Localized display information for this particular operation.
	Display *OperationDisplay

	// READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
	// Resource Manager/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 and 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 {
	// REQUIRED; The Operation items on this page
	Value []*Operation

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

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 2024-03-01

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

Generated from example definition: 2024-03-01/Operations_List.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("<subscriptionID>", 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 = armstandbypool.OperationsClientListResponse{
		// 	OperationListResult: armstandbypool.OperationListResult{
		// 		Value: []*armstandbypool.Operation{
		// 			{
		// 				Name: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools/write"),
		// 				IsDataAction: to.Ptr(true),
		// 				Display: &armstandbypool.OperationDisplay{
		// 					Provider: to.Ptr("Microsoft.StandbyPool"),
		// 					Resource: to.Ptr("standbyContainerGroupPools"),
		// 					Operation: to.Ptr("StandbyContainerGroupPools_Create"),
		// 					Description: to.Ptr("Create a StandbyContainerGroupPools Resource"),
		// 				},
		// 				Origin: to.Ptr(armstandbypool.OriginUser),
		// 				ActionType: to.Ptr(armstandbypool.ActionTypeInternal),
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://example.com/providers/Microsoft.StandbyPool/operations"),
		// 	},
		// }
	}
}
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 - Indicates the operation is initiated by a system.
	OriginSystem Origin = "system"
	// OriginUser - Indicates the operation is initiated by a user.
	OriginUser Origin = "user"
	// OriginUserSystem - Indicates the operation is initiated by a user or system.
	OriginUserSystem Origin = "user,system"
)

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type PoolResourceStateCount added in v1.0.0

type PoolResourceStateCount struct {
	// REQUIRED; The count of pooled resources in the given state.
	Count *int64

	// REQUIRED; The state that the pooled resources count is for.
	State *string
}

PoolResourceStateCount - Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider.

func (PoolResourceStateCount) MarshalJSON added in v1.0.0

func (p PoolResourceStateCount) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PoolResourceStateCount.

func (*PoolResourceStateCount) UnmarshalJSON added in v1.0.0

func (p *PoolResourceStateCount) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PoolResourceStateCount.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state

const (
	// ProvisioningStateCanceled - Resource creation was canceled.
	ProvisioningStateCanceled ProvisioningState = "Canceled"
	// ProvisioningStateDeleting - Resource is being deleted.
	ProvisioningStateDeleting ProvisioningState = "Deleting"
	// ProvisioningStateFailed - Resource creation failed.
	ProvisioningStateFailed ProvisioningState = "Failed"
	// ProvisioningStateSucceeded - Resource has been created.
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type RefillPolicy

type RefillPolicy string

RefillPolicy - Refill policy of standby pool

const (
	// RefillPolicyAlways - A refill policy that standby pool is automatically refilled to maintain maxReadyCapacity.
	RefillPolicyAlways RefillPolicy = "always"
)

func PossibleRefillPolicyValues

func PossibleRefillPolicyValues() []RefillPolicy

PossibleRefillPolicyValues returns the possible values for the RefillPolicy const type.

type StandbyContainerGroupPoolElasticityProfile

type StandbyContainerGroupPoolElasticityProfile struct {
	// REQUIRED; Specifies maximum number of standby container groups in the standby pool.
	MaxReadyCapacity *int64

	// Specifies refill policy of the pool.
	RefillPolicy *RefillPolicy
}

StandbyContainerGroupPoolElasticityProfile - Specifies the elasticity profile of the standby container group pools.

func (StandbyContainerGroupPoolElasticityProfile) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolElasticityProfile.

func (*StandbyContainerGroupPoolElasticityProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolElasticityProfile.

type StandbyContainerGroupPoolResource

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

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

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

	// READ-ONLY; Name of the standby container group pool
	Name *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *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
}

StandbyContainerGroupPoolResource - A StandbyContainerGroupPoolResource.

func (StandbyContainerGroupPoolResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResource.

func (*StandbyContainerGroupPoolResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResource.

type StandbyContainerGroupPoolResourceListResult

type StandbyContainerGroupPoolResourceListResult struct {
	// REQUIRED; The StandbyContainerGroupPoolResource items on this page
	Value []*StandbyContainerGroupPoolResource

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

StandbyContainerGroupPoolResourceListResult - The response of a StandbyContainerGroupPoolResource list operation.

func (StandbyContainerGroupPoolResourceListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResourceListResult.

func (*StandbyContainerGroupPoolResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResourceListResult.

type StandbyContainerGroupPoolResourceProperties

type StandbyContainerGroupPoolResourceProperties struct {
	// REQUIRED; Specifies container group properties of standby container group pools.
	ContainerGroupProperties *ContainerGroupProperties

	// REQUIRED; Specifies elasticity profile of standby container group pools.
	ElasticityProfile *StandbyContainerGroupPoolElasticityProfile

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

StandbyContainerGroupPoolResourceProperties - Details of the StandbyContainerGroupPool.

func (StandbyContainerGroupPoolResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResourceProperties.

func (*StandbyContainerGroupPoolResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResourceProperties.

type StandbyContainerGroupPoolResourceUpdate

type StandbyContainerGroupPoolResourceUpdate struct {
	// The resource-specific properties for this resource.
	Properties *StandbyContainerGroupPoolResourceUpdateProperties

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

StandbyContainerGroupPoolResourceUpdate - The type used for update operations of the StandbyContainerGroupPoolResource.

func (StandbyContainerGroupPoolResourceUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResourceUpdate.

func (*StandbyContainerGroupPoolResourceUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResourceUpdate.

type StandbyContainerGroupPoolResourceUpdateProperties

type StandbyContainerGroupPoolResourceUpdateProperties struct {
	// Specifies container group properties of standby container group pools.
	ContainerGroupProperties *ContainerGroupProperties

	// Specifies elasticity profile of standby container group pools.
	ElasticityProfile *StandbyContainerGroupPoolElasticityProfile
}

StandbyContainerGroupPoolResourceUpdateProperties - The updatable properties of the StandbyContainerGroupPoolResource.

func (StandbyContainerGroupPoolResourceUpdateProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResourceUpdateProperties.

func (*StandbyContainerGroupPoolResourceUpdateProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResourceUpdateProperties.

type StandbyContainerGroupPoolRuntimeViewResource added in v1.0.0

type StandbyContainerGroupPoolRuntimeViewResource struct {
	// The resource-specific properties for this resource.
	Properties *StandbyContainerGroupPoolRuntimeViewResourceProperties

	// READ-ONLY; The unique identifier for the runtime view. The input string should be the word 'latest', which will get the
	// latest runtime view of the pool, otherwise the request will fail with NotFound exception.
	Name *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *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
}

StandbyContainerGroupPoolRuntimeViewResource - Contains information about a standby container group pool as last known by the StandbyPool resource provider.

func (StandbyContainerGroupPoolRuntimeViewResource) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolRuntimeViewResource.

func (*StandbyContainerGroupPoolRuntimeViewResource) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolRuntimeViewResource.

type StandbyContainerGroupPoolRuntimeViewResourceListResult added in v1.0.0

type StandbyContainerGroupPoolRuntimeViewResourceListResult struct {
	// REQUIRED; The StandbyContainerGroupPoolRuntimeViewResource items on this page
	Value []*StandbyContainerGroupPoolRuntimeViewResource

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

StandbyContainerGroupPoolRuntimeViewResourceListResult - The response of a StandbyContainerGroupPoolRuntimeViewResource list operation.

func (StandbyContainerGroupPoolRuntimeViewResourceListResult) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolRuntimeViewResourceListResult.

func (*StandbyContainerGroupPoolRuntimeViewResourceListResult) UnmarshalJSON added in v1.0.0

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolRuntimeViewResourceListResult.

type StandbyContainerGroupPoolRuntimeViewResourceProperties added in v1.0.0

type StandbyContainerGroupPoolRuntimeViewResourceProperties struct {
	// READ-ONLY; A list containing the counts of container groups in each possible state, as known by the StandbyPool resource
	// provider.
	InstanceCountSummary []*ContainerGroupInstanceCountSummary

	// READ-ONLY; Displays the provisioning state of the standby pool
	ProvisioningState *ProvisioningState
}

StandbyContainerGroupPoolRuntimeViewResourceProperties - Contains information about a standby pool as last known by the StandbyPool resource provider.

func (StandbyContainerGroupPoolRuntimeViewResourceProperties) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolRuntimeViewResourceProperties.

func (*StandbyContainerGroupPoolRuntimeViewResourceProperties) UnmarshalJSON added in v1.0.0

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolRuntimeViewResourceProperties.

type StandbyContainerGroupPoolRuntimeViewsClient added in v1.0.0

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

StandbyContainerGroupPoolRuntimeViewsClient contains the methods for the StandbyContainerGroupPoolRuntimeViews group. Don't use this type directly, use NewStandbyContainerGroupPoolRuntimeViewsClient() instead.

func NewStandbyContainerGroupPoolRuntimeViewsClient added in v1.0.0

func NewStandbyContainerGroupPoolRuntimeViewsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StandbyContainerGroupPoolRuntimeViewsClient, error)

NewStandbyContainerGroupPoolRuntimeViewsClient creates a new instance of StandbyContainerGroupPoolRuntimeViewsClient with the specified values.

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

func (*StandbyContainerGroupPoolRuntimeViewsClient) Get added in v1.0.0

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyContainerGroupPoolName - Name of the standby container group pool
  • runtimeView - The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.
  • options - StandbyContainerGroupPoolRuntimeViewsClientGetOptions contains the optional parameters for the StandbyContainerGroupPoolRuntimeViewsClient.Get method.
Example

Generated from example definition: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewStandbyContainerGroupPoolRuntimeViewsClient().Get(ctx, "rgstandbypool", "pool", "latest", 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 = armstandbypool.StandbyContainerGroupPoolRuntimeViewsClientGetResponse{
	// 	StandbyContainerGroupPoolRuntimeViewResource: &armstandbypool.StandbyContainerGroupPoolRuntimeViewResource{
	// 		Properties: &armstandbypool.StandbyContainerGroupPoolRuntimeViewResourceProperties{
	// 			InstanceCountSummary: []*armstandbypool.ContainerGroupInstanceCountSummary{
	// 				{
	// 					InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{
	// 						{
	// 							State: to.Ptr("creating"),
	// 							Count: to.Ptr[int64](100),
	// 						},
	// 						{
	// 							State: to.Ptr("running"),
	// 							Count: to.Ptr[int64](500),
	// 						},
	// 						{
	// 							State: to.Ptr("deleting"),
	// 							Count: to.Ptr[int64](20),
	// 						},
	// 					},
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*StandbyContainerGroupPoolRuntimeViewsClient) NewListByStandbyPoolPager added in v1.0.0

NewListByStandbyPoolPager - List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyContainerGroupPoolName - Name of the standby container group pool
  • options - StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolOptions contains the optional parameters for the StandbyContainerGroupPoolRuntimeViewsClient.NewListByStandbyPoolPager method.
Example

Generated from example definition: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewStandbyContainerGroupPoolRuntimeViewsClient().NewListByStandbyPoolPager("rgstandbypool", "pool", 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 = armstandbypool.StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolResponse{
		// 	StandbyContainerGroupPoolRuntimeViewResourceListResult: armstandbypool.StandbyContainerGroupPoolRuntimeViewResourceListResult{
		// 		Value: []*armstandbypool.StandbyContainerGroupPoolRuntimeViewResource{
		// 			{
		// 				Properties: &armstandbypool.StandbyContainerGroupPoolRuntimeViewResourceProperties{
		// 					InstanceCountSummary: []*armstandbypool.ContainerGroupInstanceCountSummary{
		// 						{
		// 							InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{
		// 								{
		// 									State: to.Ptr("creating"),
		// 									Count: to.Ptr[int64](100),
		// 								},
		// 								{
		// 									State: to.Ptr("running"),
		// 									Count: to.Ptr[int64](500),
		// 								},
		// 								{
		// 									State: to.Ptr("deleting"),
		// 									Count: to.Ptr[int64](20),
		// 								},
		// 							},
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
		// 				},
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest"),
		// 				Name: to.Ptr("pool"),
		// 				Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews"),
		// 				SystemData: &armstandbypool.SystemData{
		// 					CreatedBy: to.Ptr("pooluser@microsoft.com"),
		// 					CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

type StandbyContainerGroupPoolRuntimeViewsClientGetOptions added in v1.0.0

type StandbyContainerGroupPoolRuntimeViewsClientGetOptions struct {
}

StandbyContainerGroupPoolRuntimeViewsClientGetOptions contains the optional parameters for the StandbyContainerGroupPoolRuntimeViewsClient.Get method.

type StandbyContainerGroupPoolRuntimeViewsClientGetResponse added in v1.0.0

type StandbyContainerGroupPoolRuntimeViewsClientGetResponse struct {
	// Contains information about a standby container group pool as last known by the StandbyPool resource provider.
	StandbyContainerGroupPoolRuntimeViewResource
}

StandbyContainerGroupPoolRuntimeViewsClientGetResponse contains the response from method StandbyContainerGroupPoolRuntimeViewsClient.Get.

type StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolOptions added in v1.0.0

type StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolOptions struct {
}

StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolOptions contains the optional parameters for the StandbyContainerGroupPoolRuntimeViewsClient.NewListByStandbyPoolPager method.

type StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolResponse added in v1.0.0

type StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolResponse struct {
	// The response of a StandbyContainerGroupPoolRuntimeViewResource list operation.
	StandbyContainerGroupPoolRuntimeViewResourceListResult
}

StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolResponse contains the response from method StandbyContainerGroupPoolRuntimeViewsClient.NewListByStandbyPoolPager.

type StandbyContainerGroupPoolsClient

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

StandbyContainerGroupPoolsClient contains the methods for the StandbyContainerGroupPools group. Don't use this type directly, use NewStandbyContainerGroupPoolsClient() instead.

func NewStandbyContainerGroupPoolsClient

func NewStandbyContainerGroupPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StandbyContainerGroupPoolsClient, error)

NewStandbyContainerGroupPoolsClient creates a new instance of StandbyContainerGroupPoolsClient with the specified values.

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

func (*StandbyContainerGroupPoolsClient) BeginCreateOrUpdate

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyContainerGroupPoolName - Name of the standby container group pool
  • resource - Resource create parameters.
  • options - StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json

package main

import (
	"context"
	"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/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewStandbyContainerGroupPoolsClient().BeginCreateOrUpdate(ctx, "rgstandbypool", "pool", armstandbypool.StandbyContainerGroupPoolResource{
		Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{
			ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{
				MaxReadyCapacity: to.Ptr[int64](688),
				RefillPolicy:     to.Ptr(armstandbypool.RefillPolicyAlways),
			},
			ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{
				ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{
					ID:       to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"),
					Revision: to.Ptr[int64](1),
				},
				SubnetIDs: []*armstandbypool.Subnet{
					{
						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"),
					},
				},
			},
		},
		Tags:     map[string]*string{},
		Location: to.Ptr("West US"),
	}, 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 = armstandbypool.StandbyContainerGroupPoolsClientCreateOrUpdateResponse{
	// 	StandbyContainerGroupPoolResource: &armstandbypool.StandbyContainerGroupPoolResource{
	// 		Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{
	// 			ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{
	// 				MaxReadyCapacity: to.Ptr[int64](688),
	// 				RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways),
	// 			},
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 			ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{
	// 				ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{
	// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"),
	// 					Revision: to.Ptr[int64](1),
	// 				},
	// 				SubnetIDs: []*armstandbypool.Subnet{
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("West US"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*StandbyContainerGroupPoolsClient) BeginDelete

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyContainerGroupPoolName - Name of the standby container group pool
  • options - StandbyContainerGroupPoolsClientBeginDeleteOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginDelete method.
Example

Generated from example definition: 2024-03-01/StandbyContainerGroupPools_Delete.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewStandbyContainerGroupPoolsClient().BeginDelete(ctx, "rgstandbypool", "pool", 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 (*StandbyContainerGroupPoolsClient) Get

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyContainerGroupPoolName - Name of the standby container group pool
  • options - StandbyContainerGroupPoolsClientGetOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Get method.
Example

Generated from example definition: 2024-03-01/StandbyContainerGroupPools_Get.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewStandbyContainerGroupPoolsClient().Get(ctx, "rgstandbypool", "pool", 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 = armstandbypool.StandbyContainerGroupPoolsClientGetResponse{
	// 	StandbyContainerGroupPoolResource: &armstandbypool.StandbyContainerGroupPoolResource{
	// 		Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{
	// 			ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{
	// 				MaxReadyCapacity: to.Ptr[int64](688),
	// 				RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways),
	// 			},
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 			ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{
	// 				ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{
	// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"),
	// 					Revision: to.Ptr[int64](1),
	// 				},
	// 				SubnetIDs: []*armstandbypool.Subnet{
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("West US"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*StandbyContainerGroupPoolsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List StandbyContainerGroupPoolResource resources by resource group

Generated from API version 2024-03-01

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

Generated from example definition: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewStandbyContainerGroupPoolsClient().NewListByResourceGroupPager("rgstandbypool", 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 = armstandbypool.StandbyContainerGroupPoolsClientListByResourceGroupResponse{
		// 	StandbyContainerGroupPoolResourceListResult: armstandbypool.StandbyContainerGroupPoolResourceListResult{
		// 		Value: []*armstandbypool.StandbyContainerGroupPoolResource{
		// 			{
		// 				Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{
		// 					ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{
		// 						MaxReadyCapacity: to.Ptr[int64](688),
		// 						RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways),
		// 					},
		// 					ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
		// 					ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{
		// 						ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{
		// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"),
		// 							Revision: to.Ptr[int64](1),
		// 						},
		// 						SubnetIDs: []*armstandbypool.Subnet{
		// 							{
		// 								ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"),
		// 							},
		// 						},
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("West US"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"),
		// 				Name: to.Ptr("pool"),
		// 				Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"),
		// 				SystemData: &armstandbypool.SystemData{
		// 					CreatedBy: to.Ptr("pooluser@microsoft.com"),
		// 					CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

func (*StandbyContainerGroupPoolsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List StandbyContainerGroupPoolResource resources by subscription ID

Generated from API version 2024-03-01

  • options - StandbyContainerGroupPoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewStandbyContainerGroupPoolsClient().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 = armstandbypool.StandbyContainerGroupPoolsClientListBySubscriptionResponse{
		// 	StandbyContainerGroupPoolResourceListResult: armstandbypool.StandbyContainerGroupPoolResourceListResult{
		// 		Value: []*armstandbypool.StandbyContainerGroupPoolResource{
		// 			{
		// 				Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{
		// 					ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{
		// 						MaxReadyCapacity: to.Ptr[int64](688),
		// 						RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways),
		// 					},
		// 					ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
		// 					ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{
		// 						ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{
		// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"),
		// 							Revision: to.Ptr[int64](1),
		// 						},
		// 						SubnetIDs: []*armstandbypool.Subnet{
		// 							{
		// 								ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"),
		// 							},
		// 						},
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("West US"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"),
		// 				Name: to.Ptr("pool"),
		// 				Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"),
		// 				SystemData: &armstandbypool.SystemData{
		// 					CreatedBy: to.Ptr("pooluser@microsoft.com"),
		// 					CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

func (*StandbyContainerGroupPoolsClient) Update

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyContainerGroupPoolName - Name of the standby container group pool
  • properties - The resource properties to be updated.
  • options - StandbyContainerGroupPoolsClientUpdateOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Update method.
Example

Generated from example definition: 2024-03-01/StandbyContainerGroupPools_Update.json

package main

import (
	"context"
	"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/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewStandbyContainerGroupPoolsClient().Update(ctx, "rgstandbypool", "pool", armstandbypool.StandbyContainerGroupPoolResourceUpdate{
		Tags: map[string]*string{},
		Properties: &armstandbypool.StandbyContainerGroupPoolResourceUpdateProperties{
			ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{
				MaxReadyCapacity: to.Ptr[int64](1743),
				RefillPolicy:     to.Ptr(armstandbypool.RefillPolicyAlways),
			},
			ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{
				ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{
					ID:       to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"),
					Revision: to.Ptr[int64](2),
				},
				SubnetIDs: []*armstandbypool.Subnet{
					{
						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"),
					},
				},
			},
		},
	}, 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 = armstandbypool.StandbyContainerGroupPoolsClientUpdateResponse{
	// 	StandbyContainerGroupPoolResource: &armstandbypool.StandbyContainerGroupPoolResource{
	// 		Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{
	// 			ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{
	// 				MaxReadyCapacity: to.Ptr[int64](1743),
	// 				RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways),
	// 			},
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 			ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{
	// 				ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{
	// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"),
	// 					Revision: to.Ptr[int64](2),
	// 				},
	// 				SubnetIDs: []*armstandbypool.Subnet{
	// 					{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("West US"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

type StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions

type StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginCreateOrUpdate method.

type StandbyContainerGroupPoolsClientBeginDeleteOptions

type StandbyContainerGroupPoolsClientBeginDeleteOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

StandbyContainerGroupPoolsClientBeginDeleteOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginDelete method.

type StandbyContainerGroupPoolsClientCreateOrUpdateResponse

type StandbyContainerGroupPoolsClientCreateOrUpdateResponse struct {
	// A StandbyContainerGroupPoolResource.
	StandbyContainerGroupPoolResource
}

StandbyContainerGroupPoolsClientCreateOrUpdateResponse contains the response from method StandbyContainerGroupPoolsClient.BeginCreateOrUpdate.

type StandbyContainerGroupPoolsClientDeleteResponse

type StandbyContainerGroupPoolsClientDeleteResponse struct {
}

StandbyContainerGroupPoolsClientDeleteResponse contains the response from method StandbyContainerGroupPoolsClient.BeginDelete.

type StandbyContainerGroupPoolsClientGetOptions

type StandbyContainerGroupPoolsClientGetOptions struct {
}

StandbyContainerGroupPoolsClientGetOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Get method.

type StandbyContainerGroupPoolsClientGetResponse

type StandbyContainerGroupPoolsClientGetResponse struct {
	// A StandbyContainerGroupPoolResource.
	StandbyContainerGroupPoolResource
}

StandbyContainerGroupPoolsClientGetResponse contains the response from method StandbyContainerGroupPoolsClient.Get.

type StandbyContainerGroupPoolsClientListByResourceGroupOptions

type StandbyContainerGroupPoolsClientListByResourceGroupOptions struct {
}

StandbyContainerGroupPoolsClientListByResourceGroupOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListByResourceGroupPager method.

type StandbyContainerGroupPoolsClientListByResourceGroupResponse

type StandbyContainerGroupPoolsClientListByResourceGroupResponse struct {
	// The response of a StandbyContainerGroupPoolResource list operation.
	StandbyContainerGroupPoolResourceListResult
}

StandbyContainerGroupPoolsClientListByResourceGroupResponse contains the response from method StandbyContainerGroupPoolsClient.NewListByResourceGroupPager.

type StandbyContainerGroupPoolsClientListBySubscriptionOptions

type StandbyContainerGroupPoolsClientListBySubscriptionOptions struct {
}

StandbyContainerGroupPoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListBySubscriptionPager method.

type StandbyContainerGroupPoolsClientListBySubscriptionResponse

type StandbyContainerGroupPoolsClientListBySubscriptionResponse struct {
	// The response of a StandbyContainerGroupPoolResource list operation.
	StandbyContainerGroupPoolResourceListResult
}

StandbyContainerGroupPoolsClientListBySubscriptionResponse contains the response from method StandbyContainerGroupPoolsClient.NewListBySubscriptionPager.

type StandbyContainerGroupPoolsClientUpdateOptions

type StandbyContainerGroupPoolsClientUpdateOptions struct {
}

StandbyContainerGroupPoolsClientUpdateOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Update method.

type StandbyContainerGroupPoolsClientUpdateResponse

type StandbyContainerGroupPoolsClientUpdateResponse struct {
	// A StandbyContainerGroupPoolResource.
	StandbyContainerGroupPoolResource
}

StandbyContainerGroupPoolsClientUpdateResponse contains the response from method StandbyContainerGroupPoolsClient.Update.

type StandbyVirtualMachinePoolElasticityProfile

type StandbyVirtualMachinePoolElasticityProfile struct {
	// REQUIRED; Specifies the maximum number of virtual machines in the standby virtual machine pool.
	MaxReadyCapacity *int64

	// Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed
	// MaxReadyCapacity.
	MinReadyCapacity *int64
}

StandbyVirtualMachinePoolElasticityProfile - Details of the elasticity profile.

func (StandbyVirtualMachinePoolElasticityProfile) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolElasticityProfile.

func (*StandbyVirtualMachinePoolElasticityProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolElasticityProfile.

type StandbyVirtualMachinePoolResource

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

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

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

	// READ-ONLY; Name of the standby virtual machine pool
	Name *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *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
}

StandbyVirtualMachinePoolResource - A StandbyVirtualMachinePoolResource.

func (StandbyVirtualMachinePoolResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResource.

func (*StandbyVirtualMachinePoolResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResource.

type StandbyVirtualMachinePoolResourceListResult

type StandbyVirtualMachinePoolResourceListResult struct {
	// REQUIRED; The StandbyVirtualMachinePoolResource items on this page
	Value []*StandbyVirtualMachinePoolResource

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

StandbyVirtualMachinePoolResourceListResult - The response of a StandbyVirtualMachinePoolResource list operation.

func (StandbyVirtualMachinePoolResourceListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResourceListResult.

func (*StandbyVirtualMachinePoolResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResourceListResult.

type StandbyVirtualMachinePoolResourceProperties

type StandbyVirtualMachinePoolResourceProperties struct {
	// REQUIRED; Specifies the desired state of virtual machines in the pool.
	VirtualMachineState *VirtualMachineState

	// Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.
	AttachedVirtualMachineScaleSetID *string

	// Specifies the elasticity profile of the standby virtual machine pools.
	ElasticityProfile *StandbyVirtualMachinePoolElasticityProfile

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

StandbyVirtualMachinePoolResourceProperties - Details of the StandbyVirtualMachinePool.

func (StandbyVirtualMachinePoolResourceProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResourceProperties.

func (*StandbyVirtualMachinePoolResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResourceProperties.

type StandbyVirtualMachinePoolResourceUpdate

type StandbyVirtualMachinePoolResourceUpdate struct {
	// The resource-specific properties for this resource.
	Properties *StandbyVirtualMachinePoolResourceUpdateProperties

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

StandbyVirtualMachinePoolResourceUpdate - The type used for update operations of the StandbyVirtualMachinePoolResource.

func (StandbyVirtualMachinePoolResourceUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResourceUpdate.

func (*StandbyVirtualMachinePoolResourceUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResourceUpdate.

type StandbyVirtualMachinePoolResourceUpdateProperties

type StandbyVirtualMachinePoolResourceUpdateProperties struct {
	// Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.
	AttachedVirtualMachineScaleSetID *string

	// Specifies the elasticity profile of the standby virtual machine pools.
	ElasticityProfile *StandbyVirtualMachinePoolElasticityProfile

	// Specifies the desired state of virtual machines in the pool.
	VirtualMachineState *VirtualMachineState
}

StandbyVirtualMachinePoolResourceUpdateProperties - The updatable properties of the StandbyVirtualMachinePoolResource.

func (StandbyVirtualMachinePoolResourceUpdateProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResourceUpdateProperties.

func (*StandbyVirtualMachinePoolResourceUpdateProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResourceUpdateProperties.

type StandbyVirtualMachinePoolRuntimeViewResource added in v1.0.0

type StandbyVirtualMachinePoolRuntimeViewResource struct {
	// The resource-specific properties for this resource.
	Properties *StandbyVirtualMachinePoolRuntimeViewResourceProperties

	// READ-ONLY; The unique identifier for the runtime view. The input string should be the word 'latest', which will get the
	// latest runtime view of the pool, otherwise the request will fail with NotFound exception.
	Name *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *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
}

StandbyVirtualMachinePoolRuntimeViewResource - Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider.

func (StandbyVirtualMachinePoolRuntimeViewResource) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolRuntimeViewResource.

func (*StandbyVirtualMachinePoolRuntimeViewResource) UnmarshalJSON added in v1.0.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolRuntimeViewResource.

type StandbyVirtualMachinePoolRuntimeViewResourceListResult added in v1.0.0

type StandbyVirtualMachinePoolRuntimeViewResourceListResult struct {
	// REQUIRED; The StandbyVirtualMachinePoolRuntimeViewResource items on this page
	Value []*StandbyVirtualMachinePoolRuntimeViewResource

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

StandbyVirtualMachinePoolRuntimeViewResourceListResult - The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation.

func (StandbyVirtualMachinePoolRuntimeViewResourceListResult) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolRuntimeViewResourceListResult.

func (*StandbyVirtualMachinePoolRuntimeViewResourceListResult) UnmarshalJSON added in v1.0.0

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolRuntimeViewResourceListResult.

type StandbyVirtualMachinePoolRuntimeViewResourceProperties added in v1.0.0

type StandbyVirtualMachinePoolRuntimeViewResourceProperties struct {
	// READ-ONLY; A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known
	// by the StandbyPool resource provider.
	// If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values.
	// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here.
	// Note: any resources in the Running state may still be installing extensions / not fully provisioned.
	InstanceCountSummary []*VirtualMachineInstanceCountSummary

	// READ-ONLY; Displays the provisioning state of the standby pool
	ProvisioningState *ProvisioningState
}

StandbyVirtualMachinePoolRuntimeViewResourceProperties - Contains information about a standby pool as last known by the StandbyPool resource provider.

func (StandbyVirtualMachinePoolRuntimeViewResourceProperties) MarshalJSON added in v1.0.0

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolRuntimeViewResourceProperties.

func (*StandbyVirtualMachinePoolRuntimeViewResourceProperties) UnmarshalJSON added in v1.0.0

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolRuntimeViewResourceProperties.

type StandbyVirtualMachinePoolRuntimeViewsClient added in v1.0.0

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

StandbyVirtualMachinePoolRuntimeViewsClient contains the methods for the StandbyVirtualMachinePoolRuntimeViews group. Don't use this type directly, use NewStandbyVirtualMachinePoolRuntimeViewsClient() instead.

func NewStandbyVirtualMachinePoolRuntimeViewsClient added in v1.0.0

func NewStandbyVirtualMachinePoolRuntimeViewsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StandbyVirtualMachinePoolRuntimeViewsClient, error)

NewStandbyVirtualMachinePoolRuntimeViewsClient creates a new instance of StandbyVirtualMachinePoolRuntimeViewsClient with the specified values.

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

func (*StandbyVirtualMachinePoolRuntimeViewsClient) Get added in v1.0.0

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyVirtualMachinePoolName - Name of the standby virtual machine pool
  • runtimeView - The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.
  • options - StandbyVirtualMachinePoolRuntimeViewsClientGetOptions contains the optional parameters for the StandbyVirtualMachinePoolRuntimeViewsClient.Get method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewStandbyVirtualMachinePoolRuntimeViewsClient().Get(ctx, "rgstandbypool", "pool", "latest", 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 = armstandbypool.StandbyVirtualMachinePoolRuntimeViewsClientGetResponse{
	// 	StandbyVirtualMachinePoolRuntimeViewResource: &armstandbypool.StandbyVirtualMachinePoolRuntimeViewResource{
	// 		Properties: &armstandbypool.StandbyVirtualMachinePoolRuntimeViewResourceProperties{
	// 			InstanceCountSummary: []*armstandbypool.VirtualMachineInstanceCountSummary{
	// 				{
	// 					Zone: to.Ptr[int64](1),
	// 					InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{
	// 						{
	// 							State: to.Ptr("creating"),
	// 							Count: to.Ptr[int64](100),
	// 						},
	// 						{
	// 							State: to.Ptr("running"),
	// 							Count: to.Ptr[int64](20),
	// 						},
	// 						{
	// 							State: to.Ptr("deallocating"),
	// 							Count: to.Ptr[int64](10),
	// 						},
	// 						{
	// 							State: to.Ptr("deallocated"),
	// 							Count: to.Ptr[int64](100),
	// 						},
	// 						{
	// 							State: to.Ptr("starting"),
	// 							Count: to.Ptr[int64](0),
	// 						},
	// 						{
	// 							State: to.Ptr("deleting"),
	// 							Count: to.Ptr[int64](0),
	// 						},
	// 					},
	// 				},
	// 				{
	// 					Zone: to.Ptr[int64](2),
	// 					InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{
	// 						{
	// 							State: to.Ptr("creating"),
	// 							Count: to.Ptr[int64](100),
	// 						},
	// 						{
	// 							State: to.Ptr("running"),
	// 							Count: to.Ptr[int64](20),
	// 						},
	// 						{
	// 							State: to.Ptr("deallocating"),
	// 							Count: to.Ptr[int64](10),
	// 						},
	// 						{
	// 							State: to.Ptr("deallocated"),
	// 							Count: to.Ptr[int64](100),
	// 						},
	// 						{
	// 							State: to.Ptr("starting"),
	// 							Count: to.Ptr[int64](0),
	// 						},
	// 						{
	// 							State: to.Ptr("deleting"),
	// 							Count: to.Ptr[int64](0),
	// 						},
	// 					},
	// 				},
	// 				{
	// 					Zone: to.Ptr[int64](3),
	// 					InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{
	// 						{
	// 							State: to.Ptr("creating"),
	// 							Count: to.Ptr[int64](100),
	// 						},
	// 						{
	// 							State: to.Ptr("running"),
	// 							Count: to.Ptr[int64](20),
	// 						},
	// 						{
	// 							State: to.Ptr("deallocating"),
	// 							Count: to.Ptr[int64](10),
	// 						},
	// 						{
	// 							State: to.Ptr("deallocated"),
	// 							Count: to.Ptr[int64](100),
	// 						},
	// 						{
	// 							State: to.Ptr("starting"),
	// 							Count: to.Ptr[int64](0),
	// 						},
	// 						{
	// 							State: to.Ptr("deleting"),
	// 							Count: to.Ptr[int64](0),
	// 						},
	// 					},
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-02-14T23:31:59.679Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-02-14T23:31:59.679Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*StandbyVirtualMachinePoolRuntimeViewsClient) NewListByStandbyPoolPager added in v1.0.0

NewListByStandbyPoolPager - List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyVirtualMachinePoolName - Name of the standby virtual machine pool
  • options - StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolOptions contains the optional parameters for the StandbyVirtualMachinePoolRuntimeViewsClient.NewListByStandbyPoolPager method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewStandbyVirtualMachinePoolRuntimeViewsClient().NewListByStandbyPoolPager("rgstandbypool", "pool", 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 = armstandbypool.StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolResponse{
		// 	StandbyVirtualMachinePoolRuntimeViewResourceListResult: armstandbypool.StandbyVirtualMachinePoolRuntimeViewResourceListResult{
		// 		Value: []*armstandbypool.StandbyVirtualMachinePoolRuntimeViewResource{
		// 			{
		// 				Properties: &armstandbypool.StandbyVirtualMachinePoolRuntimeViewResourceProperties{
		// 					InstanceCountSummary: []*armstandbypool.VirtualMachineInstanceCountSummary{
		// 						{
		// 							Zone: to.Ptr[int64](1),
		// 							InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{
		// 								{
		// 									State: to.Ptr("creating"),
		// 									Count: to.Ptr[int64](100),
		// 								},
		// 								{
		// 									State: to.Ptr("running"),
		// 									Count: to.Ptr[int64](20),
		// 								},
		// 								{
		// 									State: to.Ptr("deallocating"),
		// 									Count: to.Ptr[int64](10),
		// 								},
		// 								{
		// 									State: to.Ptr("deallocated"),
		// 									Count: to.Ptr[int64](100),
		// 								},
		// 								{
		// 									State: to.Ptr("starting"),
		// 									Count: to.Ptr[int64](0),
		// 								},
		// 								{
		// 									State: to.Ptr("deleting"),
		// 									Count: to.Ptr[int64](0),
		// 								},
		// 							},
		// 						},
		// 						{
		// 							Zone: to.Ptr[int64](2),
		// 							InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{
		// 								{
		// 									State: to.Ptr("creating"),
		// 									Count: to.Ptr[int64](100),
		// 								},
		// 								{
		// 									State: to.Ptr("running"),
		// 									Count: to.Ptr[int64](20),
		// 								},
		// 								{
		// 									State: to.Ptr("deallocating"),
		// 									Count: to.Ptr[int64](10),
		// 								},
		// 								{
		// 									State: to.Ptr("deallocated"),
		// 									Count: to.Ptr[int64](100),
		// 								},
		// 								{
		// 									State: to.Ptr("starting"),
		// 									Count: to.Ptr[int64](0),
		// 								},
		// 								{
		// 									State: to.Ptr("deleting"),
		// 									Count: to.Ptr[int64](0),
		// 								},
		// 							},
		// 						},
		// 						{
		// 							Zone: to.Ptr[int64](3),
		// 							InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{
		// 								{
		// 									State: to.Ptr("creating"),
		// 									Count: to.Ptr[int64](100),
		// 								},
		// 								{
		// 									State: to.Ptr("running"),
		// 									Count: to.Ptr[int64](20),
		// 								},
		// 								{
		// 									State: to.Ptr("deallocating"),
		// 									Count: to.Ptr[int64](10),
		// 								},
		// 								{
		// 									State: to.Ptr("deallocated"),
		// 									Count: to.Ptr[int64](100),
		// 								},
		// 								{
		// 									State: to.Ptr("starting"),
		// 									Count: to.Ptr[int64](0),
		// 								},
		// 								{
		// 									State: to.Ptr("deleting"),
		// 									Count: to.Ptr[int64](0),
		// 								},
		// 							},
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
		// 				},
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest"),
		// 				Name: to.Ptr("pool"),
		// 				Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews"),
		// 				SystemData: &armstandbypool.SystemData{
		// 					CreatedBy: to.Ptr("pooluser@microsoft.com"),
		// 					CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

type StandbyVirtualMachinePoolRuntimeViewsClientGetOptions added in v1.0.0

type StandbyVirtualMachinePoolRuntimeViewsClientGetOptions struct {
}

StandbyVirtualMachinePoolRuntimeViewsClientGetOptions contains the optional parameters for the StandbyVirtualMachinePoolRuntimeViewsClient.Get method.

type StandbyVirtualMachinePoolRuntimeViewsClientGetResponse added in v1.0.0

type StandbyVirtualMachinePoolRuntimeViewsClientGetResponse struct {
	// Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider.
	StandbyVirtualMachinePoolRuntimeViewResource
}

StandbyVirtualMachinePoolRuntimeViewsClientGetResponse contains the response from method StandbyVirtualMachinePoolRuntimeViewsClient.Get.

type StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolOptions added in v1.0.0

type StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolOptions struct {
}

StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolOptions contains the optional parameters for the StandbyVirtualMachinePoolRuntimeViewsClient.NewListByStandbyPoolPager method.

type StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolResponse added in v1.0.0

type StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolResponse struct {
	// The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation.
	StandbyVirtualMachinePoolRuntimeViewResourceListResult
}

StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolResponse contains the response from method StandbyVirtualMachinePoolRuntimeViewsClient.NewListByStandbyPoolPager.

type StandbyVirtualMachinePoolsClient

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

StandbyVirtualMachinePoolsClient contains the methods for the StandbyVirtualMachinePools group. Don't use this type directly, use NewStandbyVirtualMachinePoolsClient() instead.

func NewStandbyVirtualMachinePoolsClient

func NewStandbyVirtualMachinePoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StandbyVirtualMachinePoolsClient, error)

NewStandbyVirtualMachinePoolsClient creates a new instance of StandbyVirtualMachinePoolsClient with the specified values.

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

func (*StandbyVirtualMachinePoolsClient) BeginCreateOrUpdate

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyVirtualMachinePoolName - Name of the standby virtual machine pool
  • resource - Resource create parameters.
  • options - StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json

package main

import (
	"context"
	"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/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewStandbyVirtualMachinePoolsClient().BeginCreateOrUpdate(ctx, "rgstandbypool", "pool", armstandbypool.StandbyVirtualMachinePoolResource{
		Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{
			ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{
				MaxReadyCapacity: to.Ptr[int64](304),
				MinReadyCapacity: to.Ptr[int64](300),
			},
			VirtualMachineState:              to.Ptr(armstandbypool.VirtualMachineStateRunning),
			AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"),
		},
		Tags:     map[string]*string{},
		Location: to.Ptr("West US"),
	}, 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 = armstandbypool.StandbyVirtualMachinePoolsClientCreateOrUpdateResponse{
	// 	StandbyVirtualMachinePoolResource: &armstandbypool.StandbyVirtualMachinePoolResource{
	// 		Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{
	// 			ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{
	// 				MaxReadyCapacity: to.Ptr[int64](304),
	// 				MinReadyCapacity: to.Ptr[int64](300),
	// 			},
	// 			VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning),
	// 			AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"),
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("West US"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*StandbyVirtualMachinePoolsClient) BeginDelete

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyVirtualMachinePoolName - Name of the standby virtual machine pool
  • options - StandbyVirtualMachinePoolsClientBeginDeleteOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginDelete method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_Delete.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewStandbyVirtualMachinePoolsClient().BeginDelete(ctx, "rgstandbypool", "pool", 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 (*StandbyVirtualMachinePoolsClient) Get

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyVirtualMachinePoolName - Name of the standby virtual machine pool
  • options - StandbyVirtualMachinePoolsClientGetOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Get method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_Get.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewStandbyVirtualMachinePoolsClient().Get(ctx, "rgstandbypool", "pool", 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 = armstandbypool.StandbyVirtualMachinePoolsClientGetResponse{
	// 	StandbyVirtualMachinePoolResource: &armstandbypool.StandbyVirtualMachinePoolResource{
	// 		Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{
	// 			ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{
	// 				MaxReadyCapacity: to.Ptr[int64](304),
	// 				MinReadyCapacity: to.Ptr[int64](300),
	// 			},
	// 			VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning),
	// 			AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"),
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("West US"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*StandbyVirtualMachinePoolsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - List StandbyVirtualMachinePoolResource resources by resource group

Generated from API version 2024-03-01

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

Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewStandbyVirtualMachinePoolsClient().NewListByResourceGroupPager("rgstandbypool", 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 = armstandbypool.StandbyVirtualMachinePoolsClientListByResourceGroupResponse{
		// 	StandbyVirtualMachinePoolResourceListResult: armstandbypool.StandbyVirtualMachinePoolResourceListResult{
		// 		Value: []*armstandbypool.StandbyVirtualMachinePoolResource{
		// 			{
		// 				Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{
		// 					ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{
		// 						MaxReadyCapacity: to.Ptr[int64](304),
		// 					},
		// 					VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning),
		// 					AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"),
		// 					ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("West US"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"),
		// 				Name: to.Ptr("pool"),
		// 				Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"),
		// 				SystemData: &armstandbypool.SystemData{
		// 					CreatedBy: to.Ptr("pooluser@microsoft.com"),
		// 					CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://example.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools"),
		// 	},
		// }
	}
}
Output:

func (*StandbyVirtualMachinePoolsClient) NewListBySubscriptionPager

NewListBySubscriptionPager - List StandbyVirtualMachinePoolResource resources by subscription ID

Generated from API version 2024-03-01

  • options - StandbyVirtualMachinePoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewStandbyVirtualMachinePoolsClient().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 = armstandbypool.StandbyVirtualMachinePoolsClientListBySubscriptionResponse{
		// 	StandbyVirtualMachinePoolResourceListResult: armstandbypool.StandbyVirtualMachinePoolResourceListResult{
		// 		Value: []*armstandbypool.StandbyVirtualMachinePoolResource{
		// 			{
		// 				Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{
		// 					ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{
		// 						MaxReadyCapacity: to.Ptr[int64](304),
		// 						MinReadyCapacity: to.Ptr[int64](300),
		// 					},
		// 					VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning),
		// 					AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"),
		// 					ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("West US"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"),
		// 				Name: to.Ptr("pool"),
		// 				Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"),
		// 				SystemData: &armstandbypool.SystemData{
		// 					CreatedBy: to.Ptr("pooluser@microsoft.com"),
		// 					CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://example.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools"),
		// 	},
		// }
	}
}
Output:

func (*StandbyVirtualMachinePoolsClient) Update

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyVirtualMachinePoolName - Name of the standby virtual machine pool
  • properties - The resource properties to be updated.
  • options - StandbyVirtualMachinePoolsClientUpdateOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Update method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_Update.json

package main

import (
	"context"
	"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/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewStandbyVirtualMachinePoolsClient().Update(ctx, "rgstandbypool", "pool", armstandbypool.StandbyVirtualMachinePoolResourceUpdate{
		Tags: map[string]*string{},
		Properties: &armstandbypool.StandbyVirtualMachinePoolResourceUpdateProperties{
			ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{
				MaxReadyCapacity: to.Ptr[int64](304),
				MinReadyCapacity: to.Ptr[int64](300),
			},
			VirtualMachineState:              to.Ptr(armstandbypool.VirtualMachineStateRunning),
			AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"),
		},
	}, 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 = armstandbypool.StandbyVirtualMachinePoolsClientUpdateResponse{
	// 	StandbyVirtualMachinePoolResource: &armstandbypool.StandbyVirtualMachinePoolResource{
	// 		Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{
	// 			ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{
	// 				MaxReadyCapacity: to.Ptr[int64](304),
	// 				MinReadyCapacity: to.Ptr[int64](300),
	// 			},
	// 			VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning),
	// 			AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"),
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("West US"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

type StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions

type StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate method.

type StandbyVirtualMachinePoolsClientBeginDeleteOptions

type StandbyVirtualMachinePoolsClientBeginDeleteOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

StandbyVirtualMachinePoolsClientBeginDeleteOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginDelete method.

type StandbyVirtualMachinePoolsClientCreateOrUpdateResponse

type StandbyVirtualMachinePoolsClientCreateOrUpdateResponse struct {
	// A StandbyVirtualMachinePoolResource.
	StandbyVirtualMachinePoolResource
}

StandbyVirtualMachinePoolsClientCreateOrUpdateResponse contains the response from method StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate.

type StandbyVirtualMachinePoolsClientDeleteResponse

type StandbyVirtualMachinePoolsClientDeleteResponse struct {
}

StandbyVirtualMachinePoolsClientDeleteResponse contains the response from method StandbyVirtualMachinePoolsClient.BeginDelete.

type StandbyVirtualMachinePoolsClientGetOptions

type StandbyVirtualMachinePoolsClientGetOptions struct {
}

StandbyVirtualMachinePoolsClientGetOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Get method.

type StandbyVirtualMachinePoolsClientGetResponse

type StandbyVirtualMachinePoolsClientGetResponse struct {
	// A StandbyVirtualMachinePoolResource.
	StandbyVirtualMachinePoolResource
}

StandbyVirtualMachinePoolsClientGetResponse contains the response from method StandbyVirtualMachinePoolsClient.Get.

type StandbyVirtualMachinePoolsClientListByResourceGroupOptions

type StandbyVirtualMachinePoolsClientListByResourceGroupOptions struct {
}

StandbyVirtualMachinePoolsClientListByResourceGroupOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager method.

type StandbyVirtualMachinePoolsClientListByResourceGroupResponse

type StandbyVirtualMachinePoolsClientListByResourceGroupResponse struct {
	// The response of a StandbyVirtualMachinePoolResource list operation.
	StandbyVirtualMachinePoolResourceListResult
}

StandbyVirtualMachinePoolsClientListByResourceGroupResponse contains the response from method StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager.

type StandbyVirtualMachinePoolsClientListBySubscriptionOptions

type StandbyVirtualMachinePoolsClientListBySubscriptionOptions struct {
}

StandbyVirtualMachinePoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager method.

type StandbyVirtualMachinePoolsClientListBySubscriptionResponse

type StandbyVirtualMachinePoolsClientListBySubscriptionResponse struct {
	// The response of a StandbyVirtualMachinePoolResource list operation.
	StandbyVirtualMachinePoolResourceListResult
}

StandbyVirtualMachinePoolsClientListBySubscriptionResponse contains the response from method StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager.

type StandbyVirtualMachinePoolsClientUpdateOptions

type StandbyVirtualMachinePoolsClientUpdateOptions struct {
}

StandbyVirtualMachinePoolsClientUpdateOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Update method.

type StandbyVirtualMachinePoolsClientUpdateResponse

type StandbyVirtualMachinePoolsClientUpdateResponse struct {
	// A StandbyVirtualMachinePoolResource.
	StandbyVirtualMachinePoolResource
}

StandbyVirtualMachinePoolsClientUpdateResponse contains the response from method StandbyVirtualMachinePoolsClient.Update.

type StandbyVirtualMachineResource

type StandbyVirtualMachineResource struct {
	// The resource-specific properties for this resource.
	Properties *StandbyVirtualMachineResourceProperties

	// READ-ONLY; Name of the standby virtual machine
	Name *string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *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
}

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

func (StandbyVirtualMachineResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachineResource.

func (*StandbyVirtualMachineResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachineResource.

type StandbyVirtualMachineResourceListResult

type StandbyVirtualMachineResourceListResult struct {
	// REQUIRED; The StandbyVirtualMachineResource items on this page
	Value []*StandbyVirtualMachineResource

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

StandbyVirtualMachineResourceListResult - The response of a StandbyVirtualMachineResource list operation.

func (StandbyVirtualMachineResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachineResourceListResult.

func (*StandbyVirtualMachineResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachineResourceListResult.

type StandbyVirtualMachineResourceProperties

type StandbyVirtualMachineResourceProperties struct {
	// REQUIRED; Resource id of the virtual machine.
	VirtualMachineResourceID *string

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

StandbyVirtualMachineResourceProperties - Details of the StandbyVirtualMachine.

func (StandbyVirtualMachineResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachineResourceProperties.

func (*StandbyVirtualMachineResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachineResourceProperties.

type StandbyVirtualMachinesClient

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

StandbyVirtualMachinesClient contains the methods for the StandbyVirtualMachines group. Don't use this type directly, use NewStandbyVirtualMachinesClient() instead.

func NewStandbyVirtualMachinesClient

func NewStandbyVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StandbyVirtualMachinesClient, error)

NewStandbyVirtualMachinesClient creates a new instance of StandbyVirtualMachinesClient with the specified values.

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

func (*StandbyVirtualMachinesClient) Get

func (client *StandbyVirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, standbyVirtualMachineName string, options *StandbyVirtualMachinesClientGetOptions) (StandbyVirtualMachinesClientGetResponse, error)

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

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyVirtualMachinePoolName - Name of the standby virtual machine pool
  • standbyVirtualMachineName - Name of the standby virtual machine
  • options - StandbyVirtualMachinesClientGetOptions contains the optional parameters for the StandbyVirtualMachinesClient.Get method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachines_Get.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewStandbyVirtualMachinesClient().Get(ctx, "rgstandbypool", "pool", "virtualMachine", 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 = armstandbypool.StandbyVirtualMachinesClientGetResponse{
	// 	StandbyVirtualMachineResource: &armstandbypool.StandbyVirtualMachineResource{
	// 		Properties: &armstandbypool.StandbyVirtualMachineResourceProperties{
	// 			VirtualMachineResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/provider/Microsoft.Compute/virtualMachines/virtualMachine"),
	// 			ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
	// 		},
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine"),
	// 		Name: to.Ptr("pool"),
	// 		Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines"),
	// 		SystemData: &armstandbypool.SystemData{
	// 			CreatedBy: to.Ptr("pooluser@microsoft.com"),
	// 			CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
	// 		},
	// 	},
	// }
}
Output:

func (*StandbyVirtualMachinesClient) NewListByStandbyVirtualMachinePoolResourcePager

NewListByStandbyVirtualMachinePoolResourcePager - List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource

Generated from API version 2024-03-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • standbyVirtualMachinePoolName - Name of the standby virtual machine pool
  • options - StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions contains the optional parameters for the StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager method.
Example

Generated from example definition: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json

package main

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool"
	"log"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armstandbypool.NewClientFactory("00000000-0000-0000-0000-000000000009", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewStandbyVirtualMachinesClient().NewListByStandbyVirtualMachinePoolResourcePager("rgstandbypool", "pool", 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 = armstandbypool.StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse{
		// 	StandbyVirtualMachineResourceListResult: armstandbypool.StandbyVirtualMachineResourceListResult{
		// 		Value: []*armstandbypool.StandbyVirtualMachineResource{
		// 			{
		// 				Properties: &armstandbypool.StandbyVirtualMachineResourceProperties{
		// 					VirtualMachineResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/provider/Microsoft.Compute/virtualMachines/virtualMachine"),
		// 					ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded),
		// 				},
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine"),
		// 				Name: to.Ptr("pool"),
		// 				Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines"),
		// 				SystemData: &armstandbypool.SystemData{
		// 					CreatedBy: to.Ptr("pooluser@microsoft.com"),
		// 					CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("pooluser@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
Output:

type StandbyVirtualMachinesClientGetOptions

type StandbyVirtualMachinesClientGetOptions struct {
}

StandbyVirtualMachinesClientGetOptions contains the optional parameters for the StandbyVirtualMachinesClient.Get method.

type StandbyVirtualMachinesClientGetResponse

type StandbyVirtualMachinesClientGetResponse struct {
	// Concrete proxy resource types can be created by aliasing this type using a specific property type.
	StandbyVirtualMachineResource
}

StandbyVirtualMachinesClientGetResponse contains the response from method StandbyVirtualMachinesClient.Get.

type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions

type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions struct {
}

StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions contains the optional parameters for the StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager method.

type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse

type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse struct {
	// The response of a StandbyVirtualMachineResource list operation.
	StandbyVirtualMachineResourceListResult
}

StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse contains the response from method StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager.

type Subnet

type Subnet struct {
	// REQUIRED; Specifies ARM resource id of the subnet.
	ID *string
}

Subnet of container group

func (Subnet) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Subnet.

func (*Subnet) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Subnet.

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 VirtualMachineInstanceCountSummary added in v1.0.0

type VirtualMachineInstanceCountSummary struct {
	// REQUIRED; The count of pooled resources in each state for the given zone.
	InstanceCountsByState []*PoolResourceStateCount

	// The zone that the provided counts are in. This is null if zones are not enabled on the attached VMSS.
	Zone *int64
}

VirtualMachineInstanceCountSummary - Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. Note: any resources in the Running state may still be installing extensions / not fully provisioned.

func (VirtualMachineInstanceCountSummary) MarshalJSON added in v1.0.0

func (v VirtualMachineInstanceCountSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualMachineInstanceCountSummary.

func (*VirtualMachineInstanceCountSummary) UnmarshalJSON added in v1.0.0

func (v *VirtualMachineInstanceCountSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInstanceCountSummary.

type VirtualMachineState

type VirtualMachineState string

VirtualMachineState - State of standby virtual machines

const (
	// VirtualMachineStateDeallocated - The virtual machine has released the lease on the underlying hardware and is powered off.
	VirtualMachineStateDeallocated VirtualMachineState = "Deallocated"
	// VirtualMachineStateRunning - The virtual machine is up and running.
	VirtualMachineStateRunning VirtualMachineState = "Running"
)

func PossibleVirtualMachineStateValues

func PossibleVirtualMachineStateValues() []VirtualMachineState

PossibleVirtualMachineStateValues returns the possible values for the VirtualMachineState const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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