Documentation ¶
Index ¶
- type ActionType
- type AgentProfile
- type AgentProfileClassification
- type AgentProfileUpdate
- type AgentProfileUpdateClassification
- type AutomaticResourcePredictionsProfile
- type AutomaticResourcePredictionsProfileUpdate
- type AzureDevOpsOrganizationProfile
- type AzureDevOpsPermissionProfile
- type AzureDevOpsPermissionType
- type CachingType
- type ClientFactory
- func (c *ClientFactory) NewImageVersionsClient() *ImageVersionsClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPoolsClient() *PoolsClient
- func (c *ClientFactory) NewResourceDetailsClient() *ResourceDetailsClient
- func (c *ClientFactory) NewSKUClient() *SKUClient
- func (c *ClientFactory) NewSubscriptionUsagesClient() *SubscriptionUsagesClient
- type CreatedByType
- type DataDisk
- type DevOpsAzureSKU
- type FabricProfile
- type FabricProfileClassification
- type GitHubOrganization
- type GitHubOrganizationProfile
- type ImageVersion
- type ImageVersionListResult
- type ImageVersionProperties
- type ImageVersionsClient
- type ImageVersionsClientListByImageOptions
- type ImageVersionsClientListByImageResponse
- type LogonType
- type ManagedServiceIdentity
- type ManagedServiceIdentityType
- type ManualResourcePredictionsProfile
- type ManualResourcePredictionsProfileUpdate
- type NetworkProfile
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Organization
- type OrganizationProfile
- type OrganizationProfileClassification
- type Origin
- type OsDiskStorageAccountType
- type OsProfile
- type Pool
- type PoolImage
- type PoolListResult
- type PoolProperties
- type PoolUpdate
- type PoolUpdateProperties
- type PoolsClient
- func (client *PoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, poolName string, resource Pool, ...) (*runtime.Poller[PoolsClientCreateOrUpdateResponse], error)
- func (client *PoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, poolName string, ...) (*runtime.Poller[PoolsClientDeleteResponse], error)
- func (client *PoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, poolName string, ...) (*runtime.Poller[PoolsClientUpdateResponse], error)
- func (client *PoolsClient) Get(ctx context.Context, resourceGroupName string, poolName string, ...) (PoolsClientGetResponse, error)
- func (client *PoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *PoolsClientListByResourceGroupOptions) *runtime.Pager[PoolsClientListByResourceGroupResponse]
- func (client *PoolsClient) NewListBySubscriptionPager(options *PoolsClientListBySubscriptionOptions) *runtime.Pager[PoolsClientListBySubscriptionResponse]
- type PoolsClientBeginCreateOrUpdateOptions
- type PoolsClientBeginDeleteOptions
- type PoolsClientBeginUpdateOptions
- type PoolsClientCreateOrUpdateResponse
- type PoolsClientDeleteResponse
- type PoolsClientGetOptions
- type PoolsClientGetResponse
- type PoolsClientListByResourceGroupOptions
- type PoolsClientListByResourceGroupResponse
- type PoolsClientListBySubscriptionOptions
- type PoolsClientListBySubscriptionResponse
- type PoolsClientUpdateResponse
- type PredictionPreference
- type ProvisioningState
- type Quota
- type QuotaListResult
- type QuotaName
- type QuotaProperties
- type ResourceDetailsClient
- type ResourceDetailsClientListByPoolOptions
- type ResourceDetailsClientListByPoolResponse
- type ResourceDetailsObject
- type ResourceDetailsObjectListResult
- type ResourceDetailsObjectProperties
- type ResourcePredictionsProfile
- type ResourcePredictionsProfileClassification
- type ResourcePredictionsProfileType
- type ResourcePredictionsProfileUpdate
- type ResourcePredictionsProfileUpdateClassification
- type ResourceSKU
- type ResourceSKUCapabilities
- type ResourceSKUListResult
- type ResourceSKULocationInfo
- type ResourceSKUProperties
- type ResourceSKURestrictionInfo
- type ResourceSKURestrictions
- type ResourceSKURestrictionsReasonCode
- type ResourceSKURestrictionsType
- type ResourceSKUZoneDetails
- type ResourceStatus
- type SKUClient
- type SKUClientListByLocationOptions
- type SKUClientListByLocationResponse
- type SecretsManagementSettings
- type Stateful
- type StatefulUpdate
- type StatelessAgentProfile
- type StatelessAgentProfileUpdate
- type StorageAccountType
- type StorageProfile
- type SubscriptionUsagesClient
- type SubscriptionUsagesClientListByLocationOptions
- type SubscriptionUsagesClientListByLocationResponse
- type SystemData
- type UserAssignedIdentity
- type VmssFabricProfile
Examples ¶
- ImageVersionsClient.NewListByImagePager
- OperationsClient.NewListPager
- PoolsClient.BeginCreateOrUpdate
- PoolsClient.BeginDelete
- PoolsClient.BeginUpdate
- PoolsClient.Get
- PoolsClient.NewListByResourceGroupPager
- PoolsClient.NewListBySubscriptionPager
- ResourceDetailsClient.NewListByPoolPager
- SKUClient.NewListByLocationPager
- SubscriptionUsagesClient.NewListByLocationPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type AgentProfile ¶
type AgentProfile struct { // REQUIRED; Discriminator property for AgentProfile. Kind *string // Defines pool buffer/stand-by agents. ResourcePredictions any // Defines how the pool buffer/stand-by agents is provided. ResourcePredictionsProfile ResourcePredictionsProfileClassification }
AgentProfile - The agent profile of the machines in the pool.
func (*AgentProfile) GetAgentProfile ¶
func (a *AgentProfile) GetAgentProfile() *AgentProfile
GetAgentProfile implements the AgentProfileClassification interface for type AgentProfile.
func (AgentProfile) MarshalJSON ¶
func (a AgentProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentProfile.
func (*AgentProfile) UnmarshalJSON ¶
func (a *AgentProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentProfile.
type AgentProfileClassification ¶
type AgentProfileClassification interface { // GetAgentProfile returns the AgentProfile content of the underlying type. GetAgentProfile() *AgentProfile }
AgentProfileClassification provides polymorphic access to related types. Call the interface's GetAgentProfile() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AgentProfile, *Stateful, *StatelessAgentProfile
type AgentProfileUpdate ¶
type AgentProfileUpdate struct { // REQUIRED; Discriminator property for AgentProfile. Kind *string // Defines pool buffer/stand-by agents. ResourcePredictions any // Defines how the pool buffer/stand-by agents is provided. ResourcePredictionsProfile ResourcePredictionsProfileUpdateClassification }
AgentProfileUpdate - The agent profile of the machines in the pool.
func (*AgentProfileUpdate) GetAgentProfileUpdate ¶
func (a *AgentProfileUpdate) GetAgentProfileUpdate() *AgentProfileUpdate
GetAgentProfileUpdate implements the AgentProfileUpdateClassification interface for type AgentProfileUpdate.
func (AgentProfileUpdate) MarshalJSON ¶
func (a AgentProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentProfileUpdate.
func (*AgentProfileUpdate) UnmarshalJSON ¶
func (a *AgentProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentProfileUpdate.
type AgentProfileUpdateClassification ¶
type AgentProfileUpdateClassification interface { // GetAgentProfileUpdate returns the AgentProfileUpdate content of the underlying type. GetAgentProfileUpdate() *AgentProfileUpdate }
AgentProfileUpdateClassification provides polymorphic access to related types. Call the interface's GetAgentProfileUpdate() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AgentProfileUpdate, *StatefulUpdate, *StatelessAgentProfileUpdate
type AutomaticResourcePredictionsProfile ¶
type AutomaticResourcePredictionsProfile struct { // REQUIRED; Determines how the stand-by scheme should be provided. Kind *ResourcePredictionsProfileType // Determines the balance between cost and performance. PredictionPreference *PredictionPreference }
AutomaticResourcePredictionsProfile - The stand-by agent scheme is determined based on historical demand.
func (*AutomaticResourcePredictionsProfile) GetResourcePredictionsProfile ¶
func (a *AutomaticResourcePredictionsProfile) GetResourcePredictionsProfile() *ResourcePredictionsProfile
GetResourcePredictionsProfile implements the ResourcePredictionsProfileClassification interface for type AutomaticResourcePredictionsProfile.
func (AutomaticResourcePredictionsProfile) MarshalJSON ¶
func (a AutomaticResourcePredictionsProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutomaticResourcePredictionsProfile.
func (*AutomaticResourcePredictionsProfile) UnmarshalJSON ¶
func (a *AutomaticResourcePredictionsProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticResourcePredictionsProfile.
type AutomaticResourcePredictionsProfileUpdate ¶
type AutomaticResourcePredictionsProfileUpdate struct { // REQUIRED; Determines how the stand-by scheme should be provided. Kind *ResourcePredictionsProfileType // Determines the balance between cost and performance. PredictionPreference *PredictionPreference }
AutomaticResourcePredictionsProfileUpdate - The stand-by agent scheme is determined based on historical demand.
func (*AutomaticResourcePredictionsProfileUpdate) GetResourcePredictionsProfileUpdate ¶
func (a *AutomaticResourcePredictionsProfileUpdate) GetResourcePredictionsProfileUpdate() *ResourcePredictionsProfileUpdate
GetResourcePredictionsProfileUpdate implements the ResourcePredictionsProfileUpdateClassification interface for type AutomaticResourcePredictionsProfileUpdate.
func (AutomaticResourcePredictionsProfileUpdate) MarshalJSON ¶
func (a AutomaticResourcePredictionsProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutomaticResourcePredictionsProfileUpdate.
func (*AutomaticResourcePredictionsProfileUpdate) UnmarshalJSON ¶
func (a *AutomaticResourcePredictionsProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticResourcePredictionsProfileUpdate.
type AzureDevOpsOrganizationProfile ¶
type AzureDevOpsOrganizationProfile struct { // REQUIRED; Discriminator property for OrganizationProfile. Kind *string // REQUIRED; The list of Azure DevOps organizations the pool should be present in. Organizations []*Organization // The type of permission which determines which accounts are admins on the Azure DevOps pool. PermissionProfile *AzureDevOpsPermissionProfile }
AzureDevOpsOrganizationProfile - Azure DevOps organization profile
func (*AzureDevOpsOrganizationProfile) GetOrganizationProfile ¶
func (a *AzureDevOpsOrganizationProfile) GetOrganizationProfile() *OrganizationProfile
GetOrganizationProfile implements the OrganizationProfileClassification interface for type AzureDevOpsOrganizationProfile.
func (AzureDevOpsOrganizationProfile) MarshalJSON ¶
func (a AzureDevOpsOrganizationProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsOrganizationProfile.
func (*AzureDevOpsOrganizationProfile) UnmarshalJSON ¶
func (a *AzureDevOpsOrganizationProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsOrganizationProfile.
type AzureDevOpsPermissionProfile ¶
type AzureDevOpsPermissionProfile struct { // REQUIRED; Determines who has admin permissions to the Azure DevOps pool. Kind *AzureDevOpsPermissionType // Group email addresses Groups []*string // User email addresses Users []*string }
AzureDevOpsPermissionProfile - Defines the type of Azure DevOps pool permission.
func (AzureDevOpsPermissionProfile) MarshalJSON ¶
func (a AzureDevOpsPermissionProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureDevOpsPermissionProfile.
func (*AzureDevOpsPermissionProfile) UnmarshalJSON ¶
func (a *AzureDevOpsPermissionProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureDevOpsPermissionProfile.
type AzureDevOpsPermissionType ¶
type AzureDevOpsPermissionType string
AzureDevOpsPermissionType - Determines who has admin permissions to the Azure DevOps pool.
const ( // AzureDevOpsPermissionTypeCreatorOnly - Only the pool creator will be an admin of the pool. AzureDevOpsPermissionTypeCreatorOnly AzureDevOpsPermissionType = "CreatorOnly" // AzureDevOpsPermissionTypeInherit - Pool will inherit permissions from the project or organization. AzureDevOpsPermissionTypeInherit AzureDevOpsPermissionType = "Inherit" // AzureDevOpsPermissionTypeSpecificAccounts - Only the specified accounts will be admins of the pool. AzureDevOpsPermissionTypeSpecificAccounts AzureDevOpsPermissionType = "SpecificAccounts" )
func PossibleAzureDevOpsPermissionTypeValues ¶
func PossibleAzureDevOpsPermissionTypeValues() []AzureDevOpsPermissionType
PossibleAzureDevOpsPermissionTypeValues returns the possible values for the AzureDevOpsPermissionType const type.
type CachingType ¶
type CachingType string
CachingType - The type of caching in a data disk.
const ( // CachingTypeNone - Don't use host caching. CachingTypeNone CachingType = "None" // CachingTypeReadOnly - For workloads that only do read operations. CachingTypeReadOnly CachingType = "ReadOnly" // CachingTypeReadWrite - For workloads that do a balance of read and write operations. CachingTypeReadWrite CachingType = "ReadWrite" )
func PossibleCachingTypeValues ¶
func PossibleCachingTypeValues() []CachingType
PossibleCachingTypeValues returns the possible values for the CachingType 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) NewImageVersionsClient ¶
func (c *ClientFactory) NewImageVersionsClient() *ImageVersionsClient
NewImageVersionsClient creates a new instance of ImageVersionsClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPoolsClient ¶
func (c *ClientFactory) NewPoolsClient() *PoolsClient
NewPoolsClient creates a new instance of PoolsClient.
func (*ClientFactory) NewResourceDetailsClient ¶
func (c *ClientFactory) NewResourceDetailsClient() *ResourceDetailsClient
NewResourceDetailsClient creates a new instance of ResourceDetailsClient.
func (*ClientFactory) NewSKUClient ¶
func (c *ClientFactory) NewSKUClient() *SKUClient
NewSKUClient creates a new instance of SKUClient.
func (*ClientFactory) NewSubscriptionUsagesClient ¶
func (c *ClientFactory) NewSubscriptionUsagesClient() *SubscriptionUsagesClient
NewSubscriptionUsagesClient creates a new instance of SubscriptionUsagesClient.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DataDisk ¶
type DataDisk struct { // The type of caching to be enabled for the data disks. The default value for caching is readwrite. For information about // the caching options see: // https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Caching *CachingType // The initial disk size in gigabytes. DiskSizeGiB *int32 // The drive letter for the empty data disk. If not specified, it will be the first available letter. DriveLetter *string // The storage Account type to be used for the data disk. If omitted, the default is "standard_lrs". StorageAccountType *StorageAccountType }
DataDisk - The data disk of the VMSS.
func (DataDisk) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type DataDisk.
func (*DataDisk) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type DataDisk.
type DevOpsAzureSKU ¶
type DevOpsAzureSKU struct { // REQUIRED; The Azure SKU name of the machines in the pool. Name *string }
DevOpsAzureSKU - The Azure SKU of the machines in the pool.
func (DevOpsAzureSKU) MarshalJSON ¶
func (d DevOpsAzureSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DevOpsAzureSKU.
func (*DevOpsAzureSKU) UnmarshalJSON ¶
func (d *DevOpsAzureSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DevOpsAzureSKU.
type FabricProfile ¶
type FabricProfile struct { // REQUIRED; Discriminator property for FabricProfile. Kind *string }
FabricProfile - Defines the type of fabric the agent will run on.
func (*FabricProfile) GetFabricProfile ¶
func (f *FabricProfile) GetFabricProfile() *FabricProfile
GetFabricProfile implements the FabricProfileClassification interface for type FabricProfile.
func (FabricProfile) MarshalJSON ¶
func (f FabricProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FabricProfile.
func (*FabricProfile) UnmarshalJSON ¶
func (f *FabricProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FabricProfile.
type FabricProfileClassification ¶
type FabricProfileClassification interface { // GetFabricProfile returns the FabricProfile content of the underlying type. GetFabricProfile() *FabricProfile }
FabricProfileClassification provides polymorphic access to related types. Call the interface's GetFabricProfile() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *FabricProfile, *VmssFabricProfile
type GitHubOrganization ¶
type GitHubOrganization struct { // REQUIRED; The GitHub organization URL in which the pool should be created. URL *string // Optional list of repositories in which the pool should be created. Repositories []*string }
GitHubOrganization - Defines a GitHub organization
func (GitHubOrganization) MarshalJSON ¶
func (g GitHubOrganization) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOrganization.
func (*GitHubOrganization) UnmarshalJSON ¶
func (g *GitHubOrganization) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOrganization.
type GitHubOrganizationProfile ¶
type GitHubOrganizationProfile struct { // REQUIRED; Discriminator property for OrganizationProfile. Kind *string // REQUIRED; The list of GitHub organizations/repositories the pool should be present in. Organizations []*GitHubOrganization }
GitHubOrganizationProfile - GitHub organization profile
func (*GitHubOrganizationProfile) GetOrganizationProfile ¶
func (g *GitHubOrganizationProfile) GetOrganizationProfile() *OrganizationProfile
GetOrganizationProfile implements the OrganizationProfileClassification interface for type GitHubOrganizationProfile.
func (GitHubOrganizationProfile) MarshalJSON ¶
func (g GitHubOrganizationProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GitHubOrganizationProfile.
func (*GitHubOrganizationProfile) UnmarshalJSON ¶
func (g *GitHubOrganizationProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GitHubOrganizationProfile.
type ImageVersion ¶
type ImageVersion struct { // The resource-specific properties for this resource. Properties *ImageVersionProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ImageVersion - An image version object
func (ImageVersion) MarshalJSON ¶
func (i ImageVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageVersion.
func (*ImageVersion) UnmarshalJSON ¶
func (i *ImageVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageVersion.
type ImageVersionListResult ¶
type ImageVersionListResult struct { // REQUIRED; The ImageVersion items on this page Value []*ImageVersion // The link to the next page of items NextLink *string }
ImageVersionListResult - The response of a ImageVersion list operation.
func (ImageVersionListResult) MarshalJSON ¶
func (i ImageVersionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageVersionListResult.
func (*ImageVersionListResult) UnmarshalJSON ¶
func (i *ImageVersionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageVersionListResult.
type ImageVersionProperties ¶
type ImageVersionProperties struct { // REQUIRED; Version of the image. Version *string }
ImageVersionProperties - Details of the ImageVersionProperties.
func (ImageVersionProperties) MarshalJSON ¶
func (i ImageVersionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImageVersionProperties.
func (*ImageVersionProperties) UnmarshalJSON ¶
func (i *ImageVersionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImageVersionProperties.
type ImageVersionsClient ¶
type ImageVersionsClient struct {
// contains filtered or unexported fields
}
ImageVersionsClient contains the methods for the ImageVersions group. Don't use this type directly, use NewImageVersionsClient() instead.
func NewImageVersionsClient ¶
func NewImageVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ImageVersionsClient, error)
NewImageVersionsClient creates a new instance of ImageVersionsClient 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 (*ImageVersionsClient) NewListByImagePager ¶
func (client *ImageVersionsClient) NewListByImagePager(resourceGroupName string, imageName string, options *ImageVersionsClientListByImageOptions) *runtime.Pager[ImageVersionsClientListByImageResponse]
NewListByImagePager - List ImageVersion resources by Image
Generated from API version 2024-04-04-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- imageName - Name of the image.
- options - ImageVersionsClientListByImageOptions contains the optional parameters for the ImageVersionsClient.NewListByImagePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ImageVersions_ListByImage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewImageVersionsClient().NewListByImagePager("my-resource-group", "windows-2022", 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.ImageVersionListResult = armdevopsinfrastructure.ImageVersionListResult{ // Value: []*armdevopsinfrastructure.ImageVersion{ // { // Name: to.Ptr("2024.0417.0"), // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/my-resource-group/providers/Microsoft.DevOpsInfrastructure/images/windows-2022/versions/2024.0417.0"), // }, // { // Name: to.Ptr("2024.0417.1"), // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/my-resource-group/providers/Microsoft.DevOpsInfrastructure/images/windows-2022/versions/2024.0417.1"), // }}, // } } }
Output:
type ImageVersionsClientListByImageOptions ¶
type ImageVersionsClientListByImageOptions struct { }
ImageVersionsClientListByImageOptions contains the optional parameters for the ImageVersionsClient.NewListByImagePager method.
type ImageVersionsClientListByImageResponse ¶
type ImageVersionsClientListByImageResponse struct { // The response of a ImageVersion list operation. ImageVersionListResult }
ImageVersionsClientListByImageResponse contains the response from method ImageVersionsClient.NewListByImagePager.
type LogonType ¶
type LogonType string
LogonType - Determines how the service should be run.
func PossibleLogonTypeValues ¶
func PossibleLogonTypeValues() []LogonType
PossibleLogonTypeValues returns the possible values for the LogonType const type.
type ManagedServiceIdentity ¶
type ManagedServiceIdentity struct { // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Type *ManagedServiceIdentityType // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM // resource ids in the form: // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. // The dictionary values can be empty objects ({}) in // requests. UserAssignedIdentities map[string]*UserAssignedIdentity // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned // identity. PrincipalID *string // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. TenantID *string }
ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)
func (ManagedServiceIdentity) MarshalJSON ¶
func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.
func (*ManagedServiceIdentity) UnmarshalJSON ¶
func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.
type ManagedServiceIdentityType ¶
type ManagedServiceIdentityType string
ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
const ( ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" )
func PossibleManagedServiceIdentityTypeValues ¶
func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType
PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.
type ManualResourcePredictionsProfile ¶
type ManualResourcePredictionsProfile struct { // REQUIRED; Determines how the stand-by scheme should be provided. Kind *ResourcePredictionsProfileType }
ManualResourcePredictionsProfile - Customer provides the stand-by agent scheme.
func (*ManualResourcePredictionsProfile) GetResourcePredictionsProfile ¶
func (m *ManualResourcePredictionsProfile) GetResourcePredictionsProfile() *ResourcePredictionsProfile
GetResourcePredictionsProfile implements the ResourcePredictionsProfileClassification interface for type ManualResourcePredictionsProfile.
func (ManualResourcePredictionsProfile) MarshalJSON ¶
func (m ManualResourcePredictionsProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManualResourcePredictionsProfile.
func (*ManualResourcePredictionsProfile) UnmarshalJSON ¶
func (m *ManualResourcePredictionsProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManualResourcePredictionsProfile.
type ManualResourcePredictionsProfileUpdate ¶
type ManualResourcePredictionsProfileUpdate struct { // REQUIRED; Determines how the stand-by scheme should be provided. Kind *ResourcePredictionsProfileType }
ManualResourcePredictionsProfileUpdate - Customer provides the stand-by agent scheme.
func (*ManualResourcePredictionsProfileUpdate) GetResourcePredictionsProfileUpdate ¶
func (m *ManualResourcePredictionsProfileUpdate) GetResourcePredictionsProfileUpdate() *ResourcePredictionsProfileUpdate
GetResourcePredictionsProfileUpdate implements the ResourcePredictionsProfileUpdateClassification interface for type ManualResourcePredictionsProfileUpdate.
func (ManualResourcePredictionsProfileUpdate) MarshalJSON ¶
func (m ManualResourcePredictionsProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManualResourcePredictionsProfileUpdate.
func (*ManualResourcePredictionsProfileUpdate) UnmarshalJSON ¶
func (m *ManualResourcePredictionsProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManualResourcePredictionsProfileUpdate.
type NetworkProfile ¶
type NetworkProfile struct { // REQUIRED; The subnet id on which to put all machines created in the pool. SubnetID *string }
NetworkProfile - The network profile of the machines in the pool.
func (NetworkProfile) MarshalJSON ¶
func (n NetworkProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkProfile.
func (*NetworkProfile) UnmarshalJSON ¶
func (n *NetworkProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List the operations for the provider
Generated from API version 2024-04-04-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armdevopsinfrastructure.OperationListResult{ // } } }
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 Organization ¶
type Organization struct { // REQUIRED; The Azure DevOps organization URL in which the pool should be created. URL *string // How many machines can be created at maximum in this organization out of the maximumConcurrency of the pool. Parallelism *int32 // Optional list of projects in which the pool should be created. Projects []*string }
Organization - Defines an Azure DevOps organization.
func (Organization) MarshalJSON ¶
func (o Organization) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Organization.
func (*Organization) UnmarshalJSON ¶
func (o *Organization) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Organization.
type OrganizationProfile ¶
type OrganizationProfile struct { // REQUIRED; Discriminator property for OrganizationProfile. Kind *string }
OrganizationProfile - Defines the organization in which the pool will be used.
func (*OrganizationProfile) GetOrganizationProfile ¶
func (o *OrganizationProfile) GetOrganizationProfile() *OrganizationProfile
GetOrganizationProfile implements the OrganizationProfileClassification interface for type OrganizationProfile.
func (OrganizationProfile) MarshalJSON ¶
func (o OrganizationProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OrganizationProfile.
func (*OrganizationProfile) UnmarshalJSON ¶
func (o *OrganizationProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OrganizationProfile.
type OrganizationProfileClassification ¶
type OrganizationProfileClassification interface { // GetOrganizationProfile returns the OrganizationProfile content of the underlying type. GetOrganizationProfile() *OrganizationProfile }
OrganizationProfileClassification provides polymorphic access to related types. Call the interface's GetOrganizationProfile() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AzureDevOpsOrganizationProfile, *GitHubOrganizationProfile, *OrganizationProfile
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"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type OsDiskStorageAccountType ¶
type OsDiskStorageAccountType string
OsDiskStorageAccountType - The storage account type of the OS disk.
const ( // OsDiskStorageAccountTypePremium - Premium OS disk type. OsDiskStorageAccountTypePremium OsDiskStorageAccountType = "Premium" // OsDiskStorageAccountTypeStandard - Standard OS disk type. OsDiskStorageAccountTypeStandard OsDiskStorageAccountType = "Standard" // OsDiskStorageAccountTypeStandardSSD - Standard SSD OS disk type. OsDiskStorageAccountTypeStandardSSD OsDiskStorageAccountType = "StandardSSD" )
func PossibleOsDiskStorageAccountTypeValues ¶
func PossibleOsDiskStorageAccountTypeValues() []OsDiskStorageAccountType
PossibleOsDiskStorageAccountTypeValues returns the possible values for the OsDiskStorageAccountType const type.
type OsProfile ¶
type OsProfile struct { // Determines how the service should be run. By default, this will be set to Service. LogonType *LogonType // The secret management settings of the machines in the pool. SecretsManagementSettings *SecretsManagementSettings }
OsProfile - The OS profile of the machines in the pool.
func (OsProfile) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type OsProfile.
func (*OsProfile) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type OsProfile.
type Pool ¶
type Pool struct { // REQUIRED; The geo-location where the resource lives Location *string // The managed service identities assigned to this resource. Identity *ManagedServiceIdentity // The resource-specific properties for this resource. Properties *PoolProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Pool - Concrete tracked resource types can be created by aliasing this type using a specific property type.
func (Pool) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Pool.
func (*Pool) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Pool.
type PoolImage ¶
type PoolImage struct { // List of aliases to reference the image by. Aliases []*string // The percentage of the buffer to be allocated to this image. Buffer *string // The resource id of the image. ResourceID *string // The image to use from a well-known set of images made available to customers. WellKnownImageName *string }
PoolImage - The VM image of the machines in the pool.
func (PoolImage) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type PoolImage.
func (*PoolImage) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type PoolImage.
type PoolListResult ¶
type PoolListResult struct { // REQUIRED; The Pool items on this page Value []*Pool // The link to the next page of items NextLink *string }
PoolListResult - The response of a Pool list operation.
func (PoolListResult) MarshalJSON ¶
func (p PoolListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PoolListResult.
func (*PoolListResult) UnmarshalJSON ¶
func (p *PoolListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PoolListResult.
type PoolProperties ¶
type PoolProperties struct { // REQUIRED; Defines how the machine will be handled once it executed a job. AgentProfile AgentProfileClassification // REQUIRED; The resource id of the DevCenter Project the pool belongs to. DevCenterProjectResourceID *string // REQUIRED; Defines the type of fabric the agent will run on. FabricProfile FabricProfileClassification // REQUIRED; Defines how many resources can there be created at any given time. MaximumConcurrency *int32 // REQUIRED; Defines the organization in which the pool will be used. OrganizationProfile OrganizationProfileClassification // The status of the current operation. ProvisioningState *ProvisioningState }
PoolProperties - Pool properties
func (PoolProperties) MarshalJSON ¶
func (p PoolProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PoolProperties.
func (*PoolProperties) UnmarshalJSON ¶
func (p *PoolProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PoolProperties.
type PoolUpdate ¶
type PoolUpdate struct { // The managed service identities assigned to this resource. Identity *ManagedServiceIdentity // The updatable properties of the Pool. Properties *PoolUpdateProperties // Resource tags. Tags map[string]*string }
PoolUpdate - The type used for update operations of the Pool.
func (PoolUpdate) MarshalJSON ¶
func (p PoolUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PoolUpdate.
func (*PoolUpdate) UnmarshalJSON ¶
func (p *PoolUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PoolUpdate.
type PoolUpdateProperties ¶
type PoolUpdateProperties struct { // Defines how the machine will be handled once it executed a job. AgentProfile AgentProfileUpdateClassification // The resource id of the DevCenter Project the pool belongs to. DevCenterProjectResourceID *string // Defines the type of fabric the agent will run on. FabricProfile FabricProfileClassification // Defines how many resources can there be created at any given time. MaximumConcurrency *int32 // Defines the organization in which the pool will be used. OrganizationProfile OrganizationProfileClassification // The status of the current operation. ProvisioningState *ProvisioningState }
PoolUpdateProperties - The updatable properties of the Pool.
func (PoolUpdateProperties) MarshalJSON ¶
func (p PoolUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PoolUpdateProperties.
func (*PoolUpdateProperties) UnmarshalJSON ¶
func (p *PoolUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PoolUpdateProperties.
type PoolsClient ¶
type PoolsClient struct {
// contains filtered or unexported fields
}
PoolsClient contains the methods for the Pools group. Don't use this type directly, use NewPoolsClient() instead.
func NewPoolsClient ¶
func NewPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoolsClient, error)
NewPoolsClient creates a new instance of PoolsClient 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 (*PoolsClient) BeginCreateOrUpdate ¶
func (client *PoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, poolName string, resource Pool, options *PoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PoolsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a Pool If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-04-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- poolName - Name of the pool. It needs to be globally unique.
- resource - Resource create parameters.
- options - PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/CreateOrUpdatePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPoolsClient().BeginCreateOrUpdate(ctx, "rg", "pool", armdevopsinfrastructure.Pool{ Location: to.Ptr("eastus"), Properties: &armdevopsinfrastructure.PoolProperties{ AgentProfile: &armdevopsinfrastructure.StatelessAgentProfile{ Kind: to.Ptr("Stateless"), }, DevCenterProjectResourceID: to.Ptr("/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES"), FabricProfile: &armdevopsinfrastructure.VmssFabricProfile{ Kind: to.Ptr("Vmss"), Images: []*armdevopsinfrastructure.PoolImage{ { ResourceID: to.Ptr("/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest"), }}, SKU: &armdevopsinfrastructure.DevOpsAzureSKU{ Name: to.Ptr("Standard_D4ads_v5"), }, }, MaximumConcurrency: to.Ptr[int32](10), OrganizationProfile: &armdevopsinfrastructure.AzureDevOpsOrganizationProfile{ Kind: to.Ptr("AzureDevOps"), Organizations: []*armdevopsinfrastructure.Organization{ { URL: to.Ptr("https://mseng.visualstudio.com"), }}, }, ProvisioningState: to.Ptr(armdevopsinfrastructure.ProvisioningStateSucceeded), }, }, 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.Pool = armdevopsinfrastructure.Pool{ // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/rg/providers/Microsoft.DevOpsInfrastructure/Pools/pool"), // Location: to.Ptr("eastus"), // Properties: &armdevopsinfrastructure.PoolProperties{ // AgentProfile: &armdevopsinfrastructure.StatelessAgentProfile{ // Kind: to.Ptr("Stateless"), // }, // DevCenterProjectResourceID: to.Ptr("/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES"), // FabricProfile: &armdevopsinfrastructure.VmssFabricProfile{ // Kind: to.Ptr("Vmss"), // Images: []*armdevopsinfrastructure.PoolImage{ // { // ResourceID: to.Ptr("/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest"), // }}, // SKU: &armdevopsinfrastructure.DevOpsAzureSKU{ // Name: to.Ptr("Standard_D4ads_v5"), // }, // }, // MaximumConcurrency: to.Ptr[int32](10), // OrganizationProfile: &armdevopsinfrastructure.AzureDevOpsOrganizationProfile{ // Kind: to.Ptr("AzureDevOps"), // Organizations: []*armdevopsinfrastructure.Organization{ // { // URL: to.Ptr("https://mseng.visualstudio.com"), // }}, // }, // ProvisioningState: to.Ptr(armdevopsinfrastructure.ProvisioningStateSucceeded), // }, // } }
Output:
func (*PoolsClient) BeginDelete ¶
func (client *PoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, poolName string, options *PoolsClientBeginDeleteOptions) (*runtime.Poller[PoolsClientDeleteResponse], error)
BeginDelete - Delete a Pool If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-04-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- poolName - Name of the pool. It needs to be globally unique.
- options - PoolsClientBeginDeleteOptions contains the optional parameters for the PoolsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/DeletePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPoolsClient().BeginDelete(ctx, "rg", "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 (*PoolsClient) BeginUpdate ¶
func (client *PoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, poolName string, properties PoolUpdate, options *PoolsClientBeginUpdateOptions) (*runtime.Poller[PoolsClientUpdateResponse], error)
BeginUpdate - Update a Pool If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-04-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- poolName - Name of the pool. It needs to be globally unique.
- properties - The resource properties to be updated.
- options - PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/UpdatePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPoolsClient().BeginUpdate(ctx, "rg", "pool", armdevopsinfrastructure.PoolUpdate{}, 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.Pool = armdevopsinfrastructure.Pool{ // Location: to.Ptr("eastus"), // } }
Output:
func (*PoolsClient) Get ¶
func (client *PoolsClient) Get(ctx context.Context, resourceGroupName string, poolName string, options *PoolsClientGetOptions) (PoolsClientGetResponse, error)
Get - Get a Pool If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2024-04-04-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- poolName - Name of the pool. It needs to be globally unique.
- options - PoolsClientGetOptions contains the optional parameters for the PoolsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/GetPool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPoolsClient().Get(ctx, "rg", "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.Pool = armdevopsinfrastructure.Pool{ // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/rg/providers/Microsoft.DevOpsInfrastructure/Pools/pool"), // Location: to.Ptr("eastus"), // Properties: &armdevopsinfrastructure.PoolProperties{ // AgentProfile: &armdevopsinfrastructure.StatelessAgentProfile{ // Kind: to.Ptr("Stateless"), // }, // DevCenterProjectResourceID: to.Ptr("/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES"), // FabricProfile: &armdevopsinfrastructure.VmssFabricProfile{ // Kind: to.Ptr("Vmss"), // Images: []*armdevopsinfrastructure.PoolImage{ // { // ResourceID: to.Ptr("/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest"), // }}, // SKU: &armdevopsinfrastructure.DevOpsAzureSKU{ // Name: to.Ptr("Standard_D4ads_v5"), // }, // }, // MaximumConcurrency: to.Ptr[int32](10), // OrganizationProfile: &armdevopsinfrastructure.AzureDevOpsOrganizationProfile{ // Kind: to.Ptr("AzureDevOps"), // Organizations: []*armdevopsinfrastructure.Organization{ // { // URL: to.Ptr("https://mseng.visualstudio.com"), // }}, // }, // ProvisioningState: to.Ptr(armdevopsinfrastructure.ProvisioningStateSucceeded), // }, // } }
Output:
func (*PoolsClient) NewListByResourceGroupPager ¶
func (client *PoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *PoolsClientListByResourceGroupOptions) *runtime.Pager[PoolsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List Pool resources by resource group
Generated from API version 2024-04-04-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - PoolsClientListByResourceGroupOptions contains the optional parameters for the PoolsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ListPoolsBySubscriptionAndResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPoolsClient().NewListByResourceGroupPager("rg", 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.PoolListResult = armdevopsinfrastructure.PoolListResult{ // Value: []*armdevopsinfrastructure.Pool{ // { // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/rg/providers/Microsoft.DevOpsInfrastructure/Pools/pool"), // Location: to.Ptr("eastus"), // }}, // } } }
Output:
func (*PoolsClient) NewListBySubscriptionPager ¶
func (client *PoolsClient) NewListBySubscriptionPager(options *PoolsClientListBySubscriptionOptions) *runtime.Pager[PoolsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List Pool resources by subscription ID
Generated from API version 2024-04-04-preview
- options - PoolsClientListBySubscriptionOptions contains the optional parameters for the PoolsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ListPoolsBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPoolsClient().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.PoolListResult = armdevopsinfrastructure.PoolListResult{ // Value: []*armdevopsinfrastructure.Pool{ // { // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/aoiresourceGroupName/providers/Microsoft.DevOpsInfrastructure/Pools/pool"), // Location: to.Ptr("eastus"), // }}, // } } }
Output:
type PoolsClientBeginCreateOrUpdateOptions ¶
type PoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the PoolsClient.BeginCreateOrUpdate method.
type PoolsClientBeginDeleteOptions ¶
type PoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PoolsClientBeginDeleteOptions contains the optional parameters for the PoolsClient.BeginDelete method.
type PoolsClientBeginUpdateOptions ¶
type PoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PoolsClientBeginUpdateOptions contains the optional parameters for the PoolsClient.BeginUpdate method.
type PoolsClientCreateOrUpdateResponse ¶
type PoolsClientCreateOrUpdateResponse struct { // Concrete tracked resource types can be created by aliasing this type using a specific property type. Pool }
PoolsClientCreateOrUpdateResponse contains the response from method PoolsClient.BeginCreateOrUpdate.
type PoolsClientDeleteResponse ¶
type PoolsClientDeleteResponse struct { }
PoolsClientDeleteResponse contains the response from method PoolsClient.BeginDelete.
type PoolsClientGetOptions ¶
type PoolsClientGetOptions struct { }
PoolsClientGetOptions contains the optional parameters for the PoolsClient.Get method.
type PoolsClientGetResponse ¶
type PoolsClientGetResponse struct { // Concrete tracked resource types can be created by aliasing this type using a specific property type. Pool }
PoolsClientGetResponse contains the response from method PoolsClient.Get.
type PoolsClientListByResourceGroupOptions ¶
type PoolsClientListByResourceGroupOptions struct { }
PoolsClientListByResourceGroupOptions contains the optional parameters for the PoolsClient.NewListByResourceGroupPager method.
type PoolsClientListByResourceGroupResponse ¶
type PoolsClientListByResourceGroupResponse struct { // The response of a Pool list operation. PoolListResult }
PoolsClientListByResourceGroupResponse contains the response from method PoolsClient.NewListByResourceGroupPager.
type PoolsClientListBySubscriptionOptions ¶
type PoolsClientListBySubscriptionOptions struct { }
PoolsClientListBySubscriptionOptions contains the optional parameters for the PoolsClient.NewListBySubscriptionPager method.
type PoolsClientListBySubscriptionResponse ¶
type PoolsClientListBySubscriptionResponse struct { // The response of a Pool list operation. PoolListResult }
PoolsClientListBySubscriptionResponse contains the response from method PoolsClient.NewListBySubscriptionPager.
type PoolsClientUpdateResponse ¶
type PoolsClientUpdateResponse struct { // Concrete tracked resource types can be created by aliasing this type using a specific property type. Pool }
PoolsClientUpdateResponse contains the response from method PoolsClient.BeginUpdate.
type PredictionPreference ¶
type PredictionPreference string
PredictionPreference - Determines the balance between cost and performance.
const ( // PredictionPreferenceBalanced - Balance between cost and performance. PredictionPreferenceBalanced PredictionPreference = "Balanced" // PredictionPreferenceBestPerformance - Optimizes for performance over cost. PredictionPreferenceBestPerformance PredictionPreference = "BestPerformance" // PredictionPreferenceMoreCostEffective - Halfway through cost and balanced. PredictionPreferenceMoreCostEffective PredictionPreference = "MoreCostEffective" // PredictionPreferenceMorePerformance - Halfway through balanced and performance. PredictionPreferenceMorePerformance PredictionPreference = "MorePerformance" // PredictionPreferenceMostCostEffective - Optimizes for cost over performance. PredictionPreferenceMostCostEffective PredictionPreference = "MostCostEffective" )
func PossiblePredictionPreferenceValues ¶
func PossiblePredictionPreferenceValues() []PredictionPreference
PossiblePredictionPreferenceValues returns the possible values for the PredictionPreference const type.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The status of the current operation.
const ( // ProvisioningStateAccepted - Represents an accepted operation. ProvisioningStateAccepted ProvisioningState = "Accepted" // ProvisioningStateCanceled - Represents a canceled operation. ProvisioningStateCanceled ProvisioningState = "Canceled" // ProvisioningStateDeleting - Represents an operation under deletion. ProvisioningStateDeleting ProvisioningState = "Deleting" // ProvisioningStateFailed - Represents a failed operation. ProvisioningStateFailed ProvisioningState = "Failed" // ProvisioningStateProvisioning - Represents a pending operation. ProvisioningStateProvisioning ProvisioningState = "Provisioning" // ProvisioningStateSucceeded - Represents a succeeded operation. ProvisioningStateSucceeded ProvisioningState = "Succeeded" // ProvisioningStateUpdating - Represents a pending operation. ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type Quota ¶
type Quota struct { // The resource-specific properties for this resource. Properties *QuotaProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Quota - Describes Resource Quota
func (Quota) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Quota.
func (*Quota) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Quota.
type QuotaListResult ¶
type QuotaListResult struct { // REQUIRED; The Quota items on this page Value []*Quota // The link to the next page of items NextLink *string }
QuotaListResult - The response of a Quota list operation.
func (QuotaListResult) MarshalJSON ¶
func (q QuotaListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QuotaListResult.
func (*QuotaListResult) UnmarshalJSON ¶
func (q *QuotaListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaListResult.
type QuotaName ¶
type QuotaName struct { // The localized name of the resource. LocalizedValue *string // The name of the resource. Value *string }
QuotaName - The Quota Names
func (QuotaName) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type QuotaName.
func (*QuotaName) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaName.
type QuotaProperties ¶
type QuotaProperties struct { // REQUIRED; The current usage of the resource. CurrentValue *int64 // REQUIRED; The maximum permitted usage of the resource. Limit *int64 // REQUIRED; The details of the quota. Name *QuotaName // REQUIRED; The unit of usage measurement. Unit *string }
QuotaProperties - Describes Resource Quota properties
func (QuotaProperties) MarshalJSON ¶
func (q QuotaProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QuotaProperties.
func (*QuotaProperties) UnmarshalJSON ¶
func (q *QuotaProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QuotaProperties.
type ResourceDetailsClient ¶
type ResourceDetailsClient struct {
// contains filtered or unexported fields
}
ResourceDetailsClient contains the methods for the ResourceDetails group. Don't use this type directly, use NewResourceDetailsClient() instead.
func NewResourceDetailsClient ¶
func NewResourceDetailsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceDetailsClient, error)
NewResourceDetailsClient creates a new instance of ResourceDetailsClient 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 (*ResourceDetailsClient) NewListByPoolPager ¶
func (client *ResourceDetailsClient) NewListByPoolPager(resourceGroupName string, poolName string, options *ResourceDetailsClientListByPoolOptions) *runtime.Pager[ResourceDetailsClientListByPoolResponse]
NewListByPoolPager - List ResourceDetailsObject resources by Pool
Generated from API version 2024-04-04-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- poolName - Name of the pool. It needs to be globally unique.
- options - ResourceDetailsClientListByPoolOptions contains the optional parameters for the ResourceDetailsClient.NewListByPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ResourceDetails_ListByPool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewResourceDetailsClient().NewListByPoolPager("my-resource-group", "my-dev-ops-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.ResourceDetailsObjectListResult = armdevopsinfrastructure.ResourceDetailsObjectListResult{ // Value: []*armdevopsinfrastructure.ResourceDetailsObject{ // { // Name: to.Ptr("dd8cc705c000000"), // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/my-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/my-devops-pool/resources/my-dev-ops-pool:04dcde21-626e-5a7e-8659-ce12f9284b29:dd8cc705c_0"), // Properties: &armdevopsinfrastructure.ResourceDetailsObjectProperties{ // Image: to.Ptr("my-image"), // ImageVersion: to.Ptr("4.0.0"), // Status: to.Ptr(armdevopsinfrastructure.ResourceStatusReady), // }, // }, // { // Name: to.Ptr("dd8cc705c000001"), // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/resourceGroups/my-resource-group/providers/Microsoft.DevOpsInfrastructure/pools/my-devops-pool/resources/my-dev-ops-pool:04dcde21-626e-5a7e-8659-ce12f9284b29:dd8cc705c_1"), // Properties: &armdevopsinfrastructure.ResourceDetailsObjectProperties{ // Image: to.Ptr("my-image"), // ImageVersion: to.Ptr("4.0.0"), // Status: to.Ptr(armdevopsinfrastructure.ResourceStatusAllocated), // }, // }}, // } } }
Output:
type ResourceDetailsClientListByPoolOptions ¶
type ResourceDetailsClientListByPoolOptions struct { }
ResourceDetailsClientListByPoolOptions contains the optional parameters for the ResourceDetailsClient.NewListByPoolPager method.
type ResourceDetailsClientListByPoolResponse ¶
type ResourceDetailsClientListByPoolResponse struct { // The response of a ResourceDetailsObject list operation. ResourceDetailsObjectListResult }
ResourceDetailsClientListByPoolResponse contains the response from method ResourceDetailsClient.NewListByPoolPager.
type ResourceDetailsObject ¶
type ResourceDetailsObject struct { // The resource-specific properties for this resource. Properties *ResourceDetailsObjectProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ResourceDetailsObject - A ResourceDetailsObject
func (ResourceDetailsObject) MarshalJSON ¶
func (r ResourceDetailsObject) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceDetailsObject.
func (*ResourceDetailsObject) UnmarshalJSON ¶
func (r *ResourceDetailsObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceDetailsObject.
type ResourceDetailsObjectListResult ¶
type ResourceDetailsObjectListResult struct { // REQUIRED; The ResourceDetailsObject items on this page Value []*ResourceDetailsObject // The link to the next page of items NextLink *string }
ResourceDetailsObjectListResult - The response of a ResourceDetailsObject list operation.
func (ResourceDetailsObjectListResult) MarshalJSON ¶
func (r ResourceDetailsObjectListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceDetailsObjectListResult.
func (*ResourceDetailsObjectListResult) UnmarshalJSON ¶
func (r *ResourceDetailsObjectListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceDetailsObjectListResult.
type ResourceDetailsObjectProperties ¶
type ResourceDetailsObjectProperties struct { // REQUIRED; The image name of the resource. Image *string // REQUIRED; The version of the image running on the resource. ImageVersion *string // REQUIRED; The status of the resource. Status *ResourceStatus }
ResourceDetailsObjectProperties - Details of the ResourceDetailsObject.
func (ResourceDetailsObjectProperties) MarshalJSON ¶
func (r ResourceDetailsObjectProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceDetailsObjectProperties.
func (*ResourceDetailsObjectProperties) UnmarshalJSON ¶
func (r *ResourceDetailsObjectProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceDetailsObjectProperties.
type ResourcePredictionsProfile ¶
type ResourcePredictionsProfile struct { // REQUIRED; Determines how the stand-by scheme should be provided. Kind *ResourcePredictionsProfileType }
ResourcePredictionsProfile - Determines how the stand-by scheme should be provided.
func (*ResourcePredictionsProfile) GetResourcePredictionsProfile ¶
func (r *ResourcePredictionsProfile) GetResourcePredictionsProfile() *ResourcePredictionsProfile
GetResourcePredictionsProfile implements the ResourcePredictionsProfileClassification interface for type ResourcePredictionsProfile.
func (ResourcePredictionsProfile) MarshalJSON ¶
func (r ResourcePredictionsProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePredictionsProfile.
func (*ResourcePredictionsProfile) UnmarshalJSON ¶
func (r *ResourcePredictionsProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePredictionsProfile.
type ResourcePredictionsProfileClassification ¶
type ResourcePredictionsProfileClassification interface { // GetResourcePredictionsProfile returns the ResourcePredictionsProfile content of the underlying type. GetResourcePredictionsProfile() *ResourcePredictionsProfile }
ResourcePredictionsProfileClassification provides polymorphic access to related types. Call the interface's GetResourcePredictionsProfile() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AutomaticResourcePredictionsProfile, *ManualResourcePredictionsProfile, *ResourcePredictionsProfile
type ResourcePredictionsProfileType ¶
type ResourcePredictionsProfileType string
ResourcePredictionsProfileType - Determines how the stand-by scheme should be provided.
const ( // ResourcePredictionsProfileTypeAutomatic - The stand-by agent scheme is determined based on historical demand. ResourcePredictionsProfileTypeAutomatic ResourcePredictionsProfileType = "Automatic" // ResourcePredictionsProfileTypeManual - Customer provides the stand-by agent scheme. ResourcePredictionsProfileTypeManual ResourcePredictionsProfileType = "Manual" )
func PossibleResourcePredictionsProfileTypeValues ¶
func PossibleResourcePredictionsProfileTypeValues() []ResourcePredictionsProfileType
PossibleResourcePredictionsProfileTypeValues returns the possible values for the ResourcePredictionsProfileType const type.
type ResourcePredictionsProfileUpdate ¶
type ResourcePredictionsProfileUpdate struct { // REQUIRED; Determines how the stand-by scheme should be provided. Kind *ResourcePredictionsProfileType }
ResourcePredictionsProfileUpdate - Determines how the stand-by scheme should be provided.
func (*ResourcePredictionsProfileUpdate) GetResourcePredictionsProfileUpdate ¶
func (r *ResourcePredictionsProfileUpdate) GetResourcePredictionsProfileUpdate() *ResourcePredictionsProfileUpdate
GetResourcePredictionsProfileUpdate implements the ResourcePredictionsProfileUpdateClassification interface for type ResourcePredictionsProfileUpdate.
func (ResourcePredictionsProfileUpdate) MarshalJSON ¶
func (r ResourcePredictionsProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePredictionsProfileUpdate.
func (*ResourcePredictionsProfileUpdate) UnmarshalJSON ¶
func (r *ResourcePredictionsProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourcePredictionsProfileUpdate.
type ResourcePredictionsProfileUpdateClassification ¶
type ResourcePredictionsProfileUpdateClassification interface { // GetResourcePredictionsProfileUpdate returns the ResourcePredictionsProfileUpdate content of the underlying type. GetResourcePredictionsProfileUpdate() *ResourcePredictionsProfileUpdate }
ResourcePredictionsProfileUpdateClassification provides polymorphic access to related types. Call the interface's GetResourcePredictionsProfileUpdate() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *AutomaticResourcePredictionsProfileUpdate, *ManualResourcePredictionsProfileUpdate, *ResourcePredictionsProfileUpdate
type ResourceSKU ¶
type ResourceSKU struct { // The resource-specific properties for this resource. Properties *ResourceSKUProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ResourceSKU - A ResourceSku
func (ResourceSKU) MarshalJSON ¶
func (r ResourceSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKU.
func (*ResourceSKU) UnmarshalJSON ¶
func (r *ResourceSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKU.
type ResourceSKUCapabilities ¶
type ResourceSKUCapabilities struct { // REQUIRED; The name of the SKU capability. Name *string // REQUIRED; The value of the SKU capability. Value *string }
ResourceSKUCapabilities - Describes The SKU capabilities object.
func (ResourceSKUCapabilities) MarshalJSON ¶
func (r ResourceSKUCapabilities) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKUCapabilities.
func (*ResourceSKUCapabilities) UnmarshalJSON ¶
func (r *ResourceSKUCapabilities) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUCapabilities.
type ResourceSKUListResult ¶
type ResourceSKUListResult struct { // REQUIRED; The ResourceSku items on this page Value []*ResourceSKU // The link to the next page of items NextLink *string }
ResourceSKUListResult - The response of a ResourceSku list operation.
func (ResourceSKUListResult) MarshalJSON ¶
func (r ResourceSKUListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKUListResult.
func (*ResourceSKUListResult) UnmarshalJSON ¶
func (r *ResourceSKUListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUListResult.
type ResourceSKULocationInfo ¶
type ResourceSKULocationInfo struct { // REQUIRED; Location of the SKU Location *string // REQUIRED; Gets details of capabilities available to a SKU in specific zones. ZoneDetails []*ResourceSKUZoneDetails // REQUIRED; List of availability zones where the SKU is supported. Zones []*string }
ResourceSKULocationInfo - Describes an available Compute SKU Location Information.
func (ResourceSKULocationInfo) MarshalJSON ¶
func (r ResourceSKULocationInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKULocationInfo.
func (*ResourceSKULocationInfo) UnmarshalJSON ¶
func (r *ResourceSKULocationInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKULocationInfo.
type ResourceSKUProperties ¶
type ResourceSKUProperties struct { // REQUIRED; Name value pairs to describe the capability. Capabilities []*ResourceSKUCapabilities // REQUIRED; The family of the SKU. Family *string // REQUIRED; A list of locations and availability zones in those locations where the SKU is available LocationInfo []*ResourceSKULocationInfo // REQUIRED; The set of locations that the SKU is available. Locations []*string // REQUIRED; The type of resource the SKU applies to. ResourceType *string // REQUIRED; The restrictions of the SKU. Restrictions []*ResourceSKURestrictions // REQUIRED; The size of the SKU. Size *string // REQUIRED; The tier of virtual machines in a scale set Tier *string }
ResourceSKUProperties - Properties of a ResourceSku
func (ResourceSKUProperties) MarshalJSON ¶
func (r ResourceSKUProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKUProperties.
func (*ResourceSKUProperties) UnmarshalJSON ¶
func (r *ResourceSKUProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUProperties.
type ResourceSKURestrictionInfo ¶
type ResourceSKURestrictionInfo struct { // Locations where the SKU is restricted Locations []*string // List of availability zones where the SKU is restricted. Zones []*string }
ResourceSKURestrictionInfo - Describes an available Compute SKU Restriction Information.
func (ResourceSKURestrictionInfo) MarshalJSON ¶
func (r ResourceSKURestrictionInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictionInfo.
func (*ResourceSKURestrictionInfo) UnmarshalJSON ¶
func (r *ResourceSKURestrictionInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictionInfo.
type ResourceSKURestrictions ¶
type ResourceSKURestrictions struct { // REQUIRED; The information about the restriction where the SKU cannot be used. RestrictionInfo *ResourceSKURestrictionInfo // REQUIRED; The value of restrictions. If the restriction type is set to location. This would be different locations where // the SKU is restricted. Values []*string // the reason for restriction. ReasonCode *ResourceSKURestrictionsReasonCode // the type of restrictions. Type *ResourceSKURestrictionsType }
ResourceSKURestrictions - The restrictions of the SKU.
func (ResourceSKURestrictions) MarshalJSON ¶
func (r ResourceSKURestrictions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKURestrictions.
func (*ResourceSKURestrictions) UnmarshalJSON ¶
func (r *ResourceSKURestrictions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKURestrictions.
type ResourceSKURestrictionsReasonCode ¶
type ResourceSKURestrictionsReasonCode string
const ( ResourceSKURestrictionsReasonCodeNotAvailableForSubscription ResourceSKURestrictionsReasonCode = "NotAvailableForSubscription" ResourceSKURestrictionsReasonCodeQuotaID ResourceSKURestrictionsReasonCode = "QuotaId" )
func PossibleResourceSKURestrictionsReasonCodeValues ¶
func PossibleResourceSKURestrictionsReasonCodeValues() []ResourceSKURestrictionsReasonCode
PossibleResourceSKURestrictionsReasonCodeValues returns the possible values for the ResourceSKURestrictionsReasonCode const type.
type ResourceSKURestrictionsType ¶
type ResourceSKURestrictionsType string
const ( ResourceSKURestrictionsTypeLocation ResourceSKURestrictionsType = "Location" ResourceSKURestrictionsTypeZone ResourceSKURestrictionsType = "Zone" )
func PossibleResourceSKURestrictionsTypeValues ¶
func PossibleResourceSKURestrictionsTypeValues() []ResourceSKURestrictionsType
PossibleResourceSKURestrictionsTypeValues returns the possible values for the ResourceSKURestrictionsType const type.
type ResourceSKUZoneDetails ¶
type ResourceSKUZoneDetails struct { // REQUIRED; A list of capabilities that are available for the SKU in the specified list of zones. Capabilities []*ResourceSKUCapabilities // REQUIRED; Gets the set of zones that the SKU is available in with the specified capabilities. Name []*string }
ResourceSKUZoneDetails - Describes The zonal capabilities of a SKU.
func (ResourceSKUZoneDetails) MarshalJSON ¶
func (r ResourceSKUZoneDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceSKUZoneDetails.
func (*ResourceSKUZoneDetails) UnmarshalJSON ¶
func (r *ResourceSKUZoneDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceSKUZoneDetails.
type ResourceStatus ¶
type ResourceStatus string
ResourceStatus - The status of the machine resource.
const ( // ResourceStatusAllocated - Represents a machine resource that is allocated. ResourceStatusAllocated ResourceStatus = "Allocated" // ResourceStatusLeased - Represents a machine resource that is leased. ResourceStatusLeased ResourceStatus = "Leased" // ResourceStatusNotReady - Represents a machine resource that is not ready. ResourceStatusNotReady ResourceStatus = "NotReady" // ResourceStatusPendingReimage - Represents a machine resource that is pending reimage. ResourceStatusPendingReimage ResourceStatus = "PendingReimage" // ResourceStatusPendingReturn - Represents a machine resource that is pending return. ResourceStatusPendingReturn ResourceStatus = "PendingReturn" // ResourceStatusProvisioning - Represents a machine resource that is provisioning. ResourceStatusProvisioning ResourceStatus = "Provisioning" // ResourceStatusReady - Represents a machine resource that is ready. ResourceStatusReady ResourceStatus = "Ready" // ResourceStatusReimaging - Represents a machine resource that is reimaging. ResourceStatusReimaging ResourceStatus = "Reimaging" // ResourceStatusReturned - Represents a machine resource that is returned. ResourceStatusReturned ResourceStatus = "Returned" // ResourceStatusStarting - Represents a machine resource that is starting. ResourceStatusStarting ResourceStatus = "Starting" // ResourceStatusUpdating - Represents a machine resource that is updating. ResourceStatusUpdating ResourceStatus = "Updating" )
func PossibleResourceStatusValues ¶
func PossibleResourceStatusValues() []ResourceStatus
PossibleResourceStatusValues returns the possible values for the ResourceStatus const type.
type SKUClient ¶
type SKUClient struct {
// contains filtered or unexported fields
}
SKUClient contains the methods for the SKU group. Don't use this type directly, use NewSKUClient() instead.
func NewSKUClient ¶
func NewSKUClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SKUClient, error)
NewSKUClient creates a new instance of SKUClient 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 (*SKUClient) NewListByLocationPager ¶
func (client *SKUClient) NewListByLocationPager(locationName string, options *SKUClientListByLocationOptions) *runtime.Pager[SKUClientListByLocationResponse]
NewListByLocationPager - List ResourceSku resources by subscription ID
Generated from API version 2024-04-04-preview
- locationName - Name of the location.
- options - SKUClientListByLocationOptions contains the optional parameters for the SKUClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/Sku_ListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSKUClient().NewListByLocationPager("eastus", 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.ResourceSKUListResult = armdevopsinfrastructure.ResourceSKUListResult{ // Value: []*armdevopsinfrastructure.ResourceSKU{ // { // Name: to.Ptr("Basic_A0"), // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus/Basic_A0"), // Properties: &armdevopsinfrastructure.ResourceSKUProperties{ // Capabilities: []*armdevopsinfrastructure.ResourceSKUCapabilities{ // { // Name: to.Ptr("MaxResourceVolumeMB"), // Value: to.Ptr("20480"), // }, // { // Name: to.Ptr("OSVhdSizeMB"), // Value: to.Ptr("1047552"), // }, // { // Name: to.Ptr("vCPUs"), // Value: to.Ptr("1"), // }, // { // Name: to.Ptr("MemoryPreservingMaintenanceSupported"), // Value: to.Ptr("True"), // }, // { // Name: to.Ptr("HyperVGenerations"), // Value: to.Ptr("V1"), // }, // { // Name: to.Ptr("MemoryGB"), // Value: to.Ptr("0.75"), // }, // { // Name: to.Ptr("MaxDataDiskCount"), // Value: to.Ptr("1"), // }, // { // Name: to.Ptr("CpuArchitectureType"), // Value: to.Ptr("x64"), // }, // { // Name: to.Ptr("LowPriorityCapable"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("PremiumIO"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("VMDeploymentTypes"), // Value: to.Ptr("IaaS"), // }, // { // Name: to.Ptr("vCPUsAvailable"), // Value: to.Ptr("1"), // }, // { // Name: to.Ptr("ACUs"), // Value: to.Ptr("50"), // }, // { // Name: to.Ptr("vCPUsPerCore"), // Value: to.Ptr("1"), // }, // { // Name: to.Ptr("EphemeralOSDiskSupported"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("EncryptionAtHostSupported"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("CapacityReservationSupported"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("AcceleratedNetworkingEnabled"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("RdmaEnabled"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("MaxNetworkInterfaces"), // Value: to.Ptr("2"), // }}, // Family: to.Ptr("basicAFamily"), // LocationInfo: []*armdevopsinfrastructure.ResourceSKULocationInfo{ // { // Location: to.Ptr("eastus"), // ZoneDetails: []*armdevopsinfrastructure.ResourceSKUZoneDetails{ // }, // Zones: []*string{ // }, // }}, // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("virtualMachines"), // Restrictions: []*armdevopsinfrastructure.ResourceSKURestrictions{ // { // Type: to.Ptr(armdevopsinfrastructure.ResourceSKURestrictionsTypeLocation), // ReasonCode: to.Ptr(armdevopsinfrastructure.ResourceSKURestrictionsReasonCodeNotAvailableForSubscription), // RestrictionInfo: &armdevopsinfrastructure.ResourceSKURestrictionInfo{ // Locations: []*string{ // to.Ptr("eastus")}, // }, // Values: []*string{ // to.Ptr("eastus")}, // }, // { // Type: to.Ptr(armdevopsinfrastructure.ResourceSKURestrictionsTypeZone), // ReasonCode: to.Ptr(armdevopsinfrastructure.ResourceSKURestrictionsReasonCodeNotAvailableForSubscription), // RestrictionInfo: &armdevopsinfrastructure.ResourceSKURestrictionInfo{ // Locations: []*string{ // to.Ptr("eastus")}, // Zones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // }, // Values: []*string{ // to.Ptr("eastus")}, // }}, // Size: to.Ptr("A0"), // Tier: to.Ptr("Basic"), // }, // }, // { // Name: to.Ptr("Standard_A2_v2"), // ID: to.Ptr("/subscriptions/a2e95d27-c161-4b61-bda4-11512c14c2c2/providers/Microsoft.DevOpsInfrastructure/locations/eastus/skus/Standard_A2_v2"), // Properties: &armdevopsinfrastructure.ResourceSKUProperties{ // Capabilities: []*armdevopsinfrastructure.ResourceSKUCapabilities{ // { // Name: to.Ptr("MaxResourceVolumeMB"), // Value: to.Ptr("20480"), // }, // { // Name: to.Ptr("OSVhdSizeMB"), // Value: to.Ptr("1047552"), // }, // { // Name: to.Ptr("vCPUs"), // Value: to.Ptr("2"), // }, // { // Name: to.Ptr("MemoryPreservingMaintenanceSupported"), // Value: to.Ptr("True"), // }, // { // Name: to.Ptr("HyperVGenerations"), // Value: to.Ptr("V1"), // }, // { // Name: to.Ptr("MemoryGB"), // Value: to.Ptr("4"), // }, // { // Name: to.Ptr("MaxDataDiskCount"), // Value: to.Ptr("4"), // }, // { // Name: to.Ptr("CpuArchitectureType"), // Value: to.Ptr("x64"), // }, // { // Name: to.Ptr("LowPriorityCapable"), // Value: to.Ptr("True"), // }, // { // Name: to.Ptr("PremiumIO"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("VMDeploymentTypes"), // Value: to.Ptr("PaaS,IaaS"), // }, // { // Name: to.Ptr("vCPUsAvailable"), // Value: to.Ptr("2"), // }, // { // Name: to.Ptr("ACUs"), // Value: to.Ptr("100"), // }, // { // Name: to.Ptr("vCPUsPerCore"), // Value: to.Ptr("1"), // }, // { // Name: to.Ptr("CombinedTempDiskAndCachedIOPS"), // Value: to.Ptr("2000"), // }, // { // Name: to.Ptr("CombinedTempDiskAndCachedReadBytesPerSecond"), // Value: to.Ptr("41943040"), // }, // { // Name: to.Ptr("CombinedTempDiskAndCachedWriteBytesPerSecond"), // Value: to.Ptr("20971520"), // }, // { // Name: to.Ptr("UncachedDiskIOPS"), // Value: to.Ptr("3200"), // }, // { // Name: to.Ptr("UncachedDiskBytesPerSecond"), // Value: to.Ptr("48000000"), // }, // { // Name: to.Ptr("EphemeralOSDiskSupported"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("EncryptionAtHostSupported"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("CapacityReservationSupported"), // Value: to.Ptr("True"), // }, // { // Name: to.Ptr("AcceleratedNetworkingEnabled"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("RdmaEnabled"), // Value: to.Ptr("False"), // }, // { // Name: to.Ptr("MaxNetworkInterfaces"), // Value: to.Ptr("2"), // }}, // Family: to.Ptr("standardAv2Family"), // LocationInfo: []*armdevopsinfrastructure.ResourceSKULocationInfo{ // { // Location: to.Ptr("eastus"), // ZoneDetails: []*armdevopsinfrastructure.ResourceSKUZoneDetails{ // }, // Zones: []*string{ // to.Ptr("1"), // to.Ptr("2"), // to.Ptr("3")}, // }}, // Locations: []*string{ // to.Ptr("eastus")}, // ResourceType: to.Ptr("virtualMachines"), // Restrictions: []*armdevopsinfrastructure.ResourceSKURestrictions{ // }, // Size: to.Ptr("A2_v2"), // Tier: to.Ptr("Standard"), // }, // }}, // } } }
Output:
type SKUClientListByLocationOptions ¶
type SKUClientListByLocationOptions struct { }
SKUClientListByLocationOptions contains the optional parameters for the SKUClient.NewListByLocationPager method.
type SKUClientListByLocationResponse ¶
type SKUClientListByLocationResponse struct { // The response of a ResourceSku list operation. ResourceSKUListResult }
SKUClientListByLocationResponse contains the response from method SKUClient.NewListByLocationPager.
type SecretsManagementSettings ¶
type SecretsManagementSettings struct { // REQUIRED; Defines if the key of the certificates should be exportable. KeyExportable *bool // REQUIRED; The list of certificates to install on all machines in the pool. ObservedCertificates []*string // Where to store certificates on the machine. CertificateStoreLocation *string }
SecretsManagementSettings - The secret management settings of the machines in the pool.
func (SecretsManagementSettings) MarshalJSON ¶
func (s SecretsManagementSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecretsManagementSettings.
func (*SecretsManagementSettings) UnmarshalJSON ¶
func (s *SecretsManagementSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecretsManagementSettings.
type Stateful ¶
type Stateful struct { // REQUIRED; Discriminator property for AgentProfile. Kind *string // How long should the machine be kept around after it ran a workload when there are no stand-by agents. The maximum is one // week. GracePeriodTimeSpan *string // How long should stateful machines be kept around. The maximum is one week. MaxAgentLifetime *string // Defines pool buffer/stand-by agents. ResourcePredictions any // Defines how the pool buffer/stand-by agents is provided. ResourcePredictionsProfile ResourcePredictionsProfileClassification }
Stateful profile meaning that the machines will be returned to the pool after running a job.
func (*Stateful) GetAgentProfile ¶
func (s *Stateful) GetAgentProfile() *AgentProfile
GetAgentProfile implements the AgentProfileClassification interface for type Stateful.
func (Stateful) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Stateful.
func (*Stateful) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Stateful.
type StatefulUpdate ¶
type StatefulUpdate struct { // REQUIRED; Discriminator property for AgentProfile. Kind *string // How long should the machine be kept around after it ran a workload when there are no stand-by agents. The maximum is one // week. GracePeriodTimeSpan *string // How long should stateful machines be kept around. The maximum is one week. MaxAgentLifetime *string // Defines pool buffer/stand-by agents. ResourcePredictions any // Defines how the pool buffer/stand-by agents is provided. ResourcePredictionsProfile ResourcePredictionsProfileUpdateClassification }
StatefulUpdate - Stateful profile meaning that the machines will be returned to the pool after running a job.
func (*StatefulUpdate) GetAgentProfileUpdate ¶
func (s *StatefulUpdate) GetAgentProfileUpdate() *AgentProfileUpdate
GetAgentProfileUpdate implements the AgentProfileUpdateClassification interface for type StatefulUpdate.
func (StatefulUpdate) MarshalJSON ¶
func (s StatefulUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatefulUpdate.
func (*StatefulUpdate) UnmarshalJSON ¶
func (s *StatefulUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatefulUpdate.
type StatelessAgentProfile ¶
type StatelessAgentProfile struct { // REQUIRED; Discriminator property for AgentProfile. Kind *string // Defines pool buffer/stand-by agents. ResourcePredictions any // Defines how the pool buffer/stand-by agents is provided. ResourcePredictionsProfile ResourcePredictionsProfileClassification }
StatelessAgentProfile - Stateless profile meaning that the machines will be cleaned up after running a job.
func (*StatelessAgentProfile) GetAgentProfile ¶
func (s *StatelessAgentProfile) GetAgentProfile() *AgentProfile
GetAgentProfile implements the AgentProfileClassification interface for type StatelessAgentProfile.
func (StatelessAgentProfile) MarshalJSON ¶
func (s StatelessAgentProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatelessAgentProfile.
func (*StatelessAgentProfile) UnmarshalJSON ¶
func (s *StatelessAgentProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatelessAgentProfile.
type StatelessAgentProfileUpdate ¶
type StatelessAgentProfileUpdate struct { // REQUIRED; Discriminator property for AgentProfile. Kind *string // Defines pool buffer/stand-by agents. ResourcePredictions any // Defines how the pool buffer/stand-by agents is provided. ResourcePredictionsProfile ResourcePredictionsProfileUpdateClassification }
StatelessAgentProfileUpdate - Stateless profile meaning that the machines will be cleaned up after running a job.
func (*StatelessAgentProfileUpdate) GetAgentProfileUpdate ¶
func (s *StatelessAgentProfileUpdate) GetAgentProfileUpdate() *AgentProfileUpdate
GetAgentProfileUpdate implements the AgentProfileUpdateClassification interface for type StatelessAgentProfileUpdate.
func (StatelessAgentProfileUpdate) MarshalJSON ¶
func (s StatelessAgentProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StatelessAgentProfileUpdate.
func (*StatelessAgentProfileUpdate) UnmarshalJSON ¶
func (s *StatelessAgentProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StatelessAgentProfileUpdate.
type StorageAccountType ¶
type StorageAccountType string
StorageAccountType - StorageAccountType enums
const ( // StorageAccountTypePremiumLRS - The data disk should use premium locally redundant storage. StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" // StorageAccountTypePremiumZRS - The data disk should use premium SSD zonal redundant storage. StorageAccountTypePremiumZRS StorageAccountType = "Premium_ZRS" // StorageAccountTypeStandardLRS - The data disk should use standard locally redundant storage. StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" // StorageAccountTypeStandardSSDLRS - The data disk should use standard SSD locally redundant storage. StorageAccountTypeStandardSSDLRS StorageAccountType = "StandardSSD_LRS" // StorageAccountTypeStandardSSDZRS - The data disk should use standard SSD zonal redundant storage. StorageAccountTypeStandardSSDZRS StorageAccountType = "StandardSSD_ZRS" )
func PossibleStorageAccountTypeValues ¶
func PossibleStorageAccountTypeValues() []StorageAccountType
PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type.
type StorageProfile ¶
type StorageProfile struct { // A list of empty data disks to attach. DataDisks []*DataDisk // The Azure SKU name of the machines in the pool. OSDiskStorageAccountType *OsDiskStorageAccountType }
StorageProfile - The storage profile of the VMSS.
func (StorageProfile) MarshalJSON ¶
func (s StorageProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfile.
func (*StorageProfile) UnmarshalJSON ¶
func (s *StorageProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.
type SubscriptionUsagesClient ¶
type SubscriptionUsagesClient struct {
// contains filtered or unexported fields
}
SubscriptionUsagesClient contains the methods for the SubscriptionUsages group. Don't use this type directly, use NewSubscriptionUsagesClient() instead.
func NewSubscriptionUsagesClient ¶
func NewSubscriptionUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionUsagesClient, error)
NewSubscriptionUsagesClient creates a new instance of SubscriptionUsagesClient 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 (*SubscriptionUsagesClient) NewListByLocationPager ¶
func (client *SubscriptionUsagesClient) NewListByLocationPager(locationName string, options *SubscriptionUsagesClientListByLocationOptions) *runtime.Pager[SubscriptionUsagesClientListByLocationResponse]
NewListByLocationPager - List Quota resources by subscription ID
Generated from API version 2024-04-04-preview
- locationName - Name of the location.
- options - SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/SubscriptionUsages_ListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devopsinfrastructure/armdevopsinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armdevopsinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSubscriptionUsagesClient().NewListByLocationPager("eastus", 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.QuotaListResult = armdevopsinfrastructure.QuotaListResult{ // Value: []*armdevopsinfrastructure.Quota{ // { // Name: to.Ptr("standardDADSv5Family"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.DevOpsInfrastructure/Usages/standardDADSv5Family"), // Properties: &armdevopsinfrastructure.QuotaProperties{ // Name: &armdevopsinfrastructure.QuotaName{ // LocalizedValue: to.Ptr("Standard DADSv5 Family vCPUs (PME VMSS)"), // Value: to.Ptr("standardDADSv5Family"), // }, // CurrentValue: to.Ptr[int64](0), // Limit: to.Ptr[int64](212), // Unit: to.Ptr("Count"), // }, // }, // { // Name: to.Ptr("standardDPLDSv5Family"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.DevOpsInfrastructure/Usages/standardDPLDSv5Family"), // Properties: &armdevopsinfrastructure.QuotaProperties{ // Name: &armdevopsinfrastructure.QuotaName{ // LocalizedValue: to.Ptr("Standard DPLDSv5 Family vCPUs (PME VMSS)"), // Value: to.Ptr("standardDPLDSv5Family"), // }, // CurrentValue: to.Ptr[int64](0), // Limit: to.Ptr[int64](100), // Unit: to.Ptr("Count"), // }, // }}, // } } }
Output:
type SubscriptionUsagesClientListByLocationOptions ¶
type SubscriptionUsagesClientListByLocationOptions struct { }
SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.NewListByLocationPager method.
type SubscriptionUsagesClientListByLocationResponse ¶
type SubscriptionUsagesClientListByLocationResponse struct { // The response of a Quota list operation. QuotaListResult }
SubscriptionUsagesClientListByLocationResponse contains the response from method SubscriptionUsagesClient.NewListByLocationPager.
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 UserAssignedIdentity ¶
type UserAssignedIdentity struct { // READ-ONLY; The client ID of the assigned identity. ClientID *string // READ-ONLY; The principal ID of the assigned identity. PrincipalID *string }
UserAssignedIdentity - User assigned identity properties
func (UserAssignedIdentity) MarshalJSON ¶
func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.
func (*UserAssignedIdentity) UnmarshalJSON ¶
func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.
type VmssFabricProfile ¶
type VmssFabricProfile struct { // REQUIRED; The VM images of the machines in the pool. Images []*PoolImage // REQUIRED; Discriminator property for FabricProfile. Kind *string // REQUIRED; The Azure SKU of the machines in the pool. SKU *DevOpsAzureSKU // The network profile of the machines in the pool. NetworkProfile *NetworkProfile // The OS profile of the machines in the pool. OSProfile *OsProfile // The storage profile of the machines in the pool. StorageProfile *StorageProfile }
VmssFabricProfile - The agents will run on Virtual Machine Scale Sets.
func (*VmssFabricProfile) GetFabricProfile ¶
func (v *VmssFabricProfile) GetFabricProfile() *FabricProfile
GetFabricProfile implements the FabricProfileClassification interface for type VmssFabricProfile.
func (VmssFabricProfile) MarshalJSON ¶
func (v VmssFabricProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VmssFabricProfile.
func (*VmssFabricProfile) UnmarshalJSON ¶
func (v *VmssFabricProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VmssFabricProfile.