armhardwaresecuritymodules

package module
v2.0.0-...-47e5839 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 16 Imported by: 0

README

Azure Dedicated HSM Module for Go

PkgGoDev

The armhardwaresecuritymodules module provides operations for working with Azure Dedicated HSM.

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 Dedicated HSM module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hardwaresecuritymodules/armhardwaresecuritymodules/v2

Authorization

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

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 Dedicated HSM 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 APIEntityReference

type APIEntityReference struct {
	// The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/…
	ID *string
}

APIEntityReference - The API entity reference.

func (APIEntityReference) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type APIEntityReference.

func (*APIEntityReference) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type APIEntityReference.

type BackupProperties

type BackupProperties struct {
	// Azure storage Resource Uri
	AzureStorageResourceURI *string

	// READ-ONLY; Last Date Time that Customer Enabled Backup was taken
	LastBackupDateTime *time.Time

	// READ-ONLY; Status of last backup
	LastBackupStatus *string
}

BackupProperties - Cloud Hsm Cluster backup information

func (BackupProperties) MarshalJSON

func (b BackupProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type BackupProperties.

func (*BackupProperties) UnmarshalJSON

func (b *BackupProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type BackupProperties.

type CHsmError

type CHsmError struct {
	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error message.
	Message *string
}

CHsmError - Error details

func (CHsmError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CHsmError.

func (*CHsmError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CHsmError.

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

func (c *ClientFactory) NewCloudHsmClusterPrivateEndpointConnectionsClient() *CloudHsmClusterPrivateEndpointConnectionsClient

NewCloudHsmClusterPrivateEndpointConnectionsClient creates a new instance of CloudHsmClusterPrivateEndpointConnectionsClient.

func (*ClientFactory) NewCloudHsmClusterPrivateLinkResourcesClient

func (c *ClientFactory) NewCloudHsmClusterPrivateLinkResourcesClient() *CloudHsmClusterPrivateLinkResourcesClient

NewCloudHsmClusterPrivateLinkResourcesClient creates a new instance of CloudHsmClusterPrivateLinkResourcesClient.

func (*ClientFactory) NewCloudHsmClustersClient

func (c *ClientFactory) NewCloudHsmClustersClient() *CloudHsmClustersClient

NewCloudHsmClustersClient creates a new instance of CloudHsmClustersClient.

func (*ClientFactory) NewDedicatedHsmClient

func (c *ClientFactory) NewDedicatedHsmClient() *DedicatedHsmClient

NewDedicatedHsmClient creates a new instance of DedicatedHsmClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

type CloudHsmCluster

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

	// Managed service identity (system assigned and/or user assigned identities)
	Identity *ManagedServiceIdentity

	// Properties of the Cloud HSM Cluster
	Properties *CloudHsmClusterProperties

	// SKU details
	SKU *CloudHsmClusterSKU

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

CloudHsmCluster - Resource information with extended details.

func (CloudHsmCluster) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmCluster.

func (*CloudHsmCluster) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmCluster.

type CloudHsmClusterError

type CloudHsmClusterError struct {
	// Error details
	Error *CHsmError
}

CloudHsmClusterError - The Cloud HSM Cluster error details

func (CloudHsmClusterError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmClusterError.

func (*CloudHsmClusterError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmClusterError.

type CloudHsmClusterListResult

type CloudHsmClusterListResult struct {
	// The URL to get the next set of Cloud HSM Clusters.
	NextLink *string

	// The list of Cloud HSM Clusters.
	Value []*CloudHsmCluster
}

CloudHsmClusterListResult - List of Cloud HSM Clusters

func (CloudHsmClusterListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmClusterListResult.

func (*CloudHsmClusterListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmClusterListResult.

type CloudHsmClusterPatchParameters

type CloudHsmClusterPatchParameters struct {
	// Managed service identity (system assigned and/or user assigned identities)
	Identity *ManagedServiceIdentity

	// Properties of the Cloud HSM Cluster
	Properties *CloudHsmClusterPatchParametersProperties

	// SKU details
	SKU *CloudHsmClusterSKU

	// The Cloud HSM Cluster's tags
	Tags map[string]*string
}

CloudHsmClusterPatchParameters - Patchable properties of the Cloud HSM Cluster

func (CloudHsmClusterPatchParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmClusterPatchParameters.

func (*CloudHsmClusterPatchParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmClusterPatchParameters.

type CloudHsmClusterPatchParametersProperties

type CloudHsmClusterPatchParametersProperties struct {
	// Cloud Hsm Cluster backup information
	BackupProperties *BackupProperties
}

CloudHsmClusterPatchParametersProperties - Properties of the Cloud HSM Cluster

func (CloudHsmClusterPatchParametersProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type CloudHsmClusterPatchParametersProperties.

func (*CloudHsmClusterPatchParametersProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmClusterPatchParametersProperties.

type CloudHsmClusterPrivateEndpointConnectionsClient

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

CloudHsmClusterPrivateEndpointConnectionsClient contains the methods for the CloudHsmClusterPrivateEndpointConnections group. Don't use this type directly, use NewCloudHsmClusterPrivateEndpointConnectionsClient() instead.

func NewCloudHsmClusterPrivateEndpointConnectionsClient

func NewCloudHsmClusterPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudHsmClusterPrivateEndpointConnectionsClient, error)

NewCloudHsmClusterPrivateEndpointConnectionsClient creates a new instance of CloudHsmClusterPrivateEndpointConnectionsClient 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 (*CloudHsmClusterPrivateEndpointConnectionsClient) BeginDelete

BeginDelete - Deletes the private endpoint connection for the Cloud Hsm Cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • peConnectionName - Name of the private endpoint connection associated with the Cloud HSM Cluster.
  • options - CloudHsmClusterPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the CloudHsmClusterPrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmClusterPrivateEndpointConnection_Delete_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCloudHsmClusterPrivateEndpointConnectionsClient().BeginDelete(ctx, "rgcloudhsm", "chsm1", "sample-pec", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*CloudHsmClusterPrivateEndpointConnectionsClient) Create

Create - Creates or updates the private endpoint connection for the Cloud Hsm Cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • peConnectionName - Name of the private endpoint connection associated with the Cloud HSM Cluster.
  • properties - Parameters of the PrivateEndpointConnection
  • options - CloudHsmClusterPrivateEndpointConnectionsClientCreateOptions contains the optional parameters for the CloudHsmClusterPrivateEndpointConnectionsClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmClusterPrivateEndpointConnection_Create_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCloudHsmClusterPrivateEndpointConnectionsClient().Create(ctx, "rgcloudhsm", "chsm1", "sample-pec", armhardwaresecuritymodules.PrivateEndpointConnection{
	Properties: &armhardwaresecuritymodules.PrivateEndpointConnectionProperties{
		PrivateLinkServiceConnectionState: &armhardwaresecuritymodules.PrivateLinkServiceConnectionState{
			Description: to.Ptr("My name is Joe and I'm approving this."),
			Status:      to.Ptr(armhardwaresecuritymodules.PrivateEndpointServiceConnectionStatusApproved),
		},
	},
}, 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.PrivateEndpointConnection = armhardwaresecuritymodules.PrivateEndpointConnection{
// 	Name: to.Ptr("sample-pec"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1/privateEndpointConnections/sample-pec"),
// 	SystemData: &armhardwaresecuritymodules.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 	},
// 	Properties: &armhardwaresecuritymodules.PrivateEndpointConnectionProperties{
// 		PrivateEndpoint: &armhardwaresecuritymodules.PrivateEndpoint{
// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-1234-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.Network/privateEndpoints/sample-pec"),
// 		},
// 		PrivateLinkServiceConnectionState: &armhardwaresecuritymodules.PrivateLinkServiceConnectionState{
// 			Description: to.Ptr("My name is Joe and I'm approving this."),
// 			ActionsRequired: to.Ptr("None"),
// 			Status: to.Ptr(armhardwaresecuritymodules.PrivateEndpointServiceConnectionStatusApproved),
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.PrivateEndpointConnectionProvisioningStateSucceeded),
// 	},
// }
Output:

func (*CloudHsmClusterPrivateEndpointConnectionsClient) Get

Get - Gets the private endpoint connection for the Cloud Hsm Cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • peConnectionName - Name of the private endpoint connection associated with the Cloud HSM Cluster.
  • options - CloudHsmClusterPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the CloudHsmClusterPrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmClusterPrivateEndpointConnection_Get_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCloudHsmClusterPrivateEndpointConnectionsClient().Get(ctx, "rgcloudhsm", "chsm1", "sample-pec", 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.PrivateEndpointConnection = armhardwaresecuritymodules.PrivateEndpointConnection{
// 	Name: to.Ptr("sample-pec"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1/privateEndpointConnections/sample-pec"),
// 	SystemData: &armhardwaresecuritymodules.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("User1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("User2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 	},
// 	Properties: &armhardwaresecuritymodules.PrivateEndpointConnectionProperties{
// 		PrivateEndpoint: &armhardwaresecuritymodules.PrivateEndpoint{
// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-group/providers/Microsoft.Network/privateEndpoints/sample-pec"),
// 		},
// 		PrivateLinkServiceConnectionState: &armhardwaresecuritymodules.PrivateLinkServiceConnectionState{
// 			Description: to.Ptr("This was automatically approved by user1234@contoso.com"),
// 			ActionsRequired: to.Ptr("None"),
// 			Status: to.Ptr(armhardwaresecuritymodules.PrivateEndpointServiceConnectionStatusApproved),
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.PrivateEndpointConnectionProvisioningStateSucceeded),
// 	},
// }
Output:

type CloudHsmClusterPrivateEndpointConnectionsClientBeginDeleteOptions

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

CloudHsmClusterPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the CloudHsmClusterPrivateEndpointConnectionsClient.BeginDelete method.

type CloudHsmClusterPrivateEndpointConnectionsClientCreateOptions

type CloudHsmClusterPrivateEndpointConnectionsClientCreateOptions struct {
}

CloudHsmClusterPrivateEndpointConnectionsClientCreateOptions contains the optional parameters for the CloudHsmClusterPrivateEndpointConnectionsClient.Create method.

type CloudHsmClusterPrivateEndpointConnectionsClientCreateResponse

type CloudHsmClusterPrivateEndpointConnectionsClientCreateResponse struct {
	// The private endpoint connection resource.
	PrivateEndpointConnection
}

CloudHsmClusterPrivateEndpointConnectionsClientCreateResponse contains the response from method CloudHsmClusterPrivateEndpointConnectionsClient.Create.

type CloudHsmClusterPrivateEndpointConnectionsClientDeleteResponse

type CloudHsmClusterPrivateEndpointConnectionsClientDeleteResponse struct {
}

CloudHsmClusterPrivateEndpointConnectionsClientDeleteResponse contains the response from method CloudHsmClusterPrivateEndpointConnectionsClient.BeginDelete.

type CloudHsmClusterPrivateEndpointConnectionsClientGetOptions

type CloudHsmClusterPrivateEndpointConnectionsClientGetOptions struct {
}

CloudHsmClusterPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the CloudHsmClusterPrivateEndpointConnectionsClient.Get method.

type CloudHsmClusterPrivateEndpointConnectionsClientGetResponse

type CloudHsmClusterPrivateEndpointConnectionsClientGetResponse struct {
	// The private endpoint connection resource.
	PrivateEndpointConnection
}

CloudHsmClusterPrivateEndpointConnectionsClientGetResponse contains the response from method CloudHsmClusterPrivateEndpointConnectionsClient.Get.

type CloudHsmClusterPrivateLinkResourcesClient

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

CloudHsmClusterPrivateLinkResourcesClient contains the methods for the CloudHsmClusterPrivateLinkResources group. Don't use this type directly, use NewCloudHsmClusterPrivateLinkResourcesClient() instead.

func NewCloudHsmClusterPrivateLinkResourcesClient

func NewCloudHsmClusterPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudHsmClusterPrivateLinkResourcesClient, error)

NewCloudHsmClusterPrivateLinkResourcesClient creates a new instance of CloudHsmClusterPrivateLinkResourcesClient 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 (*CloudHsmClusterPrivateLinkResourcesClient) ListByCloudHsmCluster

ListByCloudHsmCluster - Gets the private link resources supported for the Cloud Hsm Cluster. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • options - CloudHsmClusterPrivateLinkResourcesClientListByCloudHsmClusterOptions contains the optional parameters for the CloudHsmClusterPrivateLinkResourcesClient.ListByCloudHsmCluster method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmClusterPrivateLinkResource_ListByCloudHsmCluster_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCloudHsmClusterPrivateLinkResourcesClient().ListByCloudHsmCluster(ctx, "rgcloudhsm", "chsm1", 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.PrivateLinkResourceListResult = armhardwaresecuritymodules.PrivateLinkResourceListResult{
// 	Value: []*armhardwaresecuritymodules.PrivateLinkResource{
// 		{
// 			Name: to.Ptr("sample-pls"),
// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters/privateLinkResources"),
// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1/privateLinkResources/sample-pls"),
// 			Properties: &armhardwaresecuritymodules.PrivateLinkResourceProperties{
// 				GroupID: to.Ptr("cloudHsm"),
// 				RequiredMembers: []*string{
// 					to.Ptr("hsm1"),
// 					to.Ptr("hsm2"),
// 					to.Ptr("hsm3")},
// 					RequiredZoneNames: []*string{
// 						to.Ptr("privatelink.cloudhsm.azure-int.net")},
// 					},
// 			}},
// 		}
Output:

type CloudHsmClusterPrivateLinkResourcesClientListByCloudHsmClusterOptions

type CloudHsmClusterPrivateLinkResourcesClientListByCloudHsmClusterOptions struct {
}

CloudHsmClusterPrivateLinkResourcesClientListByCloudHsmClusterOptions contains the optional parameters for the CloudHsmClusterPrivateLinkResourcesClient.ListByCloudHsmCluster method.

type CloudHsmClusterPrivateLinkResourcesClientListByCloudHsmClusterResponse

type CloudHsmClusterPrivateLinkResourcesClientListByCloudHsmClusterResponse struct {
	// A list of private link resources.
	PrivateLinkResourceListResult
}

CloudHsmClusterPrivateLinkResourcesClientListByCloudHsmClusterResponse contains the response from method CloudHsmClusterPrivateLinkResourcesClient.ListByCloudHsmCluster.

type CloudHsmClusterProperties

type CloudHsmClusterProperties struct {
	// The Cloud HSM Cluster's auto-generated Domain Name Label Scope
	AutoGeneratedDomainNameLabelScope *string

	// Cloud Hsm Cluster backup information
	BackupProperties *BackupProperties

	// An array of Cloud HSM Cluster's HSMs
	Hsms []*CloudHsmProperties

	// List of private endpoint connection resources
	PrivateEndpointConnections []*PrivateEndpointConnection

	// The Cloud HSM Cluster's provisioningState
	ProvisioningState *ProvisioningState

	// The Cloud HSM Cluster public network access
	PublicNetworkAccess *string

	// Cloud Hsm Cluster restore information
	RestoreProperties *RestoreProperties

	// Security domain properties information for Cloud HSM cluster
	SecurityDomain *CloudHsmClusterSecurityDomainProperties

	// READ-ONLY; Cloud HSM Cluster status message
	StatusMessage *string
}

CloudHsmClusterProperties - Properties of a Cloud HSM Cluster.

func (CloudHsmClusterProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmClusterProperties.

func (*CloudHsmClusterProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmClusterProperties.

type CloudHsmClusterResource

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

	// Managed service identity (system assigned and/or user assigned identities)
	Identity *ManagedServiceIdentity

	// SKU details
	SKU *CloudHsmClusterSKU

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

CloudHsmClusterResource - Cloud HSM Cluster Resource

func (CloudHsmClusterResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmClusterResource.

func (*CloudHsmClusterResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmClusterResource.

type CloudHsmClusterSKU

type CloudHsmClusterSKU struct {
	// REQUIRED; Sku family of the Cloud HSM Cluster
	Family *CloudHsmClusterSKUFamily

	// REQUIRED; Sku name of the Cloud HSM Cluster
	Name *CloudHsmClusterSKUName

	// Sku capacity
	Capacity *int32
}

CloudHsmClusterSKU - Cloud Hsm Cluster SKU information

func (CloudHsmClusterSKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmClusterSKU.

func (*CloudHsmClusterSKU) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmClusterSKU.

type CloudHsmClusterSKUFamily

type CloudHsmClusterSKUFamily string

CloudHsmClusterSKUFamily - Sku family of the Cloud HSM Cluster

const (
	CloudHsmClusterSKUFamilyB CloudHsmClusterSKUFamily = "B"
)

func PossibleCloudHsmClusterSKUFamilyValues

func PossibleCloudHsmClusterSKUFamilyValues() []CloudHsmClusterSKUFamily

PossibleCloudHsmClusterSKUFamilyValues returns the possible values for the CloudHsmClusterSKUFamily const type.

type CloudHsmClusterSKUName

type CloudHsmClusterSKUName string

CloudHsmClusterSKUName - Sku name of the Cloud HSM Cluster

const (
	CloudHsmClusterSKUNameStandardB1  CloudHsmClusterSKUName = "Standard_B1"
	CloudHsmClusterSKUNameStandardB10 CloudHsmClusterSKUName = "Standard B10"
)

func PossibleCloudHsmClusterSKUNameValues

func PossibleCloudHsmClusterSKUNameValues() []CloudHsmClusterSKUName

PossibleCloudHsmClusterSKUNameValues returns the possible values for the CloudHsmClusterSKUName const type.

type CloudHsmClusterSecurityDomainProperties

type CloudHsmClusterSecurityDomainProperties struct {
	// status of security domain activation
	ActivationStatus *string

	// FIPS state information for security domain
	FipsState *int32
}

CloudHsmClusterSecurityDomainProperties - Security domain properties information for Cloud HSM cluster

func (CloudHsmClusterSecurityDomainProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmClusterSecurityDomainProperties.

func (*CloudHsmClusterSecurityDomainProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmClusterSecurityDomainProperties.

type CloudHsmClustersClient

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

CloudHsmClustersClient contains the methods for the CloudHsmClusters group. Don't use this type directly, use NewCloudHsmClustersClient() instead.

func NewCloudHsmClustersClient

func NewCloudHsmClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudHsmClustersClient, error)

NewCloudHsmClustersClient creates a new instance of CloudHsmClustersClient 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 (*CloudHsmClustersClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Create or Update a Cloud HSM Cluster in the specified subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • body - Parameters to create Cloud HSM Cluster
  • options - CloudHsmClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudHsmClustersClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmCluster_CreateOrUpdate_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCloudHsmClustersClient().BeginCreateOrUpdate(ctx, "rgcloudhsm", "chsm1", armhardwaresecuritymodules.CloudHsmCluster{
	Location: to.Ptr("eastus2"),
	Tags: map[string]*string{
		"Dept":        to.Ptr("hsm"),
		"Environment": to.Ptr("dogfood"),
	},
	Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
		Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1": {},
		},
	},
	SKU: &armhardwaresecuritymodules.CloudHsmClusterSKU{
		Name:   to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUNameStandardB1),
		Family: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUFamilyB),
	},
	Properties: &armhardwaresecuritymodules.CloudHsmClusterProperties{
		BackupProperties: &armhardwaresecuritymodules.BackupProperties{
			AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
		},
		PublicNetworkAccess: to.Ptr("Disabled"),
		SecurityDomain: &armhardwaresecuritymodules.CloudHsmClusterSecurityDomainProperties{
			FipsState: to.Ptr[int32](2),
		},
	},
}, 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.CloudHsmCluster = armhardwaresecuritymodules.CloudHsmCluster{
// 	Name: to.Ptr("chsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1"),
// 	SystemData: &armhardwaresecuritymodules.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("CHsmUser1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("CHsmUser2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("eastus2"),
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 	},
// 	Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
// 		Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1": &armhardwaresecuritymodules.UserAssignedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 		},
// 	},
// 	SKU: &armhardwaresecuritymodules.CloudHsmClusterSKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUNameStandardB1),
// 		Family: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUFamilyB),
// 	},
// 	Properties: &armhardwaresecuritymodules.CloudHsmClusterProperties{
// 		AutoGeneratedDomainNameLabelScope: to.Ptr("TenantReuse"),
// 		BackupProperties: &armhardwaresecuritymodules.BackupProperties{
// 			AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
// 			LastBackupDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-09T12:00:00.000Z"); return t}()),
// 			LastBackupStatus: to.Ptr("Status Of last backup"),
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.ProvisioningStateSucceeded),
// 		PublicNetworkAccess: to.Ptr("Disabled"),
// 		SecurityDomain: &armhardwaresecuritymodules.CloudHsmClusterSecurityDomainProperties{
// 			ActivationStatus: to.Ptr("null"),
// 			FipsState: to.Ptr[int32](2),
// 		},
// 		StatusMessage: to.Ptr("This is a status message"),
// 	},
// }
Output:

func (*CloudHsmClustersClient) BeginDelete

func (client *CloudHsmClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, cloudHsmClusterName string, options *CloudHsmClustersClientBeginDeleteOptions) (*runtime.Poller[CloudHsmClustersClientDeleteResponse], error)

BeginDelete - Deletes the specified Cloud HSM Cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • options - CloudHsmClustersClientBeginDeleteOptions contains the optional parameters for the CloudHsmClustersClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmCluster_Delete_MaximumSet_Gen.json

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

func (*CloudHsmClustersClient) BeginUpdate

BeginUpdate - Update a Cloud HSM Cluster in the specified subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • body - Parameters to create Cloud HSM Cluster
  • options - CloudHsmClustersClientBeginUpdateOptions contains the optional parameters for the CloudHsmClustersClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmCluster_Update_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewCloudHsmClustersClient().BeginUpdate(ctx, "rgcloudhsm", "chsm1", armhardwaresecuritymodules.CloudHsmClusterPatchParameters{
	Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
		Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1": {},
		},
	},
	Properties: &armhardwaresecuritymodules.CloudHsmClusterPatchParametersProperties{
		BackupProperties: &armhardwaresecuritymodules.BackupProperties{
			AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
		},
	},
	Tags: map[string]*string{
		"Dept":        to.Ptr("hsm"),
		"Environment": to.Ptr("dogfood"),
		"Slice":       to.Ptr("A"),
	},
}, 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.CloudHsmCluster = armhardwaresecuritymodules.CloudHsmCluster{
// 	Name: to.Ptr("chsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1"),
// 	SystemData: &armhardwaresecuritymodules.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("CHsmUser1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("CHsmUser2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("eastus2"),
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 		"Slice": to.Ptr("A"),
// 	},
// 	Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
// 		Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1": &armhardwaresecuritymodules.UserAssignedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 		},
// 	},
// 	SKU: &armhardwaresecuritymodules.CloudHsmClusterSKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUNameStandardB1),
// 		Family: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUFamilyB),
// 	},
// 	Properties: &armhardwaresecuritymodules.CloudHsmClusterProperties{
// 		AutoGeneratedDomainNameLabelScope: to.Ptr("TenantReuse"),
// 		BackupProperties: &armhardwaresecuritymodules.BackupProperties{
// 			AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
// 			LastBackupDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-09T12:00:00.000Z"); return t}()),
// 			LastBackupStatus: to.Ptr("Status Of last backup"),
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.ProvisioningStateSucceeded),
// 		PublicNetworkAccess: to.Ptr("Disabled"),
// 		SecurityDomain: &armhardwaresecuritymodules.CloudHsmClusterSecurityDomainProperties{
// 			ActivationStatus: to.Ptr("null"),
// 			FipsState: to.Ptr[int32](2),
// 		},
// 		StatusMessage: to.Ptr("This is a status message"),
// 	},
// }
Output:

func (*CloudHsmClustersClient) Get

func (client *CloudHsmClustersClient) Get(ctx context.Context, resourceGroupName string, cloudHsmClusterName string, options *CloudHsmClustersClientGetOptions) (CloudHsmClustersClientGetResponse, error)

Get - Gets the specified Cloud HSM Cluster If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • options - CloudHsmClustersClientGetOptions contains the optional parameters for the CloudHsmClustersClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmCluster_Get_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCloudHsmClustersClient().Get(ctx, "rgcloudhsm", "chsm1", 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.CloudHsmCluster = armhardwaresecuritymodules.CloudHsmCluster{
// 	Name: to.Ptr("chsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1"),
// 	SystemData: &armhardwaresecuritymodules.SystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("CHsmUser1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("CHsmUser2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
// 	},
// 	Location: to.Ptr("eastus2"),
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 	},
// 	Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
// 		Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
// 			"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1": &armhardwaresecuritymodules.UserAssignedIdentity{
// 				ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 				PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
// 			},
// 		},
// 	},
// 	SKU: &armhardwaresecuritymodules.CloudHsmClusterSKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUNameStandardB1),
// 		Family: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUFamilyB),
// 	},
// 	Properties: &armhardwaresecuritymodules.CloudHsmClusterProperties{
// 		AutoGeneratedDomainNameLabelScope: to.Ptr("TenantReuse"),
// 		BackupProperties: &armhardwaresecuritymodules.BackupProperties{
// 			AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
// 			LastBackupDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-09T12:00:00.000Z"); return t}()),
// 			LastBackupStatus: to.Ptr("Status Of last backup"),
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.ProvisioningStateSucceeded),
// 		PublicNetworkAccess: to.Ptr("Disabled"),
// 		SecurityDomain: &armhardwaresecuritymodules.CloudHsmClusterSecurityDomainProperties{
// 			ActivationStatus: to.Ptr("null"),
// 			FipsState: to.Ptr[int32](2),
// 		},
// 		StatusMessage: to.Ptr("This is a status message"),
// 	},
// }
Output:

func (*CloudHsmClustersClient) NewListByResourceGroupPager

NewListByResourceGroupPager - The List operation gets information about the Cloud HSM Clusters associated with the subscription and within the specified resource group.

Generated from API version 2023-12-10-preview

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmCluster_ListByResourceGroup_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewCloudHsmClustersClient().NewListByResourceGroupPager("rgcloudhsm", &armhardwaresecuritymodules.CloudHsmClustersClientListByResourceGroupOptions{Skiptoken: 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.CloudHsmClusterListResult = armhardwaresecuritymodules.CloudHsmClusterListResult{
	// 	Value: []*armhardwaresecuritymodules.CloudHsmCluster{
	// 		{
	// 			Name: to.Ptr("chsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1"),
	// 			SystemData: &armhardwaresecuritymodules.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("CHsmUser1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("CHsmUser2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 			},
	// 			Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
	// 				Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
	// 				UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1": &armhardwaresecuritymodules.UserAssignedIdentity{
	// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					},
	// 				},
	// 			},
	// 			SKU: &armhardwaresecuritymodules.CloudHsmClusterSKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUNameStandardB1),
	// 				Family: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUFamilyB),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.CloudHsmClusterProperties{
	// 				AutoGeneratedDomainNameLabelScope: to.Ptr("TenantReuse"),
	// 				BackupProperties: &armhardwaresecuritymodules.BackupProperties{
	// 					AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
	// 					LastBackupDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-09T12:00:00.000Z"); return t}()),
	// 					LastBackupStatus: to.Ptr("Status Of last backup"),
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.ProvisioningStateSucceeded),
	// 				PublicNetworkAccess: to.Ptr("Disabled"),
	// 				SecurityDomain: &armhardwaresecuritymodules.CloudHsmClusterSecurityDomainProperties{
	// 					ActivationStatus: to.Ptr("null"),
	// 					FipsState: to.Ptr[int32](2),
	// 				},
	// 				StatusMessage: to.Ptr("This is a status message"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("chsm2"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm2"),
	// 			SystemData: &armhardwaresecuritymodules.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("CHsmUser1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("CHsmUser2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 			},
	// 			Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
	// 				Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
	// 				UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-2": &armhardwaresecuritymodules.UserAssignedIdentity{
	// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					},
	// 				},
	// 			},
	// 			SKU: &armhardwaresecuritymodules.CloudHsmClusterSKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUNameStandardB1),
	// 				Family: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUFamilyB),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.CloudHsmClusterProperties{
	// 				AutoGeneratedDomainNameLabelScope: to.Ptr("TenantReuse"),
	// 				BackupProperties: &armhardwaresecuritymodules.BackupProperties{
	// 					AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
	// 					LastBackupDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-09T12:00:00.000Z"); return t}()),
	// 					LastBackupStatus: to.Ptr("Status Of last backup"),
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.ProvisioningStateSucceeded),
	// 				PublicNetworkAccess: to.Ptr("Disabled"),
	// 				SecurityDomain: &armhardwaresecuritymodules.CloudHsmClusterSecurityDomainProperties{
	// 					ActivationStatus: to.Ptr("null"),
	// 					FipsState: to.Ptr[int32](2),
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

func (*CloudHsmClustersClient) NewListBySubscriptionPager

NewListBySubscriptionPager - The List operation gets information about the Cloud HSM Clusters associated with the subscription.

Generated from API version 2023-12-10-preview

  • options - CloudHsmClustersClientListBySubscriptionOptions contains the optional parameters for the CloudHsmClustersClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmCluster_ListBySubscription_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewCloudHsmClustersClient().NewListBySubscriptionPager(&armhardwaresecuritymodules.CloudHsmClustersClientListBySubscriptionOptions{Skiptoken: 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.CloudHsmClusterListResult = armhardwaresecuritymodules.CloudHsmClusterListResult{
	// 	Value: []*armhardwaresecuritymodules.CloudHsmCluster{
	// 		{
	// 			Name: to.Ptr("chsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1"),
	// 			SystemData: &armhardwaresecuritymodules.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("CHsmUser1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("CHsmUser2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 			},
	// 			Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
	// 				Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
	// 				UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-1": &armhardwaresecuritymodules.UserAssignedIdentity{
	// 					},
	// 				},
	// 			},
	// 			SKU: &armhardwaresecuritymodules.CloudHsmClusterSKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUNameStandardB1),
	// 				Family: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUFamilyB),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.CloudHsmClusterProperties{
	// 				AutoGeneratedDomainNameLabelScope: to.Ptr("TenantReuse"),
	// 				BackupProperties: &armhardwaresecuritymodules.BackupProperties{
	// 					AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
	// 					LastBackupDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-09T12:00:00.000Z"); return t}()),
	// 					LastBackupStatus: to.Ptr("Status Of last backup"),
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.ProvisioningStateSucceeded),
	// 				PublicNetworkAccess: to.Ptr("Disabled"),
	// 				SecurityDomain: &armhardwaresecuritymodules.CloudHsmClusterSecurityDomainProperties{
	// 					ActivationStatus: to.Ptr("null"),
	// 					FipsState: to.Ptr[int32](2),
	// 				},
	// 				StatusMessage: to.Ptr("This is a status message"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("chsm2"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm2"),
	// 			SystemData: &armhardwaresecuritymodules.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("CHsmUser1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-12T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("CHsmUser2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			},
	// 			Location: to.Ptr("eastus2"),
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 			},
	// 			Identity: &armhardwaresecuritymodules.ManagedServiceIdentity{
	// 				Type: to.Ptr(armhardwaresecuritymodules.ManagedServiceIdentityTypeUserAssigned),
	// 				UserAssignedIdentities: map[string]*armhardwaresecuritymodules.UserAssignedIdentity{
	// 					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-2": &armhardwaresecuritymodules.UserAssignedIdentity{
	// 						ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					},
	// 				},
	// 			},
	// 			SKU: &armhardwaresecuritymodules.CloudHsmClusterSKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUNameStandardB1),
	// 				Family: to.Ptr(armhardwaresecuritymodules.CloudHsmClusterSKUFamilyB),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.CloudHsmClusterProperties{
	// 				AutoGeneratedDomainNameLabelScope: to.Ptr("TenantReuse"),
	// 				BackupProperties: &armhardwaresecuritymodules.BackupProperties{
	// 					AzureStorageResourceURI: to.Ptr("testStorageResourceUri"),
	// 					LastBackupDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-09T12:00:00.000Z"); return t}()),
	// 					LastBackupStatus: to.Ptr("Status Of last backup"),
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.ProvisioningStateSucceeded),
	// 				PublicNetworkAccess: to.Ptr("Disabled"),
	// 				SecurityDomain: &armhardwaresecuritymodules.CloudHsmClusterSecurityDomainProperties{
	// 					ActivationStatus: to.Ptr("null"),
	// 					FipsState: to.Ptr[int32](2),
	// 				},
	// 				StatusMessage: to.Ptr("This is a status message"),
	// 			},
	// 	}},
	// }
}
Output:

type CloudHsmClustersClientBeginCreateOrUpdateOptions

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

CloudHsmClustersClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudHsmClustersClient.BeginCreateOrUpdate method.

type CloudHsmClustersClientBeginDeleteOptions

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

CloudHsmClustersClientBeginDeleteOptions contains the optional parameters for the CloudHsmClustersClient.BeginDelete method.

type CloudHsmClustersClientBeginUpdateOptions

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

CloudHsmClustersClientBeginUpdateOptions contains the optional parameters for the CloudHsmClustersClient.BeginUpdate method.

type CloudHsmClustersClientCreateOrUpdateResponse

type CloudHsmClustersClientCreateOrUpdateResponse struct {
	// Resource information with extended details.
	CloudHsmCluster
}

CloudHsmClustersClientCreateOrUpdateResponse contains the response from method CloudHsmClustersClient.BeginCreateOrUpdate.

type CloudHsmClustersClientDeleteResponse

type CloudHsmClustersClientDeleteResponse struct {
}

CloudHsmClustersClientDeleteResponse contains the response from method CloudHsmClustersClient.BeginDelete.

type CloudHsmClustersClientGetOptions

type CloudHsmClustersClientGetOptions struct {
}

CloudHsmClustersClientGetOptions contains the optional parameters for the CloudHsmClustersClient.Get method.

type CloudHsmClustersClientGetResponse

type CloudHsmClustersClientGetResponse struct {
	// Resource information with extended details.
	CloudHsmCluster
}

CloudHsmClustersClientGetResponse contains the response from method CloudHsmClustersClient.Get.

type CloudHsmClustersClientListByResourceGroupOptions

type CloudHsmClustersClientListByResourceGroupOptions struct {
	// The page-continuation token to use with a paged version of this API
	Skiptoken *string
}

CloudHsmClustersClientListByResourceGroupOptions contains the optional parameters for the CloudHsmClustersClient.NewListByResourceGroupPager method.

type CloudHsmClustersClientListByResourceGroupResponse

type CloudHsmClustersClientListByResourceGroupResponse struct {
	// List of Cloud HSM Clusters
	CloudHsmClusterListResult
}

CloudHsmClustersClientListByResourceGroupResponse contains the response from method CloudHsmClustersClient.NewListByResourceGroupPager.

type CloudHsmClustersClientListBySubscriptionOptions

type CloudHsmClustersClientListBySubscriptionOptions struct {
	// The page-continuation token to use with a paged version of this API
	Skiptoken *string
}

CloudHsmClustersClientListBySubscriptionOptions contains the optional parameters for the CloudHsmClustersClient.NewListBySubscriptionPager method.

type CloudHsmClustersClientListBySubscriptionResponse

type CloudHsmClustersClientListBySubscriptionResponse struct {
	// List of Cloud HSM Clusters
	CloudHsmClusterListResult
}

CloudHsmClustersClientListBySubscriptionResponse contains the response from method CloudHsmClustersClient.NewListBySubscriptionPager.

type CloudHsmClustersClientUpdateResponse

type CloudHsmClustersClientUpdateResponse struct {
	// Resource information with extended details.
	CloudHsmCluster
}

CloudHsmClustersClientUpdateResponse contains the response from method CloudHsmClustersClient.BeginUpdate.

type CloudHsmProperties

type CloudHsmProperties struct {
	// FQDN of the Cloud HSM
	Fqdn *string

	// The Cloud HSM State
	State *string

	// The Cloud HSM State message
	StateMessage *string
}

CloudHsmProperties - The Cloud HSM Properties

func (CloudHsmProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CloudHsmProperties.

func (*CloudHsmProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudHsmProperties.

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 DedicatedHsm

type DedicatedHsm struct {
	// REQUIRED; The supported Azure location where the dedicated HSM should be created.
	Location *string

	// REQUIRED; Properties of the dedicated HSM
	Properties *DedicatedHsmProperties

	// SKU details
	SKU *SKU

	// Resource tags
	Tags map[string]*string

	// The Dedicated Hsm zones.
	Zones []*string

	// READ-ONLY; The Azure Resource Manager resource ID for the dedicated HSM.
	ID *string

	// READ-ONLY; The name of the dedicated HSM.
	Name *string

	// READ-ONLY; Metadata pertaining to creation and last modification of the resource
	SystemData *DedicatedHsmSystemData

	// READ-ONLY; The resource type of the dedicated HSM.
	Type *string
}

DedicatedHsm - Resource information with extended details.

func (DedicatedHsm) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsm.

func (*DedicatedHsm) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsm.

type DedicatedHsmClient

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

DedicatedHsmClient contains the methods for the DedicatedHsm group. Don't use this type directly, use NewDedicatedHsmClient() instead.

func NewDedicatedHsmClient

func NewDedicatedHsmClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DedicatedHsmClient, error)

NewDedicatedHsmClient creates a new instance of DedicatedHsmClient 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 (*DedicatedHsmClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Create or Update a dedicated HSM in the specified subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-30

  • resourceGroupName - The name of the Resource Group to which the resource belongs.
  • name - Name of the dedicated Hsm
  • parameters - Parameters to create or update the dedicated hsm
  • options - DedicatedHsmClientBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedHsmClient.BeginCreateOrUpdate method.
Example (CreateANewOrUpdateAnExistingDedicatedHsm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/DedicatedHsm_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDedicatedHsmClient().BeginCreateOrUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsm{
	Location: to.Ptr("westus"),
	SKU: &armhardwaresecuritymodules.SKU{
		Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
	},
	Tags: map[string]*string{
		"Dept":        to.Ptr("hsm"),
		"Environment": to.Ptr("dogfood"),
	},
	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
				{
					PrivateIPAddress: to.Ptr("1.0.0.1"),
				}},
			Subnet: &armhardwaresecuritymodules.APIEntityReference{
				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
			},
		},
		StampID: to.Ptr("stamp01"),
	},
}, 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.DedicatedHsm = armhardwaresecuritymodules.DedicatedHsm{
// 	Name: to.Ptr("hsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
// 	Location: to.Ptr("westus"),
// 	SKU: &armhardwaresecuritymodules.SKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
// 	},
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 	},
// 	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
// 		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.1"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
// 		StampID: to.Ptr("stamp01"),
// 		StatusMessage: to.Ptr("DedicatedHsm device is functional."),
// 	},
// }
Output:

Example (CreateANewOrUpdateAnExistingPaymentHsm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/PaymentHsm_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDedicatedHsmClient().BeginCreateOrUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsm{
	Location: to.Ptr("westus"),
	SKU: &armhardwaresecuritymodules.SKU{
		Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	},
	Tags: map[string]*string{
		"Dept":        to.Ptr("hsm"),
		"Environment": to.Ptr("dogfood"),
	},
	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
				{
					PrivateIPAddress: to.Ptr("1.0.0.1"),
				}},
			Subnet: &armhardwaresecuritymodules.APIEntityReference{
				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
			},
		},
		StampID: to.Ptr("stamp01"),
	},
}, 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.DedicatedHsm = armhardwaresecuritymodules.DedicatedHsm{
// 	Name: to.Ptr("hsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
// 	Location: to.Ptr("westus"),
// 	SKU: &armhardwaresecuritymodules.SKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
// 	},
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 	},
// 	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
// 		ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.2"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.1"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
// 		StampID: to.Ptr("stamp01"),
// 		StatusMessage: to.Ptr("DedicatedHsm device is functional."),
// 	},
// 	SystemData: &armhardwaresecuritymodules.DedicatedHsmSystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
// 	},
// }
Output:

Example (CreateANewOrUpdateAnExistingPaymentHsmWithManagementProfile)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/PaymentHsm_CreateOrUpdate_WithManagementProfile.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDedicatedHsmClient().BeginCreateOrUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsm{
	Location: to.Ptr("westus"),
	SKU: &armhardwaresecuritymodules.SKU{
		Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	},
	Tags: map[string]*string{
		"Dept":        to.Ptr("hsm"),
		"Environment": to.Ptr("dogfood"),
	},
	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
		ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
				{
					PrivateIPAddress: to.Ptr("1.0.0.2"),
				}},
			Subnet: &armhardwaresecuritymodules.APIEntityReference{
				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
			},
		},
		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
				{
					PrivateIPAddress: to.Ptr("1.0.0.1"),
				}},
			Subnet: &armhardwaresecuritymodules.APIEntityReference{
				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
			},
		},
		StampID: to.Ptr("stamp01"),
	},
}, 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.DedicatedHsm = armhardwaresecuritymodules.DedicatedHsm{
// 	Name: to.Ptr("hsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
// 	Location: to.Ptr("westus"),
// 	SKU: &armhardwaresecuritymodules.SKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
// 	},
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 	},
// 	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
// 		ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.2"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.1"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
// 		StampID: to.Ptr("stamp01"),
// 		StatusMessage: to.Ptr("DedicatedHsm device is functional."),
// 	},
// 	SystemData: &armhardwaresecuritymodules.DedicatedHsmSystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
// 	},
// }
Output:

func (*DedicatedHsmClient) BeginDelete

BeginDelete - Deletes the specified Azure Dedicated HSM. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-30

  • resourceGroupName - The name of the Resource Group to which the dedicated HSM belongs.
  • name - The name of the dedicated HSM to delete
  • options - DedicatedHsmClientBeginDeleteOptions contains the optional parameters for the DedicatedHsmClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/DedicatedHsm_Delete.json

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

func (*DedicatedHsmClient) BeginUpdate

BeginUpdate - Update a dedicated HSM in the specified subscription. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-30

  • resourceGroupName - The name of the Resource Group to which the server belongs.
  • name - Name of the dedicated HSM
  • parameters - Parameters to patch the dedicated HSM
  • options - DedicatedHsmClientBeginUpdateOptions contains the optional parameters for the DedicatedHsmClient.BeginUpdate method.
Example (UpdateAnExistingDedicatedHsm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/DedicatedHsm_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDedicatedHsmClient().BeginUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsmPatchParameters{
	Tags: map[string]*string{
		"Dept":        to.Ptr("hsm"),
		"Environment": to.Ptr("dogfood"),
		"Slice":       to.Ptr("A"),
	},
}, 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.DedicatedHsm = armhardwaresecuritymodules.DedicatedHsm{
// 	Name: to.Ptr("hsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
// 	Location: to.Ptr("westus"),
// 	SKU: &armhardwaresecuritymodules.SKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
// 	},
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 		"Slice": to.Ptr("A"),
// 	},
// 	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
// 		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.1"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
// 		StampID: to.Ptr("stamp01"),
// 		StatusMessage: to.Ptr("DedicatedHsm device is functional."),
// 	},
// }
Output:

Example (UpdateAnExistingPaymentHsm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/PaymentHsm_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDedicatedHsmClient().BeginUpdate(ctx, "hsm-group", "hsm1", armhardwaresecuritymodules.DedicatedHsmPatchParameters{
	Tags: map[string]*string{
		"Dept":        to.Ptr("hsm"),
		"Environment": to.Ptr("dogfood"),
		"Slice":       to.Ptr("A"),
	},
}, 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.DedicatedHsm = armhardwaresecuritymodules.DedicatedHsm{
// 	Name: to.Ptr("hsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
// 	Location: to.Ptr("westus"),
// 	SKU: &armhardwaresecuritymodules.SKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
// 	},
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 		"Slice": to.Ptr("A"),
// 	},
// 	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
// 		ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.2"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.1"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
// 		StampID: to.Ptr("stamp01"),
// 		StatusMessage: to.Ptr("DedicatedHsm device is functional."),
// 	},
// 	SystemData: &armhardwaresecuritymodules.DedicatedHsmSystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
// 	},
// }
Output:

func (*DedicatedHsmClient) Get

func (client *DedicatedHsmClient) Get(ctx context.Context, resourceGroupName string, name string, options *DedicatedHsmClientGetOptions) (DedicatedHsmClientGetResponse, error)

Get - Gets the specified Azure dedicated HSM. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2021-11-30

  • resourceGroupName - The name of the Resource Group to which the dedicated hsm belongs.
  • name - The name of the dedicated HSM.
  • options - DedicatedHsmClientGetOptions contains the optional parameters for the DedicatedHsmClient.Get method.
Example (GetADedicatedHsm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/DedicatedHsm_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDedicatedHsmClient().Get(ctx, "hsm-group", "hsm1", 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.DedicatedHsm = armhardwaresecuritymodules.DedicatedHsm{
// 	Name: to.Ptr("hsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
// 	Location: to.Ptr("westus"),
// 	SKU: &armhardwaresecuritymodules.SKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
// 	},
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 		"Slice": to.Ptr("A"),
// 	},
// 	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
// 		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.1"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
// 		StampID: to.Ptr("stamp01"),
// 		StatusMessage: to.Ptr("DedicatedHsm device is functional."),
// 	},
// }
Output:

Example (GetAPaymentHsm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/PaymentHsm_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDedicatedHsmClient().Get(ctx, "hsm-group", "hsm1", 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.DedicatedHsm = armhardwaresecuritymodules.DedicatedHsm{
// 	Name: to.Ptr("hsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
// 	Location: to.Ptr("westus"),
// 	SKU: &armhardwaresecuritymodules.SKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
// 	},
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 		"Slice": to.Ptr("A"),
// 	},
// 	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
// 		ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.2"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.1"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
// 		StampID: to.Ptr("stamp01"),
// 		StatusMessage: to.Ptr("DedicatedHsm device is functional."),
// 	},
// 	SystemData: &armhardwaresecuritymodules.DedicatedHsmSystemData{
// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		CreatedBy: to.Ptr("user1"),
// 		CreatedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
// 		LastModifiedBy: to.Ptr("user2"),
// 		LastModifiedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
// 	},
// }
Output:

Example (GetAPaymentHsmWith20181031PreviewApiVersion)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/PaymentHsm_Get_With_2018-10-31Preview_Version.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDedicatedHsmClient().Get(ctx, "hsm-group", "hsm1", 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.DedicatedHsm = armhardwaresecuritymodules.DedicatedHsm{
// 	Name: to.Ptr("hsm1"),
// 	Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
// 	Location: to.Ptr("westus"),
// 	SKU: &armhardwaresecuritymodules.SKU{
// 		Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
// 	},
// 	Tags: map[string]*string{
// 		"Dept": to.Ptr("hsm"),
// 		"Environment": to.Ptr("dogfood"),
// 		"Slice": to.Ptr("A"),
// 	},
// 	Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
// 		NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
// 			NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
// 				{
// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
// 					PrivateIPAddress: to.Ptr("1.0.0.1"),
// 			}},
// 			Subnet: &armhardwaresecuritymodules.APIEntityReference{
// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
// 			},
// 		},
// 		ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
// 		StampID: to.Ptr("stamp01"),
// 		StatusMessage: to.Ptr("DedicatedHsm device is functional."),
// 	},
// }
Output:

func (*DedicatedHsmClient) NewListByResourceGroupPager

NewListByResourceGroupPager - The List operation gets information about the dedicated hsms associated with the subscription and within the specified resource group.

Generated from API version 2021-11-30

  • resourceGroupName - The name of the Resource Group to which the dedicated HSM belongs.
  • options - DedicatedHsmClientListByResourceGroupOptions contains the optional parameters for the DedicatedHsmClient.NewListByResourceGroupPager method.
Example (ListDedicatedHsmDevicesInAResourceGroup)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/DedicatedHsm_ListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDedicatedHsmClient().NewListByResourceGroupPager("hsm-group", &armhardwaresecuritymodules.DedicatedHsmClientListByResourceGroupOptions{Top: 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.DedicatedHsmListResult = armhardwaresecuritymodules.DedicatedHsmListResult{
	// 	Value: []*armhardwaresecuritymodules.DedicatedHsm{
	// 		{
	// 			Name: to.Ptr("hsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 			Location: to.Ptr("westus"),
	// 			SKU: &armhardwaresecuritymodules.SKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
	// 			},
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 				"Slice": to.Ptr("A"),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 				NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 				StampID: to.Ptr("stamp01"),
	// 				StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("hsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm2"),
	// 			Location: to.Ptr("westus"),
	// 			SKU: &armhardwaresecuritymodules.SKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
	// 			},
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 				"Slice": to.Ptr("B"),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 				NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.2"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 				StampID: to.Ptr("stamp01"),
	// 				StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListDedicatedHsmDevicesInAResourceGroupIncludingPaymentHsm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/PaymentHsm_ListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDedicatedHsmClient().NewListByResourceGroupPager("hsm-group", &armhardwaresecuritymodules.DedicatedHsmClientListByResourceGroupOptions{Top: 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.DedicatedHsmListResult = armhardwaresecuritymodules.DedicatedHsmListResult{
	// 	Value: []*armhardwaresecuritymodules.DedicatedHsm{
	// 		{
	// 			Name: to.Ptr("hsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 			Location: to.Ptr("westus"),
	// 			SKU: &armhardwaresecuritymodules.SKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 			},
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 				"Slice": to.Ptr("A"),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 				ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.2"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 				StampID: to.Ptr("stamp01"),
	// 				StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 			},
	// 			SystemData: &armhardwaresecuritymodules.DedicatedHsmSystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("hsm2"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm2"),
	// 			Location: to.Ptr("westus"),
	// 			SKU: &armhardwaresecuritymodules.SKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 			},
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 				"Slice": to.Ptr("B"),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 				ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm2_HSMMgmtNic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.4"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm2_HSMHost1Nic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.3"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 				StampID: to.Ptr("stamp01"),
	// 				StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 			},
	// 			SystemData: &armhardwaresecuritymodules.DedicatedHsmSystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

func (*DedicatedHsmClient) NewListBySubscriptionPager

NewListBySubscriptionPager - The List operation gets information about the dedicated HSMs associated with the subscription.

Generated from API version 2021-11-30

  • options - DedicatedHsmClientListBySubscriptionOptions contains the optional parameters for the DedicatedHsmClient.NewListBySubscriptionPager method.
Example (ListDedicatedHsmDevicesInASubscription)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/DedicatedHsm_ListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDedicatedHsmClient().NewListBySubscriptionPager(&armhardwaresecuritymodules.DedicatedHsmClientListBySubscriptionOptions{Top: 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.DedicatedHsmListResult = armhardwaresecuritymodules.DedicatedHsmListResult{
	// 	Value: []*armhardwaresecuritymodules.DedicatedHsm{
	// 		{
	// 			Name: to.Ptr("hsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 			Location: to.Ptr("westus"),
	// 			SKU: &armhardwaresecuritymodules.SKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
	// 			},
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 				"Slice": to.Ptr("A"),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 				NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 				StampID: to.Ptr("stamp01"),
	// 				StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("hsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm2"),
	// 			Location: to.Ptr("westus"),
	// 			SKU: &armhardwaresecuritymodules.SKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.SKUNameSafeNetLunaNetworkHSMA790),
	// 			},
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 				"Slice": to.Ptr("B"),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 				NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm_vnic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.2"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 				StampID: to.Ptr("stamp01"),
	// 				StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 			},
	// 	}},
	// }
}
Output:

Example (ListDedicatedHsmDevicesInASubscriptionIncludingPaymentHsm)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/PaymentHsm_ListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDedicatedHsmClient().NewListBySubscriptionPager(&armhardwaresecuritymodules.DedicatedHsmClientListBySubscriptionOptions{Top: 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.DedicatedHsmListResult = armhardwaresecuritymodules.DedicatedHsmListResult{
	// 	Value: []*armhardwaresecuritymodules.DedicatedHsm{
	// 		{
	// 			Name: to.Ptr("hsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm1"),
	// 			Location: to.Ptr("westus"),
	// 			SKU: &armhardwaresecuritymodules.SKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 			},
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm1"),
	// 				"Environment": to.Ptr("dogfood"),
	// 				"Slice": to.Ptr("A"),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 				ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMMgmtNic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.2"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm1_HSMHost1Nic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.1"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 				StampID: to.Ptr("stamp01"),
	// 				StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 			},
	// 			SystemData: &armhardwaresecuritymodules.DedicatedHsmSystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("hsm2"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/dedicatedHSMs"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.HardwareSecurityModules/dedicatedHSMs/hsm2"),
	// 			Location: to.Ptr("westus"),
	// 			SKU: &armhardwaresecuritymodules.SKU{
	// 				Name: to.Ptr(armhardwaresecuritymodules.SKUNamePayShield10KLMK1CPS60),
	// 			},
	// 			Tags: map[string]*string{
	// 				"Dept": to.Ptr("hsm"),
	// 				"Environment": to.Ptr("dogfood"),
	// 				"Slice": to.Ptr("B"),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.DedicatedHsmProperties{
	// 				ManagementNetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm2_HSMMgmtNic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.4"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				NetworkProfile: &armhardwaresecuritymodules.NetworkProfile{
	// 					NetworkInterfaces: []*armhardwaresecuritymodules.NetworkInterface{
	// 						{
	// 							ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/networkInterfaces/hsm2_HSMHost1Nic"),
	// 							PrivateIPAddress: to.Ptr("1.0.0.3"),
	// 					}},
	// 					Subnet: &armhardwaresecuritymodules.APIEntityReference{
	// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hsm-group/providers/Microsoft.Network/virtualNetworks/stamp01/subnets/stamp01"),
	// 					},
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.JSONWebKeyTypeSucceeded),
	// 				StampID: to.Ptr("stamp01"),
	// 				StatusMessage: to.Ptr("DedicatedHsm device is functional."),
	// 			},
	// 			SystemData: &armhardwaresecuritymodules.DedicatedHsmSystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("user1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("user2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.IdentityTypeUser),
	// 			},
	// 	}},
	// }
}
Output:

func (*DedicatedHsmClient) NewListOutboundNetworkDependenciesEndpointsPager

NewListOutboundNetworkDependenciesEndpointsPager - Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm resource. The operation returns properties of each egress endpoint.

Generated from API version 2021-11-30

  • resourceGroupName - The name of the Resource Group to which the dedicated hsm belongs.
  • name - The name of the dedicated HSM.
  • options - DedicatedHsmClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the DedicatedHsmClient.NewListOutboundNetworkDependenciesEndpointsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/GetOutboundNetworkDependenciesEndpointsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDedicatedHsmClient().NewListOutboundNetworkDependenciesEndpointsPager("hsm-group", "hsm1", 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.OutboundEnvironmentEndpointCollection = armhardwaresecuritymodules.OutboundEnvironmentEndpointCollection{
	// 	Value: []*armhardwaresecuritymodules.OutboundEnvironmentEndpoint{
	// 	},
	// }
}
Output:

type DedicatedHsmClientBeginCreateOrUpdateOptions

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

DedicatedHsmClientBeginCreateOrUpdateOptions contains the optional parameters for the DedicatedHsmClient.BeginCreateOrUpdate method.

type DedicatedHsmClientBeginDeleteOptions

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

DedicatedHsmClientBeginDeleteOptions contains the optional parameters for the DedicatedHsmClient.BeginDelete method.

type DedicatedHsmClientBeginUpdateOptions

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

DedicatedHsmClientBeginUpdateOptions contains the optional parameters for the DedicatedHsmClient.BeginUpdate method.

type DedicatedHsmClientCreateOrUpdateResponse

type DedicatedHsmClientCreateOrUpdateResponse struct {
	// Resource information with extended details.
	DedicatedHsm
}

DedicatedHsmClientCreateOrUpdateResponse contains the response from method DedicatedHsmClient.BeginCreateOrUpdate.

type DedicatedHsmClientDeleteResponse

type DedicatedHsmClientDeleteResponse struct {
}

DedicatedHsmClientDeleteResponse contains the response from method DedicatedHsmClient.BeginDelete.

type DedicatedHsmClientGetOptions

type DedicatedHsmClientGetOptions struct {
}

DedicatedHsmClientGetOptions contains the optional parameters for the DedicatedHsmClient.Get method.

type DedicatedHsmClientGetResponse

type DedicatedHsmClientGetResponse struct {
	// Resource information with extended details.
	DedicatedHsm
}

DedicatedHsmClientGetResponse contains the response from method DedicatedHsmClient.Get.

type DedicatedHsmClientListByResourceGroupOptions

type DedicatedHsmClientListByResourceGroupOptions struct {
	// Maximum number of results to return.
	Top *int32
}

DedicatedHsmClientListByResourceGroupOptions contains the optional parameters for the DedicatedHsmClient.NewListByResourceGroupPager method.

type DedicatedHsmClientListByResourceGroupResponse

type DedicatedHsmClientListByResourceGroupResponse struct {
	// List of dedicated HSMs
	DedicatedHsmListResult
}

DedicatedHsmClientListByResourceGroupResponse contains the response from method DedicatedHsmClient.NewListByResourceGroupPager.

type DedicatedHsmClientListBySubscriptionOptions

type DedicatedHsmClientListBySubscriptionOptions struct {
	// Maximum number of results to return.
	Top *int32
}

DedicatedHsmClientListBySubscriptionOptions contains the optional parameters for the DedicatedHsmClient.NewListBySubscriptionPager method.

type DedicatedHsmClientListBySubscriptionResponse

type DedicatedHsmClientListBySubscriptionResponse struct {
	// List of dedicated HSMs
	DedicatedHsmListResult
}

DedicatedHsmClientListBySubscriptionResponse contains the response from method DedicatedHsmClient.NewListBySubscriptionPager.

type DedicatedHsmClientListOutboundNetworkDependenciesEndpointsOptions

type DedicatedHsmClientListOutboundNetworkDependenciesEndpointsOptions struct {
}

DedicatedHsmClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the DedicatedHsmClient.NewListOutboundNetworkDependenciesEndpointsPager method.

type DedicatedHsmClientListOutboundNetworkDependenciesEndpointsResponse

type DedicatedHsmClientListOutboundNetworkDependenciesEndpointsResponse struct {
	// Collection of OutboundEnvironmentEndpoint
	OutboundEnvironmentEndpointCollection
}

DedicatedHsmClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method DedicatedHsmClient.NewListOutboundNetworkDependenciesEndpointsPager.

type DedicatedHsmClientUpdateResponse

type DedicatedHsmClientUpdateResponse struct {
	// Resource information with extended details.
	DedicatedHsm
}

DedicatedHsmClientUpdateResponse contains the response from method DedicatedHsmClient.BeginUpdate.

type DedicatedHsmError

type DedicatedHsmError struct {
	// READ-ONLY; The error detail of the operation if any.
	Error *Error
}

DedicatedHsmError - The error exception.

func (DedicatedHsmError) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmError.

func (*DedicatedHsmError) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmError.

type DedicatedHsmListResult

type DedicatedHsmListResult struct {
	// The URL to get the next set of dedicated hsms.
	NextLink *string

	// The list of dedicated HSMs.
	Value []*DedicatedHsm
}

DedicatedHsmListResult - List of dedicated HSMs

func (DedicatedHsmListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmListResult.

func (*DedicatedHsmListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmListResult.

type DedicatedHsmOperation

type DedicatedHsmOperation struct {
	// The display string.
	Display *DedicatedHsmOperationDisplay

	// The name of the Dedicated HSM Resource Provider Operation.
	Name *string

	// The origin of the operation
	Origin *string

	// READ-ONLY; Gets or sets a value indicating whether it is a data plane action
	IsDataAction *bool
}

DedicatedHsmOperation - REST API operation

func (DedicatedHsmOperation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmOperation.

func (*DedicatedHsmOperation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmOperation.

type DedicatedHsmOperationDisplay

type DedicatedHsmOperationDisplay struct {
	// The object that represents the operation.
	Description *string

	// Operation type: Read, write, delete, etc.
	Operation *string

	// The Resource Provider of the operation
	Provider *string

	// Resource on which the operation is performed.
	Resource *string
}

DedicatedHsmOperationDisplay - The display string.

func (DedicatedHsmOperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmOperationDisplay.

func (*DedicatedHsmOperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmOperationDisplay.

type DedicatedHsmOperationListResult

type DedicatedHsmOperationListResult struct {
	// List of Dedicated HSM Resource Provider operations.
	Value []*DedicatedHsmOperation
}

DedicatedHsmOperationListResult - Result of the request to list Dedicated HSM Provider operations. It contains a list of operations.

func (DedicatedHsmOperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmOperationListResult.

func (*DedicatedHsmOperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmOperationListResult.

type DedicatedHsmPatchParameters

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

DedicatedHsmPatchParameters - Patchable properties of the dedicated HSM

func (DedicatedHsmPatchParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmPatchParameters.

func (*DedicatedHsmPatchParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmPatchParameters.

type DedicatedHsmProperties

type DedicatedHsmProperties struct {
	// Specifies the management network interfaces of the dedicated hsm.
	ManagementNetworkProfile *NetworkProfile

	// Specifies the network interfaces of the dedicated hsm.
	NetworkProfile *NetworkProfile

	// This field will be used when RP does not support Availability zones.
	StampID *string

	// READ-ONLY; Provisioning state.
	ProvisioningState *JSONWebKeyType

	// READ-ONLY; Resource Status Message.
	StatusMessage *string
}

DedicatedHsmProperties - Properties of the dedicated hsm

func (DedicatedHsmProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmProperties.

func (*DedicatedHsmProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmProperties.

type DedicatedHsmResource

type DedicatedHsmResource struct {
	// REQUIRED; The supported Azure location where the dedicated HSM should be created.
	Location *string

	// SKU details
	SKU *SKU

	// Resource tags
	Tags map[string]*string

	// The Dedicated Hsm zones.
	Zones []*string

	// READ-ONLY; The Azure Resource Manager resource ID for the dedicated HSM.
	ID *string

	// READ-ONLY; The name of the dedicated HSM.
	Name *string

	// READ-ONLY; The resource type of the dedicated HSM.
	Type *string
}

DedicatedHsmResource - Dedicated HSM resource

func (DedicatedHsmResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmResource.

func (*DedicatedHsmResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmResource.

type DedicatedHsmSystemData

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

	// The identity that created dedicated hsm resource.
	CreatedBy *string

	// The type of identity that created dedicated hsm resource.
	CreatedByType *IdentityType

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

	// The identity that last modified dedicated hsm resource.
	LastModifiedBy *string

	// The type of identity that last modified dedicated hsm resource.
	LastModifiedByType *IdentityType
}

DedicatedHsmSystemData - Metadata pertaining to creation and last modification of dedicated hsm resource.

func (DedicatedHsmSystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DedicatedHsmSystemData.

func (*DedicatedHsmSystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DedicatedHsmSystemData.

type EndpointDependency

type EndpointDependency struct {
	// The domain name of the dependency.
	DomainName *string

	// The Ports and Protocols used when connecting to domainName.
	EndpointDetails []*EndpointDetail
}

EndpointDependency - A domain name that dedicated hsm services are reaching at.

func (EndpointDependency) MarshalJSON

func (e EndpointDependency) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EndpointDependency.

func (*EndpointDependency) UnmarshalJSON

func (e *EndpointDependency) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency.

type EndpointDetail

type EndpointDetail struct {
	// Description of the detail
	Description *string

	// An IP Address that Domain Name currently resolves to.
	IPAddress *string

	// The port an endpoint is connected to.
	Port *int32

	// The protocol used for connection
	Protocol *string
}

EndpointDetail - Connect information from the dedicated hsm service to a single endpoint.

func (EndpointDetail) MarshalJSON

func (e EndpointDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EndpointDetail.

func (*EndpointDetail) UnmarshalJSON

func (e *EndpointDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail.

type Error

type Error struct {
	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; Contains more specific error that narrows down the cause. May be null.
	InnerError *Error

	// READ-ONLY; The error message.
	Message *string
}

Error - The key vault server error.

func (Error) MarshalJSON

func (e Error) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Error.

func (*Error) UnmarshalJSON

func (e *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Error.

type IdentityType

type IdentityType string

IdentityType - The type of identity.

const (
	IdentityTypeApplication     IdentityType = "Application"
	IdentityTypeKey             IdentityType = "Key"
	IdentityTypeManagedIdentity IdentityType = "ManagedIdentity"
	IdentityTypeUser            IdentityType = "User"
)

func PossibleIdentityTypeValues

func PossibleIdentityTypeValues() []IdentityType

PossibleIdentityTypeValues returns the possible values for the IdentityType const type.

type JSONWebKeyType

type JSONWebKeyType string

JSONWebKeyType - Provisioning state.

const (
	// JSONWebKeyTypeAllocating - A device is currently being allocated for the dedicated HSM resource.
	JSONWebKeyTypeAllocating JSONWebKeyType = "Allocating"
	// JSONWebKeyTypeCheckingQuota - Validating the subscription has sufficient quota to allocate a dedicated HSM device.
	JSONWebKeyTypeCheckingQuota JSONWebKeyType = "CheckingQuota"
	// JSONWebKeyTypeConnecting - The dedicated HSM is being connected to the virtual network.
	JSONWebKeyTypeConnecting JSONWebKeyType = "Connecting"
	// JSONWebKeyTypeDeleting - The dedicated HSM is currently being deleted.
	JSONWebKeyTypeDeleting JSONWebKeyType = "Deleting"
	// JSONWebKeyTypeFailed - Provisioning of the dedicated HSM has failed.
	JSONWebKeyTypeFailed JSONWebKeyType = "Failed"
	// JSONWebKeyTypeProvisioning - The dedicated HSM is currently being provisioned.
	JSONWebKeyTypeProvisioning JSONWebKeyType = "Provisioning"
	// JSONWebKeyTypeSucceeded - The dedicated HSM has been full provisioned.
	JSONWebKeyTypeSucceeded JSONWebKeyType = "Succeeded"
)

func PossibleJSONWebKeyTypeValues

func PossibleJSONWebKeyTypeValues() []JSONWebKeyType

PossibleJSONWebKeyTypeValues returns the possible values for the JSONWebKeyType const type.

type ManagedServiceIdentity

type ManagedServiceIdentity struct {
	// REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
	Type *ManagedServiceIdentityType

	// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
	// The dictionary values can be empty objects ({}) in
	// requests.
	UserAssignedIdentities map[string]*UserAssignedIdentity

	// READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned
	// identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.
	TenantID *string
}

ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities)

func (ManagedServiceIdentity) MarshalJSON

func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON

func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType

type ManagedServiceIdentityType string

ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func PossibleManagedServiceIdentityTypeValues

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type NetworkInterface

type NetworkInterface struct {
	// Private Ip address of the interface
	PrivateIPAddress *string

	// READ-ONLY; The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/…
	ID *string
}

NetworkInterface - The network interface definition.

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 list of resource Ids for the network interfaces associated with the dedicated HSM.
	NetworkInterfaces []*NetworkInterface

	// Specifies the identifier of the subnet.
	Subnet *APIEntityReference
}

NetworkProfile - The network profile definition.

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 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 - Get a list of Dedicated HSM operations.

Generated from API version 2021-11-30

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/DedicatedHsm_OperationsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.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.DedicatedHsmOperationListResult = armhardwaresecuritymodules.DedicatedHsmOperationListResult{
	// 	Value: []*armhardwaresecuritymodules.DedicatedHsmOperation{
	// 		{
	// 			Name: to.Ptr("hsm1"),
	// 			Display: &armhardwaresecuritymodules.DedicatedHsmOperationDisplay{
	// 				Description: to.Ptr("Update a dedicated HSM in the specified subscription"),
	// 				Operation: to.Ptr("DedicatedHsm_Update"),
	// 				Provider: to.Ptr("Microsoft HardwareSecurityModules"),
	// 				Resource: to.Ptr("Dedicated HSM"),
	// 			},
	// 			IsDataAction: to.Ptr(false),
	// 			Origin: to.Ptr("system"),
	// 	}},
	// }
}
Output:

Example (GetAListOfPaymentHsmOperations)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/stable/2021-11-30/examples/PaymentHsm_OperationsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.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.DedicatedHsmOperationListResult = armhardwaresecuritymodules.DedicatedHsmOperationListResult{
	// 	Value: []*armhardwaresecuritymodules.DedicatedHsmOperation{
	// 		{
	// 			Name: to.Ptr("hsm1"),
	// 			Display: &armhardwaresecuritymodules.DedicatedHsmOperationDisplay{
	// 				Description: to.Ptr("Update a dedicated HSM in the specified subscription"),
	// 				Operation: to.Ptr("DedicatedHsm_Update"),
	// 				Provider: to.Ptr("Microsoft HardwareSecurityModules"),
	// 				Resource: to.Ptr("Dedicated HSM"),
	// 			},
	// 			IsDataAction: to.Ptr(false),
	// 			Origin: to.Ptr("system"),
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// Result of the request to list Dedicated HSM Provider operations. It contains a list of operations.
	DedicatedHsmOperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OutboundEnvironmentEndpoint

type OutboundEnvironmentEndpoint struct {
	// The category of endpoints accessed by the dedicated hsm service, e.g. azure-resource-management, apiserver, etc.
	Category *string

	// The endpoints that dedicated hsm service connects to
	Endpoints []*EndpointDependency
}

OutboundEnvironmentEndpoint - Egress endpoints which dedicated hsm service connects to for common purpose.

func (OutboundEnvironmentEndpoint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint.

func (*OutboundEnvironmentEndpoint) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint.

type OutboundEnvironmentEndpointCollection

type OutboundEnvironmentEndpointCollection struct {
	// REQUIRED; Collection of resources.
	Value []*OutboundEnvironmentEndpoint

	// READ-ONLY; Link to next page of resources.
	NextLink *string
}

OutboundEnvironmentEndpointCollection - Collection of OutboundEnvironmentEndpoint

func (OutboundEnvironmentEndpointCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointCollection.

func (*OutboundEnvironmentEndpointCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointCollection.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; The ARM identifier for private endpoint.
	ID *string
}

PrivateEndpoint - The private endpoint resource.

func (PrivateEndpoint) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Modified whenever there is a change in the state of private endpoint connection.
	Etag *string

	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

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

PrivateEndpointConnection - The private endpoint connection resource.

func (PrivateEndpointConnection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// The URL to get the next set of private endpoint connections.
	NextLink *string

	// Array of private endpoint connections.
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - List of private endpoint connections associated with the specified resource.

func (PrivateEndpointConnectionListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// REQUIRED; A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// The private endpoint resource.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; The group ids for the private endpoint resource.
	GroupIDs []*string

	// READ-ONLY; The provisioning state of the private endpoint connection resource.
	ProvisioningState *PrivateEndpointConnectionProvisioningState
}

PrivateEndpointConnectionProperties - Properties of the private endpoint connection.

func (PrivateEndpointConnectionProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string

PrivateEndpointConnectionProvisioningState - The current provisioning state.

const (
	PrivateEndpointConnectionProvisioningStateCanceled      PrivateEndpointConnectionProvisioningState = "Canceled"
	PrivateEndpointConnectionProvisioningStateCreating      PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting      PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed        PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateInternalError PrivateEndpointConnectionProvisioningState = "InternalError"
	PrivateEndpointConnectionProvisioningStateSucceeded     PrivateEndpointConnectionProvisioningState = "Succeeded"
	PrivateEndpointConnectionProvisioningStateUpdating      PrivateEndpointConnectionProvisioningState = "Updating"
)

func PossiblePrivateEndpointConnectionProvisioningStateValues

func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState

PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.

type PrivateEndpointConnectionsClient

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

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient 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 (*PrivateEndpointConnectionsClient) NewListByCloudHsmClusterPager

NewListByCloudHsmClusterPager - The List operation gets information about the private endpoint connections associated with the Cloud HSM Cluster

Generated from API version 2023-12-10-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • cloudHsmClusterName - The name of the Cloud HSM Cluster within the specified resource group. Cloud HSM Cluster names must be between 3 and 24 characters in length.
  • options - PrivateEndpointConnectionsClientListByCloudHsmClusterOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByCloudHsmClusterPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/18b5c820705ab69735b7e1e2e0da5e37ca6e1969/specification/hardwaresecuritymodules/resource-manager/Microsoft.HardwareSecurityModules/preview/2023-12-10-preview/examples/CloudHsmClusterPrivateEndpointConnection_ListByCloudHsmCluster_MaximumSet_Gen.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhardwaresecuritymodules.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByCloudHsmClusterPager("rgcloudhsm", "chsm1", 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.PrivateEndpointConnectionListResult = armhardwaresecuritymodules.PrivateEndpointConnectionListResult{
	// 	Value: []*armhardwaresecuritymodules.PrivateEndpointConnection{
	// 		{
	// 			Name: to.Ptr("chsm1"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm1/privateEndpointConnections/sample-pec1"),
	// 			SystemData: &armhardwaresecuritymodules.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.PrivateEndpointConnectionProperties{
	// 				PrivateEndpoint: &armhardwaresecuritymodules.PrivateEndpoint{
	// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.Network/privateEndpoints/sample-pec1"),
	// 				},
	// 				PrivateLinkServiceConnectionState: &armhardwaresecuritymodules.PrivateLinkServiceConnectionState{
	// 					Description: to.Ptr("This was automatically approved by user1234@contoso.com"),
	// 					ActionsRequired: to.Ptr("None"),
	// 					Status: to.Ptr(armhardwaresecuritymodules.PrivateEndpointServiceConnectionStatusApproved),
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("chsm2"),
	// 			Type: to.Ptr("Microsoft.HardwareSecurityModules/cloudHsmClusters/privateEndpointConnections"),
	// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/chsm2/privateEndpointConnections/sample-pec2"),
	// 			SystemData: &armhardwaresecuritymodules.SystemData{
	// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				CreatedBy: to.Ptr("User1"),
	// 				CreatedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:00:00.000Z"); return t}()),
	// 				LastModifiedBy: to.Ptr("User2"),
	// 				LastModifiedByType: to.Ptr(armhardwaresecuritymodules.CreatedByTypeUser),
	// 			},
	// 			Properties: &armhardwaresecuritymodules.PrivateEndpointConnectionProperties{
	// 				PrivateEndpoint: &armhardwaresecuritymodules.PrivateEndpoint{
	// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgcloudhsm/providers/Microsoft.Network/privateEndpoints/sample-pec2"),
	// 				},
	// 				PrivateLinkServiceConnectionState: &armhardwaresecuritymodules.PrivateLinkServiceConnectionState{
	// 					Description: to.Ptr("This was automatically approved by user1234@contoso.com"),
	// 					ActionsRequired: to.Ptr("None"),
	// 					Status: to.Ptr(armhardwaresecuritymodules.PrivateEndpointServiceConnectionStatusApproved),
	// 				},
	// 				ProvisioningState: to.Ptr(armhardwaresecuritymodules.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type PrivateEndpointConnectionsClientListByCloudHsmClusterOptions

type PrivateEndpointConnectionsClientListByCloudHsmClusterOptions struct {
}

PrivateEndpointConnectionsClientListByCloudHsmClusterOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByCloudHsmClusterPager method.

type PrivateEndpointConnectionsClientListByCloudHsmClusterResponse

type PrivateEndpointConnectionsClientListByCloudHsmClusterResponse struct {
	// List of private endpoint connections associated with the specified resource.
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListByCloudHsmClusterResponse contains the response from method PrivateEndpointConnectionsClient.NewListByCloudHsmClusterPager.

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string

PrivateEndpointServiceConnectionStatus - The private endpoint connection status.

const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointServiceConnectionStatusValues

func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus

PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

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

PrivateLinkResource - A private link resource.

func (PrivateLinkResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// Array of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResourceListResult - A list of private link resources.

func (PrivateLinkResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// The private link resource private link DNS zone name.
	RequiredZoneNames []*string

	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string

	// The reason for approval/rejection of the connection.
	Description *string

	// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.
	Status *PrivateEndpointServiceConnectionStatus
}

PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.

func (PrivateLinkServiceConnectionState) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The Cloud HSM Cluster's provisioningState

const (
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// 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
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type Resource

type Resource struct {
	// 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
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceListResult

type ResourceListResult struct {
	// The URL to get the next set of dedicated HSM resources.
	NextLink *string

	// The list of dedicated HSM resources.
	Value []*DedicatedHsmResource
}

ResourceListResult - List of dedicated HSM resources.

func (ResourceListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceListResult.

func (*ResourceListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceListResult.

type RestoreProperties

type RestoreProperties struct {
	// Azure Blob storage container Uri
	AzureStorageResourceURI *string

	// Directory name in Azure Storage Blob where the backup is stored
	Foldername *string
}

RestoreProperties - Cloud Hsm Cluster restore information

func (RestoreProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RestoreProperties.

func (*RestoreProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RestoreProperties.

type SKU

type SKU struct {
	// SKU of the dedicated HSM
	Name *SKUName
}

SKU of the dedicated HSM

func (SKU) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUName

type SKUName string

SKUName - SKU of the dedicated HSM

const (
	// SKUNamePayShield10KLMK1CPS250 - The dedicated HSM is a payShield 10K, model PS10-D, 10Gb Ethernet Hardware Platform device
	// with 1 local master key which supports up to 250 calls per second.
	SKUNamePayShield10KLMK1CPS250 SKUName = "payShield10K_LMK1_CPS250"
	// SKUNamePayShield10KLMK1CPS2500 - The dedicated HSM is a payShield 10K, model PS10-D, 10Gb Ethernet Hardware Platform device
	// with 1 local master key which supports up to 2500 calls per second.
	SKUNamePayShield10KLMK1CPS2500 SKUName = "payShield10K_LMK1_CPS2500"
	// SKUNamePayShield10KLMK1CPS60 - The dedicated HSM is a payShield 10K, model PS10-D, 10Gb Ethernet Hardware Platform device
	// with 1 local master key which supports up to 60 calls per second.
	SKUNamePayShield10KLMK1CPS60 SKUName = "payShield10K_LMK1_CPS60"
	// SKUNamePayShield10KLMK2CPS250 - The dedicated HSM is a payShield 10K, model PS10-D, 10Gb Ethernet Hardware Platform device
	// with 2 local master keys which supports up to 250 calls per second.
	SKUNamePayShield10KLMK2CPS250 SKUName = "payShield10K_LMK2_CPS250"
	// SKUNamePayShield10KLMK2CPS2500 - The dedicated HSM is a payShield 10K, model PS10-D, 10Gb Ethernet Hardware Platform device
	// with 2 local master keys which supports up to 2500 calls per second.
	SKUNamePayShield10KLMK2CPS2500 SKUName = "payShield10K_LMK2_CPS2500"
	// SKUNamePayShield10KLMK2CPS60 - The dedicated HSM is a payShield 10K, model PS10-D, 10Gb Ethernet Hardware Platform device
	// with 2 local master keys which supports up to 60 calls per second.
	SKUNamePayShield10KLMK2CPS60 SKUName = "payShield10K_LMK2_CPS60"
	// SKUNameSafeNetLunaNetworkHSMA790 - The dedicated HSM is a Safenet Luna Network HSM A790 device.
	SKUNameSafeNetLunaNetworkHSMA790 SKUName = "SafeNet Luna Network HSM A790"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

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 TrackedResource

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

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

	// READ-ONLY; Fully qualified resource ID for the resource. 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
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type UserAssignedIdentity

type UserAssignedIdentity struct {
	// READ-ONLY; The client ID of the assigned identity.
	ClientID *string

	// READ-ONLY; The principal ID of the assigned identity.
	PrincipalID *string
}

UserAssignedIdentity - User assigned identity properties

func (UserAssignedIdentity) MarshalJSON

func (u UserAssignedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON

func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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