Documentation ¶
Index ¶
- type AzureBareMetalHardwareTypeNamesEnum
- type AzureBareMetalInstance
- type AzureBareMetalInstancePowerStateEnum
- type AzureBareMetalInstanceProperties
- type AzureBareMetalInstanceSizeNamesEnum
- type AzureBareMetalInstancesClient
- func (client *AzureBareMetalInstancesClient) Get(ctx context.Context, resourceGroupName string, ...) (AzureBareMetalInstancesClientGetResponse, error)
- func (client *AzureBareMetalInstancesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[AzureBareMetalInstancesClientListByResourceGroupResponse]
- func (client *AzureBareMetalInstancesClient) NewListBySubscriptionPager(options *AzureBareMetalInstancesClientListBySubscriptionOptions) *runtime.Pager[AzureBareMetalInstancesClientListBySubscriptionResponse]
- func (client *AzureBareMetalInstancesClient) Update(ctx context.Context, resourceGroupName string, ...) (AzureBareMetalInstancesClientUpdateResponse, error)
- type AzureBareMetalInstancesClientGetOptions
- type AzureBareMetalInstancesClientGetResponse
- type AzureBareMetalInstancesClientListByResourceGroupOptions
- type AzureBareMetalInstancesClientListByResourceGroupResponse
- type AzureBareMetalInstancesClientListBySubscriptionOptions
- type AzureBareMetalInstancesClientListBySubscriptionResponse
- type AzureBareMetalInstancesClientUpdateOptions
- type AzureBareMetalInstancesClientUpdateResponse
- type AzureBareMetalInstancesListResult
- type AzureBareMetalProvisioningStatesEnum
- type ClientFactory
- type CreatedByType
- type Disk
- type Display
- type ErrorDefinition
- type ErrorResponse
- type HardwareProfile
- type IPAddress
- type NetworkProfile
- type OSProfile
- type Operation
- type OperationList
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Resource
- type Result
- type StorageProfile
- type SystemData
- type Tags
- type TrackedResource
Examples ¶
- AzureBareMetalInstancesClient.Get
- AzureBareMetalInstancesClient.NewListByResourceGroupPager
- AzureBareMetalInstancesClient.NewListBySubscriptionPager
- AzureBareMetalInstancesClient.Update (DeleteTagsFieldOfAnAzureBareMetalInstance)
- AzureBareMetalInstancesClient.Update (UpdateTagsFieldOfAnAzureBareMetalInstance)
- OperationsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureBareMetalHardwareTypeNamesEnum ¶
type AzureBareMetalHardwareTypeNamesEnum string
AzureBareMetalHardwareTypeNamesEnum - Name of the hardware type (vendor and/or their product name)
const ( AzureBareMetalHardwareTypeNamesEnumCiscoUCS AzureBareMetalHardwareTypeNamesEnum = "Cisco_UCS" AzureBareMetalHardwareTypeNamesEnumHPE AzureBareMetalHardwareTypeNamesEnum = "HPE" )
func PossibleAzureBareMetalHardwareTypeNamesEnumValues ¶
func PossibleAzureBareMetalHardwareTypeNamesEnumValues() []AzureBareMetalHardwareTypeNamesEnum
PossibleAzureBareMetalHardwareTypeNamesEnumValues returns the possible values for the AzureBareMetalHardwareTypeNamesEnum const type.
type AzureBareMetalInstance ¶
type AzureBareMetalInstance struct { // REQUIRED; The geo-location where the resource lives Location *string // AzureBareMetal instance properties Properties *AzureBareMetalInstanceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The system metadata relating to this resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
AzureBareMetalInstance - AzureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties)
func (AzureBareMetalInstance) MarshalJSON ¶
func (a AzureBareMetalInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureBareMetalInstance.
func (*AzureBareMetalInstance) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureBareMetalInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureBareMetalInstance.
type AzureBareMetalInstancePowerStateEnum ¶
type AzureBareMetalInstancePowerStateEnum string
AzureBareMetalInstancePowerStateEnum - Resource power state
const ( AzureBareMetalInstancePowerStateEnumRestarting AzureBareMetalInstancePowerStateEnum = "restarting" AzureBareMetalInstancePowerStateEnumStarted AzureBareMetalInstancePowerStateEnum = "started" AzureBareMetalInstancePowerStateEnumStarting AzureBareMetalInstancePowerStateEnum = "starting" AzureBareMetalInstancePowerStateEnumStopped AzureBareMetalInstancePowerStateEnum = "stopped" AzureBareMetalInstancePowerStateEnumStopping AzureBareMetalInstancePowerStateEnum = "stopping" AzureBareMetalInstancePowerStateEnumUnknown AzureBareMetalInstancePowerStateEnum = "unknown" )
func PossibleAzureBareMetalInstancePowerStateEnumValues ¶
func PossibleAzureBareMetalInstancePowerStateEnumValues() []AzureBareMetalInstancePowerStateEnum
PossibleAzureBareMetalInstancePowerStateEnumValues returns the possible values for the AzureBareMetalInstancePowerStateEnum const type.
type AzureBareMetalInstanceProperties ¶
type AzureBareMetalInstanceProperties struct { // Specifies the hardware settings for the AzureBareMetal instance. HardwareProfile *HardwareProfile // Specifies the network settings for the AzureBareMetal instance. NetworkProfile *NetworkProfile // Specifies the operating system settings for the AzureBareMetal instance. OSProfile *OSProfile // ARM ID of another AzureBareMetalInstance that will share a network with this AzureBareMetalInstance PartnerNodeID *string // Specifies the storage settings for the AzureBareMetal instance disks. StorageProfile *StorageProfile // READ-ONLY; Specifies the AzureBareMetal instance unique ID. AzureBareMetalInstanceID *string // READ-ONLY; Hardware revision of an AzureBareMetal instance HwRevision *string // READ-ONLY; Resource power state PowerState *AzureBareMetalInstancePowerStateEnum // READ-ONLY; State of provisioning of the AzureBareMetalInstance ProvisioningState *AzureBareMetalProvisioningStatesEnum // READ-ONLY; Resource proximity placement group ProximityPlacementGroup *string }
AzureBareMetalInstanceProperties - Describes the properties of an AzureBareMetal instance.
func (AzureBareMetalInstanceProperties) MarshalJSON ¶ added in v1.1.0
func (a AzureBareMetalInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureBareMetalInstanceProperties.
func (*AzureBareMetalInstanceProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureBareMetalInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureBareMetalInstanceProperties.
type AzureBareMetalInstanceSizeNamesEnum ¶
type AzureBareMetalInstanceSizeNamesEnum string
AzureBareMetalInstanceSizeNamesEnum - Specifies the AzureBareMetal instance SKU.
const ( AzureBareMetalInstanceSizeNamesEnumS112 AzureBareMetalInstanceSizeNamesEnum = "S112" AzureBareMetalInstanceSizeNamesEnumS144 AzureBareMetalInstanceSizeNamesEnum = "S144" AzureBareMetalInstanceSizeNamesEnumS144M AzureBareMetalInstanceSizeNamesEnum = "S144m" AzureBareMetalInstanceSizeNamesEnumS192 AzureBareMetalInstanceSizeNamesEnum = "S192" AzureBareMetalInstanceSizeNamesEnumS192M AzureBareMetalInstanceSizeNamesEnum = "S192m" AzureBareMetalInstanceSizeNamesEnumS192Xm AzureBareMetalInstanceSizeNamesEnum = "S192xm" AzureBareMetalInstanceSizeNamesEnumS224 AzureBareMetalInstanceSizeNamesEnum = "S224" AzureBareMetalInstanceSizeNamesEnumS224M AzureBareMetalInstanceSizeNamesEnum = "S224m" AzureBareMetalInstanceSizeNamesEnumS224Om AzureBareMetalInstanceSizeNamesEnum = "S224om" AzureBareMetalInstanceSizeNamesEnumS224Oo AzureBareMetalInstanceSizeNamesEnum = "S224oo" AzureBareMetalInstanceSizeNamesEnumS224Oom AzureBareMetalInstanceSizeNamesEnum = "S224oom" AzureBareMetalInstanceSizeNamesEnumS224Ooo AzureBareMetalInstanceSizeNamesEnum = "S224ooo" AzureBareMetalInstanceSizeNamesEnumS384 AzureBareMetalInstanceSizeNamesEnum = "S384" AzureBareMetalInstanceSizeNamesEnumS384M AzureBareMetalInstanceSizeNamesEnum = "S384m" AzureBareMetalInstanceSizeNamesEnumS384Xm AzureBareMetalInstanceSizeNamesEnum = "S384xm" AzureBareMetalInstanceSizeNamesEnumS384Xxm AzureBareMetalInstanceSizeNamesEnum = "S384xxm" AzureBareMetalInstanceSizeNamesEnumS448 AzureBareMetalInstanceSizeNamesEnum = "S448" AzureBareMetalInstanceSizeNamesEnumS448M AzureBareMetalInstanceSizeNamesEnum = "S448m" AzureBareMetalInstanceSizeNamesEnumS448Om AzureBareMetalInstanceSizeNamesEnum = "S448om" AzureBareMetalInstanceSizeNamesEnumS448Oo AzureBareMetalInstanceSizeNamesEnum = "S448oo" AzureBareMetalInstanceSizeNamesEnumS448Oom AzureBareMetalInstanceSizeNamesEnum = "S448oom" AzureBareMetalInstanceSizeNamesEnumS448Ooo AzureBareMetalInstanceSizeNamesEnum = "S448ooo" AzureBareMetalInstanceSizeNamesEnumS576M AzureBareMetalInstanceSizeNamesEnum = "S576m" AzureBareMetalInstanceSizeNamesEnumS576Xm AzureBareMetalInstanceSizeNamesEnum = "S576xm" AzureBareMetalInstanceSizeNamesEnumS672 AzureBareMetalInstanceSizeNamesEnum = "S672" AzureBareMetalInstanceSizeNamesEnumS672M AzureBareMetalInstanceSizeNamesEnum = "S672m" AzureBareMetalInstanceSizeNamesEnumS672Om AzureBareMetalInstanceSizeNamesEnum = "S672om" AzureBareMetalInstanceSizeNamesEnumS672Oo AzureBareMetalInstanceSizeNamesEnum = "S672oo" AzureBareMetalInstanceSizeNamesEnumS672Oom AzureBareMetalInstanceSizeNamesEnum = "S672oom" AzureBareMetalInstanceSizeNamesEnumS672Ooo AzureBareMetalInstanceSizeNamesEnum = "S672ooo" AzureBareMetalInstanceSizeNamesEnumS72 AzureBareMetalInstanceSizeNamesEnum = "S72" AzureBareMetalInstanceSizeNamesEnumS72M AzureBareMetalInstanceSizeNamesEnum = "S72m" AzureBareMetalInstanceSizeNamesEnumS768 AzureBareMetalInstanceSizeNamesEnum = "S768" AzureBareMetalInstanceSizeNamesEnumS768M AzureBareMetalInstanceSizeNamesEnum = "S768m" AzureBareMetalInstanceSizeNamesEnumS768Xm AzureBareMetalInstanceSizeNamesEnum = "S768xm" AzureBareMetalInstanceSizeNamesEnumS896 AzureBareMetalInstanceSizeNamesEnum = "S896" AzureBareMetalInstanceSizeNamesEnumS896M AzureBareMetalInstanceSizeNamesEnum = "S896m" AzureBareMetalInstanceSizeNamesEnumS896Om AzureBareMetalInstanceSizeNamesEnum = "S896om" AzureBareMetalInstanceSizeNamesEnumS896Oo AzureBareMetalInstanceSizeNamesEnum = "S896oo" AzureBareMetalInstanceSizeNamesEnumS896Oom AzureBareMetalInstanceSizeNamesEnum = "S896oom" AzureBareMetalInstanceSizeNamesEnumS896Ooo AzureBareMetalInstanceSizeNamesEnum = "S896ooo" AzureBareMetalInstanceSizeNamesEnumS96 AzureBareMetalInstanceSizeNamesEnum = "S96" AzureBareMetalInstanceSizeNamesEnumS960M AzureBareMetalInstanceSizeNamesEnum = "S960m" )
func PossibleAzureBareMetalInstanceSizeNamesEnumValues ¶
func PossibleAzureBareMetalInstanceSizeNamesEnumValues() []AzureBareMetalInstanceSizeNamesEnum
PossibleAzureBareMetalInstanceSizeNamesEnumValues returns the possible values for the AzureBareMetalInstanceSizeNamesEnum const type.
type AzureBareMetalInstancesClient ¶
type AzureBareMetalInstancesClient struct {
// contains filtered or unexported fields
}
AzureBareMetalInstancesClient contains the methods for the AzureBareMetalInstances group. Don't use this type directly, use NewAzureBareMetalInstancesClient() instead.
func NewAzureBareMetalInstancesClient ¶
func NewAzureBareMetalInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureBareMetalInstancesClient, error)
NewAzureBareMetalInstancesClient creates a new instance of AzureBareMetalInstancesClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AzureBareMetalInstancesClient) Get ¶
func (client *AzureBareMetalInstancesClient) Get(ctx context.Context, resourceGroupName string, azureBareMetalInstanceName string, options *AzureBareMetalInstancesClientGetOptions) (AzureBareMetalInstancesClientGetResponse, error)
Get - Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-08-09
- resourceGroupName - The name of the resource group. The name is case insensitive.
- azureBareMetalInstanceName - Name of the Azure BareMetal on Azure instance.
- options - AzureBareMetalInstancesClientGetOptions contains the optional parameters for the AzureBareMetalInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/baremetalinfrastructure/armbaremetalinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armbaremetalinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAzureBareMetalInstancesClient().Get(ctx, "myResourceGroup", "myAzureBareMetalInstance", 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.AzureBareMetalInstance = armbaremetalinfrastructure.AzureBareMetalInstance{ // Name: to.Ptr("myAzureBareMetalInstance"), // Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalInstances"), // ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/myAzureBareMetalInstance"), // Location: to.Ptr("westus2"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armbaremetalinfrastructure.AzureBareMetalInstanceProperties{ // AzureBareMetalInstanceID: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e1"), // HardwareProfile: &armbaremetalinfrastructure.HardwareProfile{ // AzureBareMetalInstanceSize: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstanceSizeNamesEnumS72), // HardwareType: to.Ptr(armbaremetalinfrastructure.AzureBareMetalHardwareTypeNamesEnumCiscoUCS), // }, // HwRevision: to.Ptr("Rev 4.2"), // NetworkProfile: &armbaremetalinfrastructure.NetworkProfile{ // CircuitID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Network/expressRouteCircuits/myCircuitId"), // NetworkInterfaces: []*armbaremetalinfrastructure.IPAddress{ // { // IPAddress: to.Ptr("123.123.123.123"), // }}, // }, // OSProfile: &armbaremetalinfrastructure.OSProfile{ // ComputerName: to.Ptr("myComputerName"), // OSType: to.Ptr("SLES 12 SP2"), // Version: to.Ptr("12 SP2"), // }, // PowerState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstancePowerStateEnumRestarting), // ProvisioningState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalProvisioningStatesEnumSucceeded), // StorageProfile: &armbaremetalinfrastructure.StorageProfile{ // NfsIPAddress: to.Ptr("123.123.119.123"), // }, // }, // SystemData: &armbaremetalinfrastructure.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-20T23:10:22.682Z"); return t}()), // CreatedBy: to.Ptr("user@microsoft.com"), // CreatedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-21T08:01:22.000Z"); return t}()), // LastModifiedBy: to.Ptr("user@microsoft.com"), // LastModifiedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // }, // } }
Output:
func (*AzureBareMetalInstancesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *AzureBareMetalInstancesClient) NewListByResourceGroupPager(resourceGroupName string, options *AzureBareMetalInstancesClientListByResourceGroupOptions) *runtime.Pager[AzureBareMetalInstancesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns various properties of each Azure BareMetal instance.
Generated from API version 2021-08-09
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - AzureBareMetalInstancesClientListByResourceGroupOptions contains the optional parameters for the AzureBareMetalInstancesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/baremetalinfrastructure/armbaremetalinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armbaremetalinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAzureBareMetalInstancesClient().NewListByResourceGroupPager("myResourceGroup", 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.AzureBareMetalInstancesListResult = armbaremetalinfrastructure.AzureBareMetalInstancesListResult{ // Value: []*armbaremetalinfrastructure.AzureBareMetalInstance{ // { // Name: to.Ptr("myAzureBareMetalInstance1"), // Type: to.Ptr("Microsoft.BareMetalInfrastructure/azureBareMetalInstances"), // ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/azureBareMetalInstances/myAzureBareMetalInstance1"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armbaremetalinfrastructure.AzureBareMetalInstanceProperties{ // AzureBareMetalInstanceID: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e1"), // HardwareProfile: &armbaremetalinfrastructure.HardwareProfile{ // AzureBareMetalInstanceSize: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstanceSizeNamesEnumS72), // HardwareType: to.Ptr(armbaremetalinfrastructure.AzureBareMetalHardwareTypeNamesEnumCiscoUCS), // }, // HwRevision: to.Ptr("Rev 3"), // NetworkProfile: &armbaremetalinfrastructure.NetworkProfile{ // CircuitID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Network/expressRouteCircuit"), // NetworkInterfaces: []*armbaremetalinfrastructure.IPAddress{ // { // IPAddress: to.Ptr("100.100.100.100"), // }}, // }, // OSProfile: &armbaremetalinfrastructure.OSProfile{ // ComputerName: to.Ptr("myComputerName1"), // OSType: to.Ptr("SUSE"), // SSHPublicKey: to.Ptr("AAAAB3NzaC1yc2EAAAABJQAAAQB/nAmOjTmezNUDKYvEeIRf2YnwM9/uUG1d0BYsc8/tRtx+RGi7N2lUbp728MXGwdnL9od4cItzky/zVdLZE2cycOa18xBK9cOWmcKS0A8FYBxEQWJ/q9YVUgZbFKfYGaGQxsER+A0w/fX8ALuk78ktP31K69LcQgxIsl7rNzxsoOQKJ/CIxOGMMxczYTiEoLvQhapFQMs3FL96didKr/QbrfB1WT6s3838SEaXfgZvLef1YB2xmfhbT9OXFE3FXvh2UPBfN+ffE7iiayQf/2XR+8j4N4bW30DiPtOQLGUrH1y5X/rpNZNlWW2+jGIxqZtgWg7lTy3mXy5x836Sj/6L"), // Version: to.Ptr("12 SP1"), // }, // PowerState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstancePowerStateEnumStarted), // ProvisioningState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalProvisioningStatesEnumSucceeded), // ProximityPlacementGroup: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myplacementgroup"), // StorageProfile: &armbaremetalinfrastructure.StorageProfile{ // NfsIPAddress: to.Ptr("200.200.200.200"), // }, // }, // SystemData: &armbaremetalinfrastructure.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-20T23:10:22.682Z"); return t}()), // CreatedBy: to.Ptr("user@microsoft.com"), // CreatedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-21T08:01:22.000Z"); return t}()), // LastModifiedBy: to.Ptr("user@microsoft.com"), // LastModifiedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // }, // }, // { // Name: to.Ptr("myABMInstance2"), // Type: to.Ptr("Microsoft.BareMetalInfrastructure/azureBareMetalInstances"), // ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/azureBareMetalInstances/myABMInstance2"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armbaremetalinfrastructure.AzureBareMetalInstanceProperties{ // AzureBareMetalInstanceID: to.Ptr("589bce49-9fe6-4dc8-82df-cf6ae25e0cb9"), // HardwareProfile: &armbaremetalinfrastructure.HardwareProfile{ // AzureBareMetalInstanceSize: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstanceSizeNamesEnumS384), // HardwareType: to.Ptr(armbaremetalinfrastructure.AzureBareMetalHardwareTypeNamesEnumHPE), // }, // HwRevision: to.Ptr("Rev 3"), // NetworkProfile: &armbaremetalinfrastructure.NetworkProfile{ // CircuitID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Network/expressRouteCircuit"), // NetworkInterfaces: []*armbaremetalinfrastructure.IPAddress{ // { // IPAddress: to.Ptr("100.100.100.101"), // }}, // }, // OSProfile: &armbaremetalinfrastructure.OSProfile{ // ComputerName: to.Ptr("myComputerName2"), // OSType: to.Ptr("SUSE"), // SSHPublicKey: to.Ptr("AAAAB3NzaC1yc2EAAAABJQAAAQB/nAmOjTmezNUDKYvEeIRf2YnwM9/uUG1d0BYsc8/tRtx+RGi7N2lUbp728MXGwdnL9od4cItzky/zVdLZE2cycOa18xBK9cOWmcKS0A8FYBxEQWJ/q9YVUgZbFKfYGaGQxsER+A0w/fX8ALuk78ktP31K69LcQgxIsl7rNzxsoOQKJ/CIxOGMMxczYTiEoLvQhapFQMs3FL96didKr/QbrfB1WT6s3838SEaXfgZvLef1YB2xmfhbT9OXFE3FXvh2UPBfN+ffE7iiayQf/2XR+8j4N4bW30DiPtOQLGUrH1y5X/rpNZNlWW2+jGIxqZtgWg7lTy3mXy5x836Sj/6L"), // Version: to.Ptr("12 SP1"), // }, // PartnerNodeID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/azureBareMetalInstances/myAzureBareMetalInstance1"), // PowerState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstancePowerStateEnumStarted), // ProvisioningState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalProvisioningStatesEnumSucceeded), // ProximityPlacementGroup: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myplacementgroup"), // StorageProfile: &armbaremetalinfrastructure.StorageProfile{ // NfsIPAddress: to.Ptr("200.200.200.201"), // }, // }, // SystemData: &armbaremetalinfrastructure.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-21T08:01:22.000Z"); return t}()), // CreatedBy: to.Ptr("user@microsoft.com"), // CreatedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-13T08:01:22.123Z"); return t}()), // LastModifiedBy: to.Ptr("user@microsoft.com"), // LastModifiedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*AzureBareMetalInstancesClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *AzureBareMetalInstancesClient) NewListBySubscriptionPager(options *AzureBareMetalInstancesClientListBySubscriptionOptions) *runtime.Pager[AzureBareMetalInstancesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties of each Azure BareMetal instance.
Generated from API version 2021-08-09
- options - AzureBareMetalInstancesClientListBySubscriptionOptions contains the optional parameters for the AzureBareMetalInstancesClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/baremetalinfrastructure/armbaremetalinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armbaremetalinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewAzureBareMetalInstancesClient().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.AzureBareMetalInstancesListResult = armbaremetalinfrastructure.AzureBareMetalInstancesListResult{ // Value: []*armbaremetalinfrastructure.AzureBareMetalInstance{ // { // Name: to.Ptr("myAzureBareMetalInstance1"), // Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalInstances"), // ID: to.Ptr("/subscriptions/57d3422f-467a-448e-b798-ebf490849542/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/myAzureBareMetalInstance1"), // Location: to.Ptr("westus2"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armbaremetalinfrastructure.AzureBareMetalInstanceProperties{ // AzureBareMetalInstanceID: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e1"), // HardwareProfile: &armbaremetalinfrastructure.HardwareProfile{ // AzureBareMetalInstanceSize: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstanceSizeNamesEnumS72), // HardwareType: to.Ptr(armbaremetalinfrastructure.AzureBareMetalHardwareTypeNamesEnumCiscoUCS), // }, // HwRevision: to.Ptr("Rev 4.2"), // NetworkProfile: &armbaremetalinfrastructure.NetworkProfile{ // CircuitID: to.Ptr("/subscriptions/57d3422f-467a-448e-b798-ebf490849542/resourceGroups/myResourceGroup/providers/Microsoft.Network/expressRouteCircuits/myCircuitId"), // NetworkInterfaces: []*armbaremetalinfrastructure.IPAddress{ // { // IPAddress: to.Ptr("123.123.123.123"), // }}, // }, // OSProfile: &armbaremetalinfrastructure.OSProfile{ // ComputerName: to.Ptr("myComputerName"), // OSType: to.Ptr("SLES 12 SP2"), // Version: to.Ptr("12 SP2"), // }, // PowerState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstancePowerStateEnumRestarting), // ProvisioningState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalProvisioningStatesEnumSucceeded), // StorageProfile: &armbaremetalinfrastructure.StorageProfile{ // NfsIPAddress: to.Ptr("123.123.119.123"), // }, // }, // SystemData: &armbaremetalinfrastructure.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-21T08:01:22.000Z"); return t}()), // CreatedBy: to.Ptr("user@microsoft.com"), // CreatedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-13T08:01:22.123Z"); return t}()), // LastModifiedBy: to.Ptr("user@microsoft.com"), // LastModifiedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // }, // }, // { // Name: to.Ptr("myAzureBareMetalInstance2"), // Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalInstances"), // ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/myAzureBareMetalInstance2"), // Location: to.Ptr("westus2"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armbaremetalinfrastructure.AzureBareMetalInstanceProperties{ // AzureBareMetalInstanceID: to.Ptr("589bce49-9fe6-4dc8-82df-cf6ae25e0cb9"), // HardwareProfile: &armbaremetalinfrastructure.HardwareProfile{ // AzureBareMetalInstanceSize: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstanceSizeNamesEnumS72), // HardwareType: to.Ptr(armbaremetalinfrastructure.AzureBareMetalHardwareTypeNamesEnumCiscoUCS), // }, // HwRevision: to.Ptr("Rev 4.2"), // NetworkProfile: &armbaremetalinfrastructure.NetworkProfile{ // CircuitID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Network/expressRouteCircuits/myCircuitId"), // NetworkInterfaces: []*armbaremetalinfrastructure.IPAddress{ // { // IPAddress: to.Ptr("123.123.123.123"), // }}, // }, // OSProfile: &armbaremetalinfrastructure.OSProfile{ // ComputerName: to.Ptr("myComputerName2"), // OSType: to.Ptr("SLES 12 SP2"), // Version: to.Ptr("12 SP2"), // }, // PowerState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstancePowerStateEnumRestarting), // ProvisioningState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalProvisioningStatesEnumSucceeded), // StorageProfile: &armbaremetalinfrastructure.StorageProfile{ // NfsIPAddress: to.Ptr("123.123.119.123"), // }, // }, // SystemData: &armbaremetalinfrastructure.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-21T08:01:22.000Z"); return t}()), // CreatedBy: to.Ptr("user@microsoft.com"), // CreatedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-13T08:01:22.123Z"); return t}()), // LastModifiedBy: to.Ptr("user@microsoft.com"), // LastModifiedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*AzureBareMetalInstancesClient) Update ¶
func (client *AzureBareMetalInstancesClient) Update(ctx context.Context, resourceGroupName string, azureBareMetalInstanceName string, tagsParameter Tags, options *AzureBareMetalInstancesClientUpdateOptions) (AzureBareMetalInstancesClientUpdateResponse, error)
Update - Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and instance name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-08-09
- resourceGroupName - The name of the resource group. The name is case insensitive.
- azureBareMetalInstanceName - Name of the Azure BareMetal on Azure instance.
- tagsParameter - Request body that only contains the new Tags field
- options - AzureBareMetalInstancesClientUpdateOptions contains the optional parameters for the AzureBareMetalInstancesClient.Update method.
Example (DeleteTagsFieldOfAnAzureBareMetalInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_PatchTags_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/baremetalinfrastructure/armbaremetalinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armbaremetalinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAzureBareMetalInstancesClient().Update(ctx, "myResourceGroup", "myABMInstance", armbaremetalinfrastructure.Tags{ Tags: map[string]*string{}, }, 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.AzureBareMetalInstance = armbaremetalinfrastructure.AzureBareMetalInstance{ // Name: to.Ptr("myABMInstance"), // Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalInstances"), // ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/myABMInstance"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // }, // Properties: &armbaremetalinfrastructure.AzureBareMetalInstanceProperties{ // AzureBareMetalInstanceID: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e1"), // HardwareProfile: &armbaremetalinfrastructure.HardwareProfile{ // AzureBareMetalInstanceSize: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstanceSizeNamesEnumS72), // HardwareType: to.Ptr(armbaremetalinfrastructure.AzureBareMetalHardwareTypeNamesEnumCiscoUCS), // }, // HwRevision: to.Ptr("Rev 3"), // NetworkProfile: &armbaremetalinfrastructure.NetworkProfile{ // CircuitID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Network/expressRouteCircuit"), // NetworkInterfaces: []*armbaremetalinfrastructure.IPAddress{ // { // IPAddress: to.Ptr("100.100.100.100"), // }}, // }, // OSProfile: &armbaremetalinfrastructure.OSProfile{ // ComputerName: to.Ptr("myComputerName"), // OSType: to.Ptr("SUSE"), // SSHPublicKey: to.Ptr("AAAAB3NzaC1yc2EAAAABJQAAAQB/nAmOjTmezNUDKYvEeIRf2YnwM9/uUG1d0BYsc8/tRtx+RGi7N2lUbp728MXGwdnL9od4cItzky/zVdLZE2cycOa18xBK9cOWmcKS0A8FYBxEQWJ/q9YVUgZbFKfYGaGQxsER+A0w/fX8ALuk78ktP31K69LcQgxIsl7rNzxsoOQKJ/CIxOGMMxczYTiEoLvQhapFQMs3FL96didKr/QbrfB1WT6s3838SEaXfgZvLef1YB2xmfhbT9OXFE3FXvh2UPBfN+ffE7iiayQf/2XR+8j4N4bW30DiPtOQLGUrH1y5X/rpNZNlWW2+jGIxqZtgWg7lTy3mXy5x836Sj/6L"), // Version: to.Ptr("12 SP1"), // }, // PartnerNodeID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/myABMInstance2"), // PowerState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstancePowerStateEnumStarted), // ProvisioningState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalProvisioningStatesEnumSucceeded), // ProximityPlacementGroup: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myplacementgroup"), // StorageProfile: &armbaremetalinfrastructure.StorageProfile{ // NfsIPAddress: to.Ptr("200.200.200.200"), // }, // }, // SystemData: &armbaremetalinfrastructure.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-20T23:10:22.682Z"); return t}()), // CreatedBy: to.Ptr("user@microsoft.com"), // CreatedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-21T08:01:22.000Z"); return t}()), // LastModifiedBy: to.Ptr("user@microsoft.com"), // LastModifiedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // }, // } }
Output:
Example (UpdateTagsFieldOfAnAzureBareMetalInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_PatchTags.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/baremetalinfrastructure/armbaremetalinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armbaremetalinfrastructure.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAzureBareMetalInstancesClient().Update(ctx, "myResourceGroup", "myABMInstance", armbaremetalinfrastructure.Tags{ Tags: map[string]*string{ "testkey": to.Ptr("testvalue"), }, }, 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.AzureBareMetalInstance = armbaremetalinfrastructure.AzureBareMetalInstance{ // Name: to.Ptr("myABMInstance"), // Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalInstances"), // ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/myABMInstance"), // Location: to.Ptr("westus"), // Tags: map[string]*string{ // "testkey": to.Ptr("testvalue"), // }, // Properties: &armbaremetalinfrastructure.AzureBareMetalInstanceProperties{ // AzureBareMetalInstanceID: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e1"), // HardwareProfile: &armbaremetalinfrastructure.HardwareProfile{ // AzureBareMetalInstanceSize: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstanceSizeNamesEnumS72), // HardwareType: to.Ptr(armbaremetalinfrastructure.AzureBareMetalHardwareTypeNamesEnumCiscoUCS), // }, // HwRevision: to.Ptr("Rev 3"), // NetworkProfile: &armbaremetalinfrastructure.NetworkProfile{ // CircuitID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Network/expressRouteCircuit"), // NetworkInterfaces: []*armbaremetalinfrastructure.IPAddress{ // { // IPAddress: to.Ptr("100.100.100.100"), // }}, // }, // OSProfile: &armbaremetalinfrastructure.OSProfile{ // ComputerName: to.Ptr("myComputerName"), // OSType: to.Ptr("SUSE"), // SSHPublicKey: to.Ptr("AAAAB3NzaC1yc2EAAAABJQAAAQB/nAmOjTmezNUDKYvEeIRf2YnwM9/uUG1d0BYsc8/tRtx+RGi7N2lUbp728MXGwdnL9od4cItzky/zVdLZE2cycOa18xBK9cOWmcKS0A8FYBxEQWJ/q9YVUgZbFKfYGaGQxsER+A0w/fX8ALuk78ktP31K69LcQgxIsl7rNzxsoOQKJ/CIxOGMMxczYTiEoLvQhapFQMs3FL96didKr/QbrfB1WT6s3838SEaXfgZvLef1YB2xmfhbT9OXFE3FXvh2UPBfN+ffE7iiayQf/2XR+8j4N4bW30DiPtOQLGUrH1y5X/rpNZNlWW2+jGIxqZtgWg7lTy3mXy5x836Sj/6L"), // Version: to.Ptr("12 SP1"), // }, // PartnerNodeID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/myABMInstance2"), // PowerState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalInstancePowerStateEnumStarted), // ProvisioningState: to.Ptr(armbaremetalinfrastructure.AzureBareMetalProvisioningStatesEnumSucceeded), // ProximityPlacementGroup: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myplacementgroup"), // StorageProfile: &armbaremetalinfrastructure.StorageProfile{ // NfsIPAddress: to.Ptr("200.200.200.200"), // }, // }, // SystemData: &armbaremetalinfrastructure.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-12-20T23:10:22.682Z"); return t}()), // CreatedBy: to.Ptr("user@microsoft.com"), // CreatedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-07-21T08:01:22.000Z"); return t}()), // LastModifiedBy: to.Ptr("user@microsoft.com"), // LastModifiedByType: to.Ptr(armbaremetalinfrastructure.CreatedByTypeUser), // }, // } }
Output:
type AzureBareMetalInstancesClientGetOptions ¶ added in v0.2.0
type AzureBareMetalInstancesClientGetOptions struct { }
AzureBareMetalInstancesClientGetOptions contains the optional parameters for the AzureBareMetalInstancesClient.Get method.
type AzureBareMetalInstancesClientGetResponse ¶ added in v0.2.0
type AzureBareMetalInstancesClientGetResponse struct { // AzureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties) AzureBareMetalInstance }
AzureBareMetalInstancesClientGetResponse contains the response from method AzureBareMetalInstancesClient.Get.
type AzureBareMetalInstancesClientListByResourceGroupOptions ¶ added in v0.2.0
type AzureBareMetalInstancesClientListByResourceGroupOptions struct { }
AzureBareMetalInstancesClientListByResourceGroupOptions contains the optional parameters for the AzureBareMetalInstancesClient.NewListByResourceGroupPager method.
type AzureBareMetalInstancesClientListByResourceGroupResponse ¶ added in v0.2.0
type AzureBareMetalInstancesClientListByResourceGroupResponse struct { // The response from the List AzureBareMetal Instances operation. AzureBareMetalInstancesListResult }
AzureBareMetalInstancesClientListByResourceGroupResponse contains the response from method AzureBareMetalInstancesClient.NewListByResourceGroupPager.
type AzureBareMetalInstancesClientListBySubscriptionOptions ¶ added in v0.2.0
type AzureBareMetalInstancesClientListBySubscriptionOptions struct { }
AzureBareMetalInstancesClientListBySubscriptionOptions contains the optional parameters for the AzureBareMetalInstancesClient.NewListBySubscriptionPager method.
type AzureBareMetalInstancesClientListBySubscriptionResponse ¶ added in v0.2.0
type AzureBareMetalInstancesClientListBySubscriptionResponse struct { // The response from the List AzureBareMetal Instances operation. AzureBareMetalInstancesListResult }
AzureBareMetalInstancesClientListBySubscriptionResponse contains the response from method AzureBareMetalInstancesClient.NewListBySubscriptionPager.
type AzureBareMetalInstancesClientUpdateOptions ¶ added in v0.2.0
type AzureBareMetalInstancesClientUpdateOptions struct { }
AzureBareMetalInstancesClientUpdateOptions contains the optional parameters for the AzureBareMetalInstancesClient.Update method.
type AzureBareMetalInstancesClientUpdateResponse ¶ added in v0.2.0
type AzureBareMetalInstancesClientUpdateResponse struct { // AzureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties) AzureBareMetalInstance }
AzureBareMetalInstancesClientUpdateResponse contains the response from method AzureBareMetalInstancesClient.Update.
type AzureBareMetalInstancesListResult ¶
type AzureBareMetalInstancesListResult struct { // The URL to get the next set of AzureBareMetal instances. NextLink *string // The list of Azure BareMetal instances. Value []*AzureBareMetalInstance }
AzureBareMetalInstancesListResult - The response from the List AzureBareMetal Instances operation.
func (AzureBareMetalInstancesListResult) MarshalJSON ¶
func (a AzureBareMetalInstancesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureBareMetalInstancesListResult.
func (*AzureBareMetalInstancesListResult) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureBareMetalInstancesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureBareMetalInstancesListResult.
type AzureBareMetalProvisioningStatesEnum ¶
type AzureBareMetalProvisioningStatesEnum string
AzureBareMetalProvisioningStatesEnum - State of provisioning of the AzureBareMetalInstance
const ( AzureBareMetalProvisioningStatesEnumAccepted AzureBareMetalProvisioningStatesEnum = "Accepted" AzureBareMetalProvisioningStatesEnumCreating AzureBareMetalProvisioningStatesEnum = "Creating" AzureBareMetalProvisioningStatesEnumDeleting AzureBareMetalProvisioningStatesEnum = "Deleting" AzureBareMetalProvisioningStatesEnumFailed AzureBareMetalProvisioningStatesEnum = "Failed" AzureBareMetalProvisioningStatesEnumMigrating AzureBareMetalProvisioningStatesEnum = "Migrating" AzureBareMetalProvisioningStatesEnumSucceeded AzureBareMetalProvisioningStatesEnum = "Succeeded" AzureBareMetalProvisioningStatesEnumUpdating AzureBareMetalProvisioningStatesEnum = "Updating" )
func PossibleAzureBareMetalProvisioningStatesEnumValues ¶
func PossibleAzureBareMetalProvisioningStatesEnumValues() []AzureBareMetalProvisioningStatesEnum
PossibleAzureBareMetalProvisioningStatesEnumValues returns the possible values for the AzureBareMetalProvisioningStatesEnum const type.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAzureBareMetalInstancesClient ¶ added in v1.1.0
func (c *ClientFactory) NewAzureBareMetalInstancesClient() *AzureBareMetalInstancesClient
NewAzureBareMetalInstancesClient creates a new instance of AzureBareMetalInstancesClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
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 Disk ¶
type Disk struct { // Specifies the size of an empty data disk in gigabytes. DiskSizeGB *int32 // The disk name. Name *string // READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM // and therefore must be unique for each data disk attached to a VM. Lun *int32 }
Disk - Specifies the disk information fo the AzureBareMetal instance
func (Disk) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Disk.
func (*Disk) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Disk.
type Display ¶
type Display struct { // READ-ONLY; The localized friendly description for the operation as shown to the user. Description *string // READ-ONLY; The localized friendly name for the operation as shown to the user. Operation *string // READ-ONLY; The localized friendly form of the resource provider name. Provider *string // READ-ONLY; The localized friendly form of the resource type related to this action/operation. Resource *string }
Display - Detailed BareMetal operation information
func (Display) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Display.
func (*Display) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Display.
type ErrorDefinition ¶
type ErrorDefinition struct { // READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. Code *string // READ-ONLY; Internal error details. Details []*ErrorDefinition // READ-ONLY; Description of the error. Message *string }
ErrorDefinition - Error definition.
func (ErrorDefinition) MarshalJSON ¶
func (e ErrorDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDefinition.
func (*ErrorDefinition) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDefinition.
type ErrorResponse ¶
type ErrorResponse struct { // The error details. Error *ErrorDefinition }
ErrorResponse - Error response.
func (ErrorResponse) MarshalJSON ¶ added in v1.1.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type HardwareProfile ¶
type HardwareProfile struct { // READ-ONLY; Specifies the AzureBareMetal instance SKU. AzureBareMetalInstanceSize *AzureBareMetalInstanceSizeNamesEnum // READ-ONLY; Name of the hardware type (vendor and/or their product name) HardwareType *AzureBareMetalHardwareTypeNamesEnum }
HardwareProfile - Specifies the hardware settings for the AzureBareMetal instance.
func (HardwareProfile) MarshalJSON ¶ added in v1.1.0
func (h HardwareProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HardwareProfile.
func (*HardwareProfile) UnmarshalJSON ¶ added in v1.1.0
func (h *HardwareProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HardwareProfile.
type IPAddress ¶
type IPAddress struct { // Specifies the IP address of the network interface. IPAddress *string }
IPAddress - Specifies the IP address of the network interface.
func (IPAddress) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type IPAddress.
func (*IPAddress) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type IPAddress.
type NetworkProfile ¶
type NetworkProfile struct { // Specifies the network interfaces for the AzureBareMetal instance. NetworkInterfaces []*IPAddress // READ-ONLY; Specifies the circuit id for connecting to express route. CircuitID *string }
NetworkProfile - Specifies the network settings for the AzureBareMetal instance disks.
func (NetworkProfile) MarshalJSON ¶
func (n NetworkProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkProfile.
func (*NetworkProfile) UnmarshalJSON ¶ added in v1.1.0
func (n *NetworkProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.
type OSProfile ¶
type OSProfile struct { // Specifies the host OS name of the AzureBareMetal instance. ComputerName *string // Specifies the SSH public key used to access the operating system. SSHPublicKey *string // READ-ONLY; This property allows you to specify the type of the OS. OSType *string // READ-ONLY; Specifies version of operating system. Version *string }
OSProfile - Specifies the operating system settings for the AzureBareMetal instance.
func (OSProfile) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type OSProfile.
func (*OSProfile) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type OSProfile.
type Operation ¶
type Operation struct { // Displayed AzureBareMetal operation information Display *Display // READ-ONLY; indicates whether an operation is a data action or not. IsDataAction *bool // READ-ONLY; The name of the operation being performed on this particular object. This name should match the action name // that appears in RBAC / the event service. Name *string }
Operation - AzureBareMetal operation information
func (Operation) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationList ¶
type OperationList struct { // List of AzureBareMetal operations Value []*Operation }
OperationList - List of AzureBareMetal operations
func (OperationList) MarshalJSON ¶
func (o OperationList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationList.
func (*OperationList) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.
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 ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Gets a list of AzureBareMetal management operations.
Generated from API version 2021-08-09
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalOperations_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/baremetalinfrastructure/armbaremetalinfrastructure" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armbaremetalinfrastructure.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.OperationList = armbaremetalinfrastructure.OperationList{ // Value: []*armbaremetalinfrastructure.Operation{ // { // Name: to.Ptr("AzureBareMetalOp1"), // Display: &armbaremetalinfrastructure.Display{ // Description: to.Ptr("AzureBareMetalOp1Description"), // Operation: to.Ptr("AzureBareMetalOp1OperationName"), // Provider: to.Ptr("AzureBareMetalOp1ProviderName"), // Resource: to.Ptr("AzureBareMetalOp1ResourceName"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("AzureBareMetalOp2"), // Display: &armbaremetalinfrastructure.Display{ // Description: to.Ptr("AzureBareMetalOp2Description"), // Operation: to.Ptr("AzureBareMetalOp2OperationName"), // Provider: to.Ptr("AzureBareMetalOp2ProviderName"), // Resource: to.Ptr("AzureBareMetalOp2ResourceName"), // }, // IsDataAction: to.Ptr(true), // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { // List of AzureBareMetal operations OperationList }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type Result ¶
type Result struct { // Sample property of type string SampleProperty *string }
Result - Sample result definition
func (Result) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Result.
func (*Result) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Result.
type StorageProfile ¶
type StorageProfile struct { // Specifies information about the operating system disk used by baremetal instance. OSDisks []*Disk // READ-ONLY; IP Address to connect to storage. NfsIPAddress *string }
StorageProfile - Specifies the storage settings for the AzureBareMetal instance disks.
func (StorageProfile) MarshalJSON ¶
func (s StorageProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfile.
func (*StorageProfile) UnmarshalJSON ¶ added in v1.1.0
func (s *StorageProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile.
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 Tags ¶
Tags field of the AzureBareMetal instance.
func (Tags) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Tags.
func (*Tags) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Tags.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v1.1.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.