armbaremetalinfrastructure

package module
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 14 Imported by: 0

README

Azure Bare Metal Infrastructure Module for Go

PkgGoDev

The armbaremetalinfrastructure module provides operations for working with Azure Bare Metal Infrastructure.

Source code

Getting started

Prerequisites

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

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Bare Metal Infrastructure module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/baremetalinfrastructure/armbaremetalinfrastructure

Authorization

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

cred, err := azidentity.NewDefaultAzureCredential(nil)

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

Client Factory

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

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

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

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

Clients

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

client := clientFactory.NewAzureBareMetalInstancesClient()

Fakes

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

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

Provide Feedback

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

Contributing

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

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

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

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

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

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type AsyncOperationStatus

type AsyncOperationStatus string

AsyncOperationStatus - Status of the operation.

const (
	AsyncOperationStatusExecuting  AsyncOperationStatus = "Executing"
	AsyncOperationStatusFailed     AsyncOperationStatus = "Failed"
	AsyncOperationStatusRequesting AsyncOperationStatus = "Requesting"
	AsyncOperationStatusSucceeded  AsyncOperationStatus = "Succeeded"
)

func PossibleAsyncOperationStatusValues

func PossibleAsyncOperationStatusValues() []AsyncOperationStatus

PossibleAsyncOperationStatusValues returns the possible values for the AsyncOperationStatus const type.

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"
	AzureBareMetalHardwareTypeNamesEnumSDFLEX   AzureBareMetalHardwareTypeNamesEnum = "SDFLEX"
)

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. 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
}

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

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBareMetalInstance.

type AzureBareMetalInstanceForcePowerState

type AzureBareMetalInstanceForcePowerState string

AzureBareMetalInstanceForcePowerState - Whether to force restart by shutting all processes.

const (
	AzureBareMetalInstanceForcePowerStateActive   AzureBareMetalInstanceForcePowerState = "active"
	AzureBareMetalInstanceForcePowerStateInactive AzureBareMetalInstanceForcePowerState = "inactive"
)

func PossibleAzureBareMetalInstanceForcePowerStateValues

func PossibleAzureBareMetalInstanceForcePowerStateValues() []AzureBareMetalInstanceForcePowerState

PossibleAzureBareMetalInstanceForcePowerStateValues returns the possible values for the AzureBareMetalInstanceForcePowerState const type.

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 Azure Bare Metal Instance.
	HardwareProfile *HardwareProfile

	// Specifies the network settings for the Azure Bare Metal Instance.
	NetworkProfile *NetworkProfile

	// Specifies the operating system settings for the Azure Bare Metal Instance.
	OSProfile *OSProfile

	// ARM ID of another AzureBareMetalInstance that will share a network with this AzureBareMetalInstance
	PartnerNodeID *string

	// Specifies the storage settings for the Azure Bare Metal Instance disks.
	StorageProfile *StorageProfile

	// READ-ONLY; Specifies the Azure Bare Metal Instance unique ID.
	AzureBareMetalInstanceID *string

	// READ-ONLY; Hardware revision of an Azure Bare Metal 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 Azure Bare Metal Instance.

func (AzureBareMetalInstanceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureBareMetalInstanceProperties.

func (*AzureBareMetalInstanceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBareMetalInstanceProperties.

type AzureBareMetalInstanceSizeNamesEnum

type AzureBareMetalInstanceSizeNamesEnum string

AzureBareMetalInstanceSizeNamesEnum - Specifies the Azure Bare Metal 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"
	AzureBareMetalInstanceSizeNamesEnumS448Se  AzureBareMetalInstanceSizeNamesEnum = "S448se"
	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. 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 (*AzureBareMetalInstancesClient) BeginRestart

BeginRestart - The operation to restart an Azure Bare Metal Instance If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalInstanceName - Name of the Azure Bare Metal Instance, also known as the ResourceName.
  • options - AzureBareMetalInstancesClientBeginRestartOptions contains the optional parameters for the AzureBareMetalInstancesClient.BeginRestart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalInstances_Restart.json

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)
}
poller, err := clientFactory.NewAzureBareMetalInstancesClient().BeginRestart(ctx, "myResourceGroup", "myABMInstance", &armbaremetalinfrastructure.AzureBareMetalInstancesClientBeginRestartOptions{ForceParameter: 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.OperationStatus = armbaremetalinfrastructure.OperationStatus{
// 	Name: to.Ptr("00000000-0000-0000-0000-0000000000001"),
// 	Error: &armbaremetalinfrastructure.OperationStatusError{
// 		Code: to.Ptr(""),
// 		Message: to.Ptr(""),
// 	},
// 	StartTime: to.Ptr("2023-08-01T21:17:24.9052926Z"),
// 	Status: to.Ptr(armbaremetalinfrastructure.AsyncOperationStatus("InProgress")),
// }
Output:

func (*AzureBareMetalInstancesClient) BeginShutdown

BeginShutdown - The operation to shutdown an Azure Bare Metal Instance If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalInstanceName - Name of the Azure Bare Metal Instance, also known as the ResourceName.
  • options - AzureBareMetalInstancesClientBeginShutdownOptions contains the optional parameters for the AzureBareMetalInstancesClient.BeginShutdown method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalInstances_Shutdown.json

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)
}
poller, err := clientFactory.NewAzureBareMetalInstancesClient().BeginShutdown(ctx, "myResourceGroup", "myABMInstance", 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.OperationStatus = armbaremetalinfrastructure.OperationStatus{
// 	Name: to.Ptr("00000000-0000-0000-0000-000000000001"),
// 	Error: &armbaremetalinfrastructure.OperationStatusError{
// 		Code: to.Ptr(""),
// 		Message: to.Ptr(""),
// 	},
// 	StartTime: to.Ptr("2023-08-01T21:17:24.9052926Z"),
// 	Status: to.Ptr(armbaremetalinfrastructure.AsyncOperationStatus("InProgress")),
// }
Output:

func (*AzureBareMetalInstancesClient) BeginStart

BeginStart - The operation to start an Azure Bare Metal instance If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalInstanceName - Name of the Azure Bare Metal Instance, also known as the ResourceName.
  • options - AzureBareMetalInstancesClientBeginStartOptions contains the optional parameters for the AzureBareMetalInstancesClient.BeginStart method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalInstances_Start.json

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)
}
poller, err := clientFactory.NewAzureBareMetalInstancesClient().BeginStart(ctx, "myResourceGroup", "myABMInstance", 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.OperationStatus = armbaremetalinfrastructure.OperationStatus{
// 	Name: to.Ptr("00000000-0000-0000-0000-000000000001"),
// 	Error: &armbaremetalinfrastructure.OperationStatusError{
// 		Code: to.Ptr(""),
// 		Message: to.Ptr(""),
// 	},
// 	StartTime: to.Ptr("2023-08-01T21:17:24.9052926Z"),
// 	Status: to.Ptr(armbaremetalinfrastructure.AsyncOperationStatus("InProgress")),
// }
Output:

func (*AzureBareMetalInstancesClient) Get

func (client *AzureBareMetalInstancesClient) Get(ctx context.Context, resourceGroupName string, azureBareMetalInstanceName string, options *AzureBareMetalInstancesClientGetOptions) (AzureBareMetalInstancesClientGetResponse, error)

Get - Gets an Azure Bare Metal Instance for the specified subscription, resource group, and instance name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalInstanceName - Name of the Azure Bare Metal Instance, also known as the ResourceName.
  • 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/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalInstances_Get.json

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"),
// 	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),
// 	},
// 	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.NetworkInterface{
// 				{
// 					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"),
// 		},
// 	},
// }
Output:

func (*AzureBareMetalInstancesClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Gets a list of Azure Bare Metal Instances in the specified subscription and resource group. The operations returns various properties of each Azure Bare Metal Instance.

Generated from API version 2023-08-04-preview

  • 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/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalInstances_ListByResourceGroup.json

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"),
	// 			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),
	// 			},
	// 			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.NetworkInterface{
	// 						{
	// 							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"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			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"),
	// 			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),
	// 			},
	// 			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.NetworkInterface{
	// 						{
	// 							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"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

func (*AzureBareMetalInstancesClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Returns a list of Azure Bare Metal Instances in the specified subscription. The operations returns various properties of each Azure Bare Metal Instance.

Generated from API version 2023-08-04-preview

  • 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/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalInstances_ListBySubscription.json

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"),
	// 			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),
	// 			},
	// 			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.NetworkInterface{
	// 						{
	// 							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"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			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"),
	// 			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),
	// 			},
	// 			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.NetworkInterface{
	// 						{
	// 							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"),
	// 				},
	// 			},
	// 	}},
	// }
}
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 Bare Metal Instance for the specified subscription, resource group, and instance name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalInstanceName - Name of the Azure Bare Metal Instance, also known as the ResourceName.
  • 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/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalInstances_PatchTags_Delete.json

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"),
// 	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),
// 	},
// 	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.NetworkInterface{
// 				{
// 					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"),
// 		},
// 	},
// }
Output:

Example (UpdateTagsFieldOfAnAzureBareMetalInstance)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalInstances_PatchTags.json

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"),
// 	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),
// 	},
// 	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.NetworkInterface{
// 				{
// 					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"),
// 		},
// 	},
// }
Output:

type AzureBareMetalInstancesClientBeginRestartOptions

type AzureBareMetalInstancesClientBeginRestartOptions struct {
	// When set to 'active', this parameter empowers the server with the ability to forcefully terminate and halt any existing
	// processes that may be running on the server
	ForceParameter *ForceState

	// Resumes the LRO from the provided token.
	ResumeToken string
}

AzureBareMetalInstancesClientBeginRestartOptions contains the optional parameters for the AzureBareMetalInstancesClient.BeginRestart method.

type AzureBareMetalInstancesClientBeginShutdownOptions

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

AzureBareMetalInstancesClientBeginShutdownOptions contains the optional parameters for the AzureBareMetalInstancesClient.BeginShutdown method.

type AzureBareMetalInstancesClientBeginStartOptions

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

AzureBareMetalInstancesClientBeginStartOptions contains the optional parameters for the AzureBareMetalInstancesClient.BeginStart method.

type AzureBareMetalInstancesClientGetOptions

type AzureBareMetalInstancesClientGetOptions struct {
}

AzureBareMetalInstancesClientGetOptions contains the optional parameters for the AzureBareMetalInstancesClient.Get method.

type AzureBareMetalInstancesClientGetResponse

type AzureBareMetalInstancesClientGetResponse struct {
	// AzureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties)
	AzureBareMetalInstance
}

AzureBareMetalInstancesClientGetResponse contains the response from method AzureBareMetalInstancesClient.Get.

type AzureBareMetalInstancesClientListByResourceGroupOptions

type AzureBareMetalInstancesClientListByResourceGroupOptions struct {
}

AzureBareMetalInstancesClientListByResourceGroupOptions contains the optional parameters for the AzureBareMetalInstancesClient.NewListByResourceGroupPager method.

type AzureBareMetalInstancesClientListByResourceGroupResponse

type AzureBareMetalInstancesClientListByResourceGroupResponse struct {
	// The response from the List Azure Bare Metal Instances operation.
	AzureBareMetalInstancesListResult
}

AzureBareMetalInstancesClientListByResourceGroupResponse contains the response from method AzureBareMetalInstancesClient.NewListByResourceGroupPager.

type AzureBareMetalInstancesClientListBySubscriptionOptions

type AzureBareMetalInstancesClientListBySubscriptionOptions struct {
}

AzureBareMetalInstancesClientListBySubscriptionOptions contains the optional parameters for the AzureBareMetalInstancesClient.NewListBySubscriptionPager method.

type AzureBareMetalInstancesClientListBySubscriptionResponse

type AzureBareMetalInstancesClientListBySubscriptionResponse struct {
	// The response from the List Azure Bare Metal Instances operation.
	AzureBareMetalInstancesListResult
}

AzureBareMetalInstancesClientListBySubscriptionResponse contains the response from method AzureBareMetalInstancesClient.NewListBySubscriptionPager.

type AzureBareMetalInstancesClientRestartResponse

type AzureBareMetalInstancesClientRestartResponse struct {
	// The OperationStatus object returns the state of an asynchronous operation.
	OperationStatus
}

AzureBareMetalInstancesClientRestartResponse contains the response from method AzureBareMetalInstancesClient.BeginRestart.

type AzureBareMetalInstancesClientShutdownResponse

type AzureBareMetalInstancesClientShutdownResponse struct {
	// The OperationStatus object returns the state of an asynchronous operation.
	OperationStatus
}

AzureBareMetalInstancesClientShutdownResponse contains the response from method AzureBareMetalInstancesClient.BeginShutdown.

type AzureBareMetalInstancesClientStartResponse

type AzureBareMetalInstancesClientStartResponse struct {
	// The OperationStatus object returns the state of an asynchronous operation.
	OperationStatus
}

AzureBareMetalInstancesClientStartResponse contains the response from method AzureBareMetalInstancesClient.BeginStart.

type AzureBareMetalInstancesClientUpdateOptions

type AzureBareMetalInstancesClientUpdateOptions struct {
}

AzureBareMetalInstancesClientUpdateOptions contains the optional parameters for the AzureBareMetalInstancesClient.Update method.

type AzureBareMetalInstancesClientUpdateResponse

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 Azure Bare Metal Instances.
	NextLink *string

	// The list of Azure Bare Metal Instances.
	Value []*AzureBareMetalInstance
}

AzureBareMetalInstancesListResult - The response from the List Azure Bare Metal Instances operation.

func (AzureBareMetalInstancesListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureBareMetalInstancesListResult.

func (*AzureBareMetalInstancesListResult) UnmarshalJSON

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 AzureBareMetalStorageInstance

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

	// AzureBareMetalStorageInstance properties
	Properties *AzureBareMetalStorageInstanceProperties

	// 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
}

AzureBareMetalStorageInstance info on Azure (ARM properties and AzureBareMetalStorage properties)

func (AzureBareMetalStorageInstance) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureBareMetalStorageInstance.

func (*AzureBareMetalStorageInstance) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBareMetalStorageInstance.

type AzureBareMetalStorageInstanceProperties

type AzureBareMetalStorageInstanceProperties struct {
	// Specifies the AzureBareMetaStorageInstance unique ID.
	AzureBareMetalStorageInstanceUniqueIdentifier *string

	// Specifies the storage properties for the AzureBareMetalStorage instance.
	StorageProperties *StorageProperties
}

AzureBareMetalStorageInstanceProperties - Describes the properties of an AzureBareMetalStorageInstance.

func (AzureBareMetalStorageInstanceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type AzureBareMetalStorageInstanceProperties.

func (*AzureBareMetalStorageInstanceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBareMetalStorageInstanceProperties.

type AzureBareMetalStorageInstancesClient

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

AzureBareMetalStorageInstancesClient contains the methods for the AzureBareMetalStorageInstances group. Don't use this type directly, use NewAzureBareMetalStorageInstancesClient() instead.

func NewAzureBareMetalStorageInstancesClient

func NewAzureBareMetalStorageInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureBareMetalStorageInstancesClient, error)

NewAzureBareMetalStorageInstancesClient creates a new instance of AzureBareMetalStorageInstancesClient 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 (*AzureBareMetalStorageInstancesClient) Create

Create - Create an azure bare metal storage resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalStorageInstanceName - Name of the Azure Bare Metal Storage Instance, also known as the ResourceName.
  • requestBodyParameters - request body for put call
  • options - AzureBareMetalStorageInstancesClientCreateOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalStorageInstances_Create.json

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.NewAzureBareMetalStorageInstancesClient().Create(ctx, "myResourceGroup", "myAzureBareMetalStorageInstance", armbaremetalinfrastructure.AzureBareMetalStorageInstance{
	Location: to.Ptr("westus2"),
	Tags: map[string]*string{
		"key": to.Ptr("value"),
	},
	Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
		AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e9"),
		StorageProperties: &armbaremetalinfrastructure.StorageProperties{
			Generation:        to.Ptr("Gen4"),
			HardwareType:      to.Ptr("NetApp"),
			OfferingType:      to.Ptr("EPIC"),
			ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
			StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
				AzureBareMetalStorageInstanceSize: to.Ptr(""),
				BillingMode:                       to.Ptr("PAYG"),
			},
			StorageType:  to.Ptr("FC"),
			WorkloadType: to.Ptr("ODB"),
		},
	},
}, 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.AzureBareMetalStorageInstance = armbaremetalinfrastructure.AzureBareMetalStorageInstance{
// 	Name: to.Ptr("myAzureBareMetalStorageInstance"),
// 	Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalStorageInstances"),
// 	ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalStorageInstances/myAzureBareMetalStorageInstance"),
// 	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),
// 	},
// 	Location: to.Ptr("westus2"),
// 	Tags: map[string]*string{
// 		"key": to.Ptr("value"),
// 	},
// 	Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
// 		AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e9"),
// 		StorageProperties: &armbaremetalinfrastructure.StorageProperties{
// 			Generation: to.Ptr("Gen4"),
// 			HardwareType: to.Ptr("NetApp"),
// 			OfferingType: to.Ptr("EPIC"),
// 			ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
// 			StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
// 				AzureBareMetalStorageInstanceSize: to.Ptr(""),
// 				BillingMode: to.Ptr("PAYG"),
// 			},
// 			StorageType: to.Ptr("FC"),
// 			WorkloadType: to.Ptr("ODB"),
// 		},
// 	},
// }
Output:

func (*AzureBareMetalStorageInstancesClient) Delete

Delete - Delete an AzureBareMetalStorageInstance. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalStorageInstanceName - Name of the Azure Bare Metal Storage Instance, also known as the ResourceName.
  • options - AzureBareMetalStorageInstancesClientDeleteOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalStorageInstances_Delete.json

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)
}
_, err = clientFactory.NewAzureBareMetalStorageInstancesClient().Delete(ctx, "myResourceGroup", "myAzureBareMetalStorageInstance", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*AzureBareMetalStorageInstancesClient) Get

Get - Gets an Azure Bare Metal Storage instance for the specified subscription, resource group, and instance name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalStorageInstanceName - Name of the Azure Bare Metal Storage Instance, also known as the ResourceName.
  • options - AzureBareMetalStorageInstancesClientGetOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalStorageInstances_Get.json

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.NewAzureBareMetalStorageInstancesClient().Get(ctx, "myResourceGroup", "myAzureBareMetalStorageInstance", 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.AzureBareMetalStorageInstance = armbaremetalinfrastructure.AzureBareMetalStorageInstance{
// 	Name: to.Ptr("myAzureBareMetalStorageInstance"),
// 	Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalStorageInstances"),
// 	ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalStorageInstances/myAzureBareMetalStorageInstance"),
// 	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),
// 	},
// 	Location: to.Ptr("westus2"),
// 	Tags: map[string]*string{
// 		"key": to.Ptr("value"),
// 	},
// 	Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
// 		AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e9"),
// 		StorageProperties: &armbaremetalinfrastructure.StorageProperties{
// 			Generation: to.Ptr("Gen4"),
// 			HardwareType: to.Ptr("NetApp"),
// 			OfferingType: to.Ptr("EPIC"),
// 			ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
// 			StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
// 				AzureBareMetalStorageInstanceSize: to.Ptr(""),
// 				BillingMode: to.Ptr("PAYG"),
// 			},
// 			StorageType: to.Ptr("FC"),
// 			WorkloadType: to.Ptr("ODB"),
// 		},
// 	},
// }
Output:

func (*AzureBareMetalStorageInstancesClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Gets a list of AzureBareMetalStorage instances in the specified subscription and resource group. The operations returns various properties of each Azure Bare Metal Instance.

Generated from API version 2023-08-04-preview

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalStorageInstances_ListByResourceGroup.json

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.NewAzureBareMetalStorageInstancesClient().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.AzureBareMetalStorageInstancesListResult = armbaremetalinfrastructure.AzureBareMetalStorageInstancesListResult{
	// 	Value: []*armbaremetalinfrastructure.AzureBareMetalStorageInstance{
	// 		{
	// 			Name: to.Ptr("myAzureBareMetalStorageInstance1"),
	// 			Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalStorageInstances"),
	// 			ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalStorageInstances/myAzureBareMetalStorageInstance1"),
	// 			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),
	// 			},
	// 			Location: to.Ptr("westus2"),
	// 			Tags: map[string]*string{
	// 				"key": to.Ptr("value"),
	// 			},
	// 			Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
	// 				AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e9"),
	// 				StorageProperties: &armbaremetalinfrastructure.StorageProperties{
	// 					Generation: to.Ptr("Gen4"),
	// 					HardwareType: to.Ptr("NetApp"),
	// 					OfferingType: to.Ptr("EPIC"),
	// 					ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
	// 					StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
	// 						AzureBareMetalStorageInstanceSize: to.Ptr(""),
	// 						BillingMode: to.Ptr("PAYG"),
	// 					},
	// 					StorageType: to.Ptr("FC"),
	// 					WorkloadType: to.Ptr("ODB"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("myAzureBareMetalStorageInstance2"),
	// 			Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalStorageInstances"),
	// 			ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalStorageInstances/myAzureBareMetalStorageInstance2"),
	// 			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),
	// 			},
	// 			Location: to.Ptr("westus2"),
	// 			Tags: map[string]*string{
	// 				"key": to.Ptr("value"),
	// 			},
	// 			Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
	// 				AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24f7"),
	// 				StorageProperties: &armbaremetalinfrastructure.StorageProperties{
	// 					Generation: to.Ptr("Gen4"),
	// 					HardwareType: to.Ptr("NetApp"),
	// 					OfferingType: to.Ptr("EPIC"),
	// 					ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
	// 					StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
	// 						AzureBareMetalStorageInstanceSize: to.Ptr(""),
	// 						BillingMode: to.Ptr("RI"),
	// 					},
	// 					StorageType: to.Ptr("NFS"),
	// 					WorkloadType: to.Ptr("Cogito"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

func (*AzureBareMetalStorageInstancesClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Gets a list of AzureBareMetalStorage instances in the specified subscription. The operations returns various properties of each Azure Bare Metal Instance.

Generated from API version 2023-08-04-preview

  • options - AzureBareMetalStorageInstancesClientListBySubscriptionOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalStorageInstances_ListBySubscription.json

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.NewAzureBareMetalStorageInstancesClient().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.AzureBareMetalStorageInstancesListResult = armbaremetalinfrastructure.AzureBareMetalStorageInstancesListResult{
	// 	Value: []*armbaremetalinfrastructure.AzureBareMetalStorageInstance{
	// 		{
	// 			Name: to.Ptr("myAzureBareMetalStorageInstance1"),
	// 			Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalStorageInstances"),
	// 			ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalStorageInstances/myAzureBareMetalStorageInstance1"),
	// 			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),
	// 			},
	// 			Location: to.Ptr("westus2"),
	// 			Tags: map[string]*string{
	// 				"key": to.Ptr("value"),
	// 			},
	// 			Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
	// 				AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e9"),
	// 				StorageProperties: &armbaremetalinfrastructure.StorageProperties{
	// 					Generation: to.Ptr("Gen4"),
	// 					HardwareType: to.Ptr("NetApp"),
	// 					OfferingType: to.Ptr("EPIC"),
	// 					ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
	// 					StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
	// 						AzureBareMetalStorageInstanceSize: to.Ptr(""),
	// 						BillingMode: to.Ptr("PAYG"),
	// 					},
	// 					StorageType: to.Ptr("FC"),
	// 					WorkloadType: to.Ptr("ODB"),
	// 				},
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("myAzureBareMetalStorageInstance2"),
	// 			Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalStorageInstances"),
	// 			ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalStorageInstances/myAzureBareMetalStorageInstance2"),
	// 			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),
	// 			},
	// 			Location: to.Ptr("westus2"),
	// 			Tags: map[string]*string{
	// 				"key": to.Ptr("value"),
	// 			},
	// 			Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
	// 				AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24f7"),
	// 				StorageProperties: &armbaremetalinfrastructure.StorageProperties{
	// 					Generation: to.Ptr("Gen4"),
	// 					HardwareType: to.Ptr("NetApp"),
	// 					OfferingType: to.Ptr("EPIC"),
	// 					ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
	// 					StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
	// 						AzureBareMetalStorageInstanceSize: to.Ptr(""),
	// 						BillingMode: to.Ptr("RI"),
	// 					},
	// 					StorageType: to.Ptr("NFS"),
	// 					WorkloadType: to.Ptr("Cogito"),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

func (*AzureBareMetalStorageInstancesClient) Update

func (client *AzureBareMetalStorageInstancesClient) Update(ctx context.Context, resourceGroupName string, azureBareMetalStorageInstanceName string, tagsParameter Tags, options *AzureBareMetalStorageInstancesClientUpdateOptions) (AzureBareMetalStorageInstancesClientUpdateResponse, error)

Update - Patches the Tags field of a Azure Bare Metal Storage instance for the specified subscription, resource group, and instance name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-08-04-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • azureBareMetalStorageInstanceName - Name of the Azure Bare Metal Storage Instance, also known as the ResourceName.
  • tagsParameter - Request body that only contains the new Tags field
  • options - AzureBareMetalStorageInstancesClientUpdateOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.Update method.
Example (DeleteTagsFieldOfAnAzureBareMetalStorageInstance)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalStorageInstances_PatchTags_Delete.json

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.NewAzureBareMetalStorageInstancesClient().Update(ctx, "myResourceGroup", "myABMSInstance", 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.AzureBareMetalStorageInstance = armbaremetalinfrastructure.AzureBareMetalStorageInstance{
// 	Name: to.Ptr("myAzureBareMetalStorageInstance"),
// 	Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalStorageInstances"),
// 	ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalStorageInstances/myAzureBareMetalStorageInstance"),
// 	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),
// 	},
// 	Location: to.Ptr("westus2"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
// 		AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e9"),
// 		StorageProperties: &armbaremetalinfrastructure.StorageProperties{
// 			Generation: to.Ptr("Gen4"),
// 			HardwareType: to.Ptr("NetApp"),
// 			OfferingType: to.Ptr("EPIC"),
// 			ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
// 			StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
// 				AzureBareMetalStorageInstanceSize: to.Ptr(""),
// 				BillingMode: to.Ptr("PAYG"),
// 			},
// 			StorageType: to.Ptr("FC"),
// 			WorkloadType: to.Ptr("ODB"),
// 		},
// 	},
// }
Output:

Example (UpdateTagsFieldOfAnAzureBareMetalStorageInstance)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalStorageInstances_PatchTags.json

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.NewAzureBareMetalStorageInstancesClient().Update(ctx, "myResourceGroup", "myABMSInstance", 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.AzureBareMetalStorageInstance = armbaremetalinfrastructure.AzureBareMetalStorageInstance{
// 	Name: to.Ptr("myAzureBareMetalStorageInstance"),
// 	Type: to.Ptr("Microsoft.BareMetalInfrastructure/bareMetalStorageInstances"),
// 	ID: to.Ptr("/subscriptions/f0f4887f-d13c-4943-a8ba-d7da28d2a3fd/resourceGroups/myResourceGroup/providers/Microsoft.BareMetalInfrastructure/bareMetalStorageInstances/myAzureBareMetalStorageInstance"),
// 	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),
// 	},
// 	Location: to.Ptr("westus2"),
// 	Tags: map[string]*string{
// 		"testkey": to.Ptr("testvalue"),
// 	},
// 	Properties: &armbaremetalinfrastructure.AzureBareMetalStorageInstanceProperties{
// 		AzureBareMetalStorageInstanceUniqueIdentifier: to.Ptr("23415635-4d7e-41dc-9598-8194f22c24e9"),
// 		StorageProperties: &armbaremetalinfrastructure.StorageProperties{
// 			Generation: to.Ptr("Gen4"),
// 			HardwareType: to.Ptr("NetApp"),
// 			OfferingType: to.Ptr("EPIC"),
// 			ProvisioningState: to.Ptr(armbaremetalinfrastructure.ProvisioningStateSucceeded),
// 			StorageBillingProperties: &armbaremetalinfrastructure.StorageBillingProperties{
// 				AzureBareMetalStorageInstanceSize: to.Ptr(""),
// 				BillingMode: to.Ptr("PAYG"),
// 			},
// 			StorageType: to.Ptr("FC"),
// 			WorkloadType: to.Ptr("ODB"),
// 		},
// 	},
// }
Output:

type AzureBareMetalStorageInstancesClientCreateOptions

type AzureBareMetalStorageInstancesClientCreateOptions struct {
}

AzureBareMetalStorageInstancesClientCreateOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.Create method.

type AzureBareMetalStorageInstancesClientCreateResponse

type AzureBareMetalStorageInstancesClientCreateResponse struct {
	// AzureBareMetalStorageInstance info on Azure (ARM properties and AzureBareMetalStorage properties)
	AzureBareMetalStorageInstance
}

AzureBareMetalStorageInstancesClientCreateResponse contains the response from method AzureBareMetalStorageInstancesClient.Create.

type AzureBareMetalStorageInstancesClientDeleteOptions

type AzureBareMetalStorageInstancesClientDeleteOptions struct {
}

AzureBareMetalStorageInstancesClientDeleteOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.Delete method.

type AzureBareMetalStorageInstancesClientDeleteResponse

type AzureBareMetalStorageInstancesClientDeleteResponse struct {
}

AzureBareMetalStorageInstancesClientDeleteResponse contains the response from method AzureBareMetalStorageInstancesClient.Delete.

type AzureBareMetalStorageInstancesClientGetOptions

type AzureBareMetalStorageInstancesClientGetOptions struct {
}

AzureBareMetalStorageInstancesClientGetOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.Get method.

type AzureBareMetalStorageInstancesClientGetResponse

type AzureBareMetalStorageInstancesClientGetResponse struct {
	// AzureBareMetalStorageInstance info on Azure (ARM properties and AzureBareMetalStorage properties)
	AzureBareMetalStorageInstance
}

AzureBareMetalStorageInstancesClientGetResponse contains the response from method AzureBareMetalStorageInstancesClient.Get.

type AzureBareMetalStorageInstancesClientListByResourceGroupOptions

type AzureBareMetalStorageInstancesClientListByResourceGroupOptions struct {
}

AzureBareMetalStorageInstancesClientListByResourceGroupOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.NewListByResourceGroupPager method.

type AzureBareMetalStorageInstancesClientListByResourceGroupResponse

type AzureBareMetalStorageInstancesClientListByResourceGroupResponse struct {
	// The response from the Get AzureBareMetalStorageInstances operation.
	AzureBareMetalStorageInstancesListResult
}

AzureBareMetalStorageInstancesClientListByResourceGroupResponse contains the response from method AzureBareMetalStorageInstancesClient.NewListByResourceGroupPager.

type AzureBareMetalStorageInstancesClientListBySubscriptionOptions

type AzureBareMetalStorageInstancesClientListBySubscriptionOptions struct {
}

AzureBareMetalStorageInstancesClientListBySubscriptionOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.NewListBySubscriptionPager method.

type AzureBareMetalStorageInstancesClientListBySubscriptionResponse

type AzureBareMetalStorageInstancesClientListBySubscriptionResponse struct {
	// The response from the Get AzureBareMetalStorageInstances operation.
	AzureBareMetalStorageInstancesListResult
}

AzureBareMetalStorageInstancesClientListBySubscriptionResponse contains the response from method AzureBareMetalStorageInstancesClient.NewListBySubscriptionPager.

type AzureBareMetalStorageInstancesClientUpdateOptions

type AzureBareMetalStorageInstancesClientUpdateOptions struct {
}

AzureBareMetalStorageInstancesClientUpdateOptions contains the optional parameters for the AzureBareMetalStorageInstancesClient.Update method.

type AzureBareMetalStorageInstancesClientUpdateResponse

type AzureBareMetalStorageInstancesClientUpdateResponse struct {
	// AzureBareMetalStorageInstance info on Azure (ARM properties and AzureBareMetalStorage properties)
	AzureBareMetalStorageInstance
}

AzureBareMetalStorageInstancesClientUpdateResponse contains the response from method AzureBareMetalStorageInstancesClient.Update.

type AzureBareMetalStorageInstancesListResult

type AzureBareMetalStorageInstancesListResult struct {
	// The URL to get the next set of AzureBareMetalStorage instances.
	NextLink *string

	// The list of AzureBareMetalStorage instances.
	Value []*AzureBareMetalStorageInstance
}

AzureBareMetalStorageInstancesListResult - The response from the Get AzureBareMetalStorageInstances operation.

func (AzureBareMetalStorageInstancesListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type AzureBareMetalStorageInstancesListResult.

func (*AzureBareMetalStorageInstancesListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureBareMetalStorageInstancesListResult.

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) NewAzureBareMetalInstancesClient

func (c *ClientFactory) NewAzureBareMetalInstancesClient() *AzureBareMetalInstancesClient

NewAzureBareMetalInstancesClient creates a new instance of AzureBareMetalInstancesClient.

func (*ClientFactory) NewAzureBareMetalStorageInstancesClient

func (c *ClientFactory) NewAzureBareMetalStorageInstancesClient() *AzureBareMetalStorageInstancesClient

NewAzureBareMetalStorageInstancesClient creates a new instance of AzureBareMetalStorageInstancesClient.

func (*ClientFactory) NewOperationsClient

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 Azure Bare Metal Instance

func (Disk) MarshalJSON

func (d Disk) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Disk.

func (*Disk) UnmarshalJSON

func (d *Disk) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Disk.

type ForceState

type ForceState struct {
	// Whether to force restart by shutting all processes.
	ForceState *AzureBareMetalInstanceForcePowerState
}

ForceState - The active state empowers the server with the ability to forcefully terminate and halt any existing processes that may be running on the server

func (ForceState) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ForceState.

func (*ForceState) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ForceState.

type HardwareProfile

type HardwareProfile struct {
	// READ-ONLY; Specifies the Azure Bare Metal 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 Azure Bare Metal Instance.

func (HardwareProfile) MarshalJSON

func (h HardwareProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type HardwareProfile.

func (*HardwareProfile) UnmarshalJSON

func (h *HardwareProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type HardwareProfile.

type NetworkInterface

type NetworkInterface struct {
	// Specifies the IP address of the network interface.
	IPAddress *string
}

NetworkInterface - Specifies the network interfaces of a bare metal resource.

func (NetworkInterface) MarshalJSON

func (n NetworkInterface) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkInterface.

func (*NetworkInterface) UnmarshalJSON

func (n *NetworkInterface) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterface.

type NetworkProfile

type NetworkProfile struct {
	// Specifies the network interfaces for the Azure Bare Metal Instance.
	NetworkInterfaces []*NetworkInterface

	// READ-ONLY; Specifies the circuit id for connecting to express route.
	CircuitID *string
}

NetworkProfile - Specifies the network settings for the Azure Bare Metal Instance disks.

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 OSProfile

type OSProfile struct {
	// Specifies the host OS name of the Azure Bare Metal 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 Azure Bare Metal instance.

func (OSProfile) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OSProfile.

func (*OSProfile) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OSProfile.

type Operation

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

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

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

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

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

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

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

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

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

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

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

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

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

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

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

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationStatus

type OperationStatus struct {
	// An error from the Azure Bare Metal Infrastructure service.
	Error *OperationStatusError

	// Unique Operation Status Identifier.
	Name *string

	// Start Time when the operation was initially executed.
	StartTime *string

	// Status of the operation.
	Status *AsyncOperationStatus
}

OperationStatus - The OperationStatus object returns the state of an asynchronous operation.

func (OperationStatus) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationStatus.

func (*OperationStatus) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatus.

type OperationStatusError

type OperationStatusError struct {
	// Server-defined set of error codes.
	Code *string

	// Human-readable representation of the error.
	Message *string
}

OperationStatusError - An error from the Azure Bare Metal Infrastructure service.

func (OperationStatusError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationStatusError.

func (*OperationStatusError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusError.

type OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager

NewListPager - Gets a list of AzureBareMetal management operations.

Generated from API version 2023-08-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/90115af9fda46f323e5c42c274f2b376108d1d47/specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/preview/2023-08-04-preview/examples/AzureBareMetalOperations_List.json

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.OperationListResult = armbaremetalinfrastructure.OperationListResult{
	// 	Value: []*armbaremetalinfrastructure.Operation{
	// 		{
	// 			Name: to.Ptr("AzureBareMetalOp1"),
	// 			Display: &armbaremetalinfrastructure.OperationDisplay{
	// 				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.OperationDisplay{
	// 				Description: to.Ptr("AzureBareMetalOp2Description"),
	// 				Operation: to.Ptr("AzureBareMetalOp2OperationName"),
	// 				Provider: to.Ptr("AzureBareMetalOp2ProviderName"),
	// 				Resource: to.Ptr("AzureBareMetalOp2ResourceName"),
	// 			},
	// 			IsDataAction: to.Ptr(true),
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

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

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

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

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

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - State of provisioning of the AzureBareMetalStorageInstance

const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateMigrating ProvisioningState = "Migrating"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type StorageBillingProperties

type StorageBillingProperties struct {
	// the SKU type that is provisioned
	AzureBareMetalStorageInstanceSize *string

	// the billing mode for the storage instance
	BillingMode *string
}

StorageBillingProperties - Describes the billing related details of the AzureBareMetalStorageInstance.

func (StorageBillingProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StorageBillingProperties.

func (*StorageBillingProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageBillingProperties.

type StorageProfile

type StorageProfile struct {
	// Specifies information about the operating system disk used by bare metal instance.
	OSDisks []*Disk

	// READ-ONLY; IP Address to connect to storage.
	NfsIPAddress *string
}

StorageProfile - Specifies the storage settings for the Azure Bare Metal instance disks.

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 StorageProperties

type StorageProperties struct {
	// the kind of storage instance
	Generation *string

	// the hardware type of the storage instance
	HardwareType *string

	// the offering type for which the resource is getting provisioned
	OfferingType *string

	// State of provisioning of the AzureBareMetalStorageInstance
	ProvisioningState *ProvisioningState

	// the billing related information for the resource
	StorageBillingProperties *StorageBillingProperties

	// the storage protocol for which the resource is getting provisioned
	StorageType *string

	// the workload for which the resource is getting provisioned
	WorkloadType *string
}

StorageProperties - described the storage properties of the azure bare metal storage instance

func (StorageProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type StorageProperties.

func (*StorageProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type StorageProperties.

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

type Tags struct {
	// Tags field of the AzureBareMetal/AzureBareMetaStorage instance.
	Tags map[string]*string
}

Tags field of the AzureBareMetal/AzureBareMetaStorage instance.

func (Tags) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Tags.

func (*Tags) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Tags.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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