armrecoveryservices

package module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 14 Imported by: 10

README

Azure Recovery Services Module for Go

PkgGoDev

The armrecoveryservices module provides operations for working with Azure Recovery Services.

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 Recovery Services module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices

Authorization

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

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 Recovery Services 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 AlertsState added in v1.0.0

type AlertsState string
const (
	AlertsStateDisabled AlertsState = "Disabled"
	AlertsStateEnabled  AlertsState = "Enabled"
)

func PossibleAlertsStateValues added in v1.0.0

func PossibleAlertsStateValues() []AlertsState

PossibleAlertsStateValues returns the possible values for the AlertsState const type.

type AuthType

type AuthType string

AuthType - Specifies the authentication type.

const (
	AuthTypeAAD                  AuthType = "AAD"
	AuthTypeACS                  AuthType = "ACS"
	AuthTypeAccessControlService AuthType = "AccessControlService"
	AuthTypeAzureActiveDirectory AuthType = "AzureActiveDirectory"
	AuthTypeInvalid              AuthType = "Invalid"
)

func PossibleAuthTypeValues

func PossibleAuthTypeValues() []AuthType

PossibleAuthTypeValues returns the possible values for the AuthType const type.

type AzureMonitorAlertSettings added in v1.0.0

type AzureMonitorAlertSettings struct {
	AlertsForAllJobFailures *AlertsState
}

AzureMonitorAlertSettings - Settings for Azure Monitor based alerts

func (AzureMonitorAlertSettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type AzureMonitorAlertSettings.

func (*AzureMonitorAlertSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AzureMonitorAlertSettings.

type BackupStorageVersion added in v0.3.0

type BackupStorageVersion string

BackupStorageVersion - Backup storage version

const (
	BackupStorageVersionUnassigned BackupStorageVersion = "Unassigned"
	BackupStorageVersionV1         BackupStorageVersion = "V1"
	BackupStorageVersionV2         BackupStorageVersion = "V2"
)

func PossibleBackupStorageVersionValues added in v0.3.0

func PossibleBackupStorageVersionValues() []BackupStorageVersion

PossibleBackupStorageVersionValues returns the possible values for the BackupStorageVersion const type.

type CapabilitiesProperties added in v1.2.0

type CapabilitiesProperties struct {
	DNSZones []*DNSZone
}

CapabilitiesProperties - Capabilities information

func (CapabilitiesProperties) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CapabilitiesProperties.

func (*CapabilitiesProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapabilitiesProperties.

type CapabilitiesResponse added in v1.2.0

type CapabilitiesResponse struct {
	// REQUIRED; Describes the Resource type: Microsoft.RecoveryServices/Vaults
	Type *string

	// Capabilities properties in response
	Properties *CapabilitiesResponseProperties
}

CapabilitiesResponse - Capabilities response for Microsoft.RecoveryServices

func (CapabilitiesResponse) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CapabilitiesResponse.

func (*CapabilitiesResponse) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapabilitiesResponse.

type CapabilitiesResponseProperties added in v1.2.0

type CapabilitiesResponseProperties struct {
	DNSZones []*DNSZoneResponse
}

CapabilitiesResponseProperties - Capabilities properties in response

func (CapabilitiesResponseProperties) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type CapabilitiesResponseProperties.

func (*CapabilitiesResponseProperties) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CapabilitiesResponseProperties.

type CertificateRequest

type CertificateRequest struct {
	// Raw certificate data.
	Properties *RawCertificateData
}

CertificateRequest - Details of the certificate to be uploaded to the vault.

func (CertificateRequest) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CertificateRequest.

func (*CertificateRequest) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CertificateRequest.

type CheckNameAvailabilityParameters

type CheckNameAvailabilityParameters struct {
	// Resource name for which availability needs to be checked
	Name *string

	// Describes the Resource type: Microsoft.RecoveryServices/Vaults
	Type *string
}

CheckNameAvailabilityParameters - Resource Name availability input parameters - Resource type and resource name

func (CheckNameAvailabilityParameters) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityParameters.

func (*CheckNameAvailabilityParameters) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityParameters.

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	Message       *string
	NameAvailable *bool
	Reason        *string
}

CheckNameAvailabilityResult - Response for check name availability API. Resource provider will set availability as true | false.

func (CheckNameAvailabilityResult) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResult.

func (*CheckNameAvailabilityResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResult.

type ClassicAlertSettings added in v1.0.0

type ClassicAlertSettings struct {
	AlertsForCriticalOperations *AlertsState
}

ClassicAlertSettings - Settings for classic alerts

func (ClassicAlertSettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClassicAlertSettings.

func (*ClassicAlertSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClassicAlertSettings.

type Client added in v0.3.0

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

Client contains the methods for the RecoveryServices group. Don't use this type directly, use NewClient() instead.

func NewClient added in v0.3.0

func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values.

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

func (*Client) Capabilities added in v1.2.0

func (client *Client) Capabilities(ctx context.Context, location string, input ResourceCapabilities, options *ClientCapabilitiesOptions) (ClientCapabilitiesResponse, error)

Capabilities - API to get details about capabilities provided by Microsoft.RecoveryServices RP If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • location - Location of the resource
  • input - Contains information about Resource type and properties to get capabilities
  • options - ClientCapabilitiesOptions contains the optional parameters for the Client.Capabilities method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Capabilities.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().Capabilities(ctx, "westus", armrecoveryservices.ResourceCapabilities{
		Type: to.Ptr("Microsoft.RecoveryServices/Vaults"),
		Properties: &armrecoveryservices.CapabilitiesProperties{
			DNSZones: []*armrecoveryservices.DNSZone{
				{
					SubResource: to.Ptr(armrecoveryservices.VaultSubResourceTypeAzureBackup),
				},
				{
					SubResource: to.Ptr(armrecoveryservices.VaultSubResourceTypeAzureSiteRecovery),
				}},
		},
	}, 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.CapabilitiesResponse = armrecoveryservices.CapabilitiesResponse{
	// 	Type: to.Ptr("Microsoft.RecoveryServices/Vaults"),
	// 	Properties: &armrecoveryservices.CapabilitiesResponseProperties{
	// 		DNSZones: []*armrecoveryservices.DNSZoneResponse{
	// 			{
	// 				SubResource: to.Ptr(armrecoveryservices.VaultSubResourceTypeAzureBackup),
	// 				RequiredZoneNames: []*string{
	// 					to.Ptr("privatelink.wus.backup.windowsazure.com"),
	// 					to.Ptr("privatelink.queue.core.windows.net"),
	// 					to.Ptr("privatelink.blob.core.windows.net")},
	// 				},
	// 				{
	// 					SubResource: to.Ptr(armrecoveryservices.VaultSubResourceTypeAzureSiteRecovery),
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.siterecovery.windowsazure.com")},
	// 				}},
	// 			},
	// 		}
}
Output:

func (*Client) CheckNameAvailability added in v0.3.0

func (client *Client) CheckNameAvailability(ctx context.Context, resourceGroupName string, location string, input CheckNameAvailabilityParameters, options *ClientCheckNameAvailabilityOptions) (ClientCheckNameAvailabilityResponse, error)

CheckNameAvailability - API to check for resource name availability. A name is available if no other resource exists that has the same SubscriptionId, Resource Name and Type or if one or more such resources exist, each of these must be GC'd and their time of deletion be more than 24 Hours Ago If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • location - Location of the resource
  • input - Contains information about Resource type and Resource name
  • options - ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.
Example (AvailabilityStatusOfResourceNameWhenNoResourceWithSameNameTypeAndSubscriptionExistsNorHasBeenDeletedWithinLast24Hours)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/CheckNameAvailability_Available.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().CheckNameAvailability(ctx, "resGroupFoo", "westus", armrecoveryservices.CheckNameAvailabilityParameters{
		Name: to.Ptr("swaggerExample"),
		Type: to.Ptr("Microsoft.RecoveryServices/Vaults"),
	}, 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.CheckNameAvailabilityResult = armrecoveryservices.CheckNameAvailabilityResult{
	// 	NameAvailable: to.Ptr(true),
	// }
}
Output:

Example (AvailabilityStatusOfResourceNameWhenResourceWithSameNameTypeAndSubscriptionExists)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/CheckNameAvailability_NotAvailable.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().CheckNameAvailability(ctx, "resGroupBar", "westus", armrecoveryservices.CheckNameAvailabilityParameters{
		Name: to.Ptr("swaggerExample2"),
		Type: to.Ptr("Microsoft.RecoveryServices/Vaults"),
	}, 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.CheckNameAvailabilityResult = armrecoveryservices.CheckNameAvailabilityResult{
	// 	Message: to.Ptr("Resource already exists with the same name."),
	// 	NameAvailable: to.Ptr(false),
	// 	Reason: to.Ptr("AlreadyExists"),
	// }
}
Output:

type ClientCapabilitiesOptions added in v1.2.0

type ClientCapabilitiesOptions struct {
}

ClientCapabilitiesOptions contains the optional parameters for the Client.Capabilities method.

type ClientCapabilitiesResponse added in v1.2.0

type ClientCapabilitiesResponse struct {
	// Capabilities response for Microsoft.RecoveryServices
	CapabilitiesResponse
}

ClientCapabilitiesResponse contains the response from method Client.Capabilities.

type ClientCheckNameAvailabilityOptions added in v0.3.0

type ClientCheckNameAvailabilityOptions struct {
}

ClientCheckNameAvailabilityOptions contains the optional parameters for the Client.CheckNameAvailability method.

type ClientCheckNameAvailabilityResponse added in v0.3.0

type ClientCheckNameAvailabilityResponse struct {
	// Response for check name availability API. Resource provider will set availability as true | false.
	CheckNameAvailabilityResult
}

ClientCheckNameAvailabilityResponse contains the response from method Client.CheckNameAvailability.

type ClientDiscoveryDisplay

type ClientDiscoveryDisplay struct {
	// Description of the operation having details of what operation is about.
	Description *string

	// Operations Name itself.
	Operation *string

	// Name of the provider for display purposes
	Provider *string

	// ResourceType for which this Operation can be performed.
	Resource *string
}

ClientDiscoveryDisplay - Localized display information of an operation.

func (ClientDiscoveryDisplay) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryDisplay.

func (*ClientDiscoveryDisplay) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryDisplay.

type ClientDiscoveryForLogSpecification

type ClientDiscoveryForLogSpecification struct {
	// Blobs created in customer storage account per hour
	BlobDuration *string

	// Localized display name
	DisplayName *string

	// Name of the log.
	Name *string
}

ClientDiscoveryForLogSpecification - Class to represent shoebox log specification in json client discovery.

func (ClientDiscoveryForLogSpecification) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForLogSpecification.

func (*ClientDiscoveryForLogSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForLogSpecification.

type ClientDiscoveryForProperties

type ClientDiscoveryForProperties struct {
	// Operation properties.
	ServiceSpecification *ClientDiscoveryForServiceSpecification
}

ClientDiscoveryForProperties - Class to represent shoebox properties in json client discovery.

func (ClientDiscoveryForProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForProperties.

func (*ClientDiscoveryForProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForProperties.

type ClientDiscoveryForServiceSpecification

type ClientDiscoveryForServiceSpecification struct {
	// List of log specifications of this operation.
	LogSpecifications []*ClientDiscoveryForLogSpecification
}

ClientDiscoveryForServiceSpecification - Class to represent shoebox service specification in json client discovery.

func (ClientDiscoveryForServiceSpecification) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryForServiceSpecification.

func (*ClientDiscoveryForServiceSpecification) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryForServiceSpecification.

type ClientDiscoveryResponse

type ClientDiscoveryResponse struct {
	// Link to the next chunk of the response
	NextLink *string

	// List of available operations.
	Value []*ClientDiscoveryValueForSingleAPI
}

ClientDiscoveryResponse - Operations List response which contains list of available APIs.

func (ClientDiscoveryResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryResponse.

func (*ClientDiscoveryResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryResponse.

type ClientDiscoveryValueForSingleAPI

type ClientDiscoveryValueForSingleAPI struct {
	// Contains the localized display information for this particular operation
	Display *ClientDiscoveryDisplay

	// Name of the Operation.
	Name *string

	// The intended executor of the operation;governs the display of the operation in the RBAC UX and the audit logs UX
	Origin *string

	// ShoeBox properties for the given operation.
	Properties *ClientDiscoveryForProperties
}

ClientDiscoveryValueForSingleAPI - Available operation details.

func (ClientDiscoveryValueForSingleAPI) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ClientDiscoveryValueForSingleAPI.

func (*ClientDiscoveryValueForSingleAPI) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ClientDiscoveryValueForSingleAPI.

type ClientFactory added in v1.3.0

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

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v1.3.0

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

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

func (*ClientFactory) NewClient added in v1.3.0

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

func (*ClientFactory) NewOperationsClient added in v1.3.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.3.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewRegisteredIdentitiesClient added in v1.3.0

func (c *ClientFactory) NewRegisteredIdentitiesClient() *RegisteredIdentitiesClient

NewRegisteredIdentitiesClient creates a new instance of RegisteredIdentitiesClient.

func (*ClientFactory) NewReplicationUsagesClient added in v1.3.0

func (c *ClientFactory) NewReplicationUsagesClient() *ReplicationUsagesClient

NewReplicationUsagesClient creates a new instance of ReplicationUsagesClient.

func (*ClientFactory) NewUsagesClient added in v1.3.0

func (c *ClientFactory) NewUsagesClient() *UsagesClient

NewUsagesClient creates a new instance of UsagesClient.

func (*ClientFactory) NewVaultCertificatesClient added in v1.3.0

func (c *ClientFactory) NewVaultCertificatesClient() *VaultCertificatesClient

NewVaultCertificatesClient creates a new instance of VaultCertificatesClient.

func (*ClientFactory) NewVaultExtendedInfoClient added in v1.3.0

func (c *ClientFactory) NewVaultExtendedInfoClient() *VaultExtendedInfoClient

NewVaultExtendedInfoClient creates a new instance of VaultExtendedInfoClient.

func (*ClientFactory) NewVaultsClient added in v1.3.0

func (c *ClientFactory) NewVaultsClient() *VaultsClient

NewVaultsClient creates a new instance of VaultsClient.

type CmkKekIdentity

type CmkKekIdentity struct {
	// Indicate that system assigned identity should be used. Mutually exclusive with 'userAssignedIdentity' field
	UseSystemAssignedIdentity *bool

	// The user assigned identity to be used to grant permissions in case the type of identity used is UserAssigned
	UserAssignedIdentity *string
}

CmkKekIdentity - The details of the identity used for CMK

func (CmkKekIdentity) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CmkKekIdentity.

func (*CmkKekIdentity) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CmkKekIdentity.

type CmkKeyVaultProperties

type CmkKeyVaultProperties struct {
	// The key uri of the Customer Managed Key
	KeyURI *string
}

CmkKeyVaultProperties - The properties of the Key Vault which hosts CMK

func (CmkKeyVaultProperties) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CmkKeyVaultProperties.

func (*CmkKeyVaultProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CmkKeyVaultProperties.

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 CrossRegionRestore added in v1.1.0

type CrossRegionRestore string

CrossRegionRestore - Flag to show if Cross Region Restore is enabled on the Vault or not

const (
	CrossRegionRestoreDisabled CrossRegionRestore = "Disabled"
	CrossRegionRestoreEnabled  CrossRegionRestore = "Enabled"
)

func PossibleCrossRegionRestoreValues added in v1.1.0

func PossibleCrossRegionRestoreValues() []CrossRegionRestore

PossibleCrossRegionRestoreValues returns the possible values for the CrossRegionRestore const type.

type CrossSubscriptionRestoreSettings added in v1.4.0

type CrossSubscriptionRestoreSettings struct {
	CrossSubscriptionRestoreState *CrossSubscriptionRestoreState
}

CrossSubscriptionRestoreSettings - Settings for Cross Subscription Restore Settings

func (CrossSubscriptionRestoreSettings) MarshalJSON added in v1.4.0

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

MarshalJSON implements the json.Marshaller interface for type CrossSubscriptionRestoreSettings.

func (*CrossSubscriptionRestoreSettings) UnmarshalJSON added in v1.4.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CrossSubscriptionRestoreSettings.

type CrossSubscriptionRestoreState added in v1.4.0

type CrossSubscriptionRestoreState string
const (
	CrossSubscriptionRestoreStateDisabled            CrossSubscriptionRestoreState = "Disabled"
	CrossSubscriptionRestoreStateEnabled             CrossSubscriptionRestoreState = "Enabled"
	CrossSubscriptionRestoreStatePermanentlyDisabled CrossSubscriptionRestoreState = "PermanentlyDisabled"
)

func PossibleCrossSubscriptionRestoreStateValues added in v1.4.0

func PossibleCrossSubscriptionRestoreStateValues() []CrossSubscriptionRestoreState

PossibleCrossSubscriptionRestoreStateValues returns the possible values for the CrossSubscriptionRestoreState const type.

type DNSZone added in v1.2.0

type DNSZone struct {
	// Subresource type for vault AzureBackup, AzureBackup_secondary or AzureSiteRecovery
	SubResource *VaultSubResourceType
}

DNSZone information

func (DNSZone) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type DNSZone.

func (*DNSZone) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DNSZone.

type DNSZoneResponse added in v1.2.0

type DNSZoneResponse struct {
	// The private link resource Private link DNS zone names.
	RequiredZoneNames []*string

	// Subresource type for vault AzureBackup, AzureBackup_secondary or AzureSiteRecovery
	SubResource *VaultSubResourceType
}

DNSZoneResponse - DNSZone information for Microsoft.RecoveryServices

func (DNSZoneResponse) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type DNSZoneResponse.

func (*DNSZoneResponse) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type DNSZoneResponse.

type Error

type Error struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*Error

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

	// READ-ONLY; The error target.
	Target *string
}

Error - The resource management error response.

func (Error) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Error.

func (*Error) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Error.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type IdentityData

type IdentityData struct {
	// REQUIRED; The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created
	// identity and a set of user-assigned identities. The type 'None' will remove any
	// identities.
	Type *ResourceIdentityType

	// The list of user-assigned identities associated with the resource. The user-assigned identity dictionary keys will be ARM
	// resource ids in the form:
	// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
	UserAssignedIdentities map[string]*UserIdentity

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of resource.
	TenantID *string
}

IdentityData - Identity for the resource.

func (IdentityData) MarshalJSON

func (i IdentityData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IdentityData.

func (*IdentityData) UnmarshalJSON added in v1.1.0

func (i *IdentityData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IdentityData.

type ImmutabilitySettings added in v1.2.0

type ImmutabilitySettings struct {
	State *ImmutabilityState
}

ImmutabilitySettings - Immutability Settings of vault

func (ImmutabilitySettings) MarshalJSON added in v1.2.0

func (i ImmutabilitySettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ImmutabilitySettings.

func (*ImmutabilitySettings) UnmarshalJSON added in v1.2.0

func (i *ImmutabilitySettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ImmutabilitySettings.

type ImmutabilityState added in v1.2.0

type ImmutabilityState string
const (
	ImmutabilityStateDisabled ImmutabilityState = "Disabled"
	ImmutabilityStateLocked   ImmutabilityState = "Locked"
	ImmutabilityStateUnlocked ImmutabilityState = "Unlocked"
)

func PossibleImmutabilityStateValues added in v1.2.0

func PossibleImmutabilityStateValues() []ImmutabilityState

PossibleImmutabilityStateValues returns the possible values for the ImmutabilityState const type.

type InfrastructureEncryptionState

type InfrastructureEncryptionState string

InfrastructureEncryptionState - Enabling/Disabling the Double Encryption state

const (
	InfrastructureEncryptionStateDisabled InfrastructureEncryptionState = "Disabled"
	InfrastructureEncryptionStateEnabled  InfrastructureEncryptionState = "Enabled"
)

func PossibleInfrastructureEncryptionStateValues

func PossibleInfrastructureEncryptionStateValues() []InfrastructureEncryptionState

PossibleInfrastructureEncryptionStateValues returns the possible values for the InfrastructureEncryptionState const type.

type JobsSummary

type JobsSummary struct {
	// Count of failed jobs.
	FailedJobs *int32

	// Count of in-progress jobs.
	InProgressJobs *int32

	// Count of suspended jobs.
	SuspendedJobs *int32
}

JobsSummary - Summary of the replication job data for this vault.

func (JobsSummary) MarshalJSON added in v1.1.0

func (j JobsSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type JobsSummary.

func (*JobsSummary) UnmarshalJSON added in v1.1.0

func (j *JobsSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type JobsSummary.

type MonitoringSettings added in v1.0.0

type MonitoringSettings struct {
	// Settings for Azure Monitor based alerts
	AzureMonitorAlertSettings *AzureMonitorAlertSettings

	// Settings for classic alerts
	ClassicAlertSettings *ClassicAlertSettings
}

MonitoringSettings - Monitoring Settings of the vault

func (MonitoringSettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MonitoringSettings.

func (*MonitoringSettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringSettings.

type MonitoringSummary

type MonitoringSummary struct {
	// Count of all deprecated recovery service providers.
	DeprecatedProviderCount *int32

	// Count of all critical warnings.
	EventsCount *int32

	// Count of all the supported recovery service providers.
	SupportedProviderCount *int32

	// Count of unhealthy replication providers.
	UnHealthyProviderCount *int32

	// Count of unhealthy VMs.
	UnHealthyVMCount *int32

	// Count of all the unsupported recovery service providers.
	UnsupportedProviderCount *int32
}

MonitoringSummary - Summary of the replication monitoring data for this vault.

func (MonitoringSummary) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MonitoringSummary.

func (*MonitoringSummary) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MonitoringSummary.

type MultiUserAuthorization added in v1.5.0

type MultiUserAuthorization string

MultiUserAuthorization - MUA Settings of vault

const (
	MultiUserAuthorizationDisabled MultiUserAuthorization = "Disabled"
	MultiUserAuthorizationEnabled  MultiUserAuthorization = "Enabled"
	MultiUserAuthorizationInvalid  MultiUserAuthorization = "Invalid"
)

func PossibleMultiUserAuthorizationValues added in v1.5.0

func PossibleMultiUserAuthorizationValues() []MultiUserAuthorization

PossibleMultiUserAuthorizationValues returns the possible values for the MultiUserAuthorization const type.

type NameInfo

type NameInfo struct {
	// Localized value of usage.
	LocalizedValue *string

	// Value of usage.
	Value *string
}

NameInfo - The name of usage.

func (NameInfo) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type NameInfo.

func (*NameInfo) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type NameInfo.

type OperationResource

type OperationResource struct {
	// End time of the operation
	EndTime *time.Time

	// Required if status == failed or status == canceled. This is the OData v4 error format, used by the RPC and will go into
	// the v2.2 Azure REST API guidelines.
	Error *Error

	// It should match what is used to GET the operation result
	ID *string

	// It must match the last segment of the "id" field, and will typically be a GUID / system generated value
	Name *string

	// Start time of the operation
	StartTime *time.Time

	// The status of the operation. (InProgress/Success/Failed/Cancelled)
	Status *string
}

OperationResource - Operation Resource

func (OperationResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationResource.

func (*OperationResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResource.

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(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

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

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

func (*OperationsClient) GetOperationResult

func (client *OperationsClient) GetOperationResult(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *OperationsClientGetOperationResultOptions) (OperationsClientGetOperationResultResponse, error)

GetOperationResult - Gets the operation result for a resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - OperationsClientGetOperationResultOptions contains the optional parameters for the OperationsClient.GetOperationResult method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/GetOperationResult.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOperationsClient().GetOperationResult(ctx, "HelloWorld", "swaggerExample", "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"PatchKey": to.Ptr("PatchKeyUpdated"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
	// 			"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": &armrecoveryservices.UserIdentity{
	// 				ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 				PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

func (*OperationsClient) NewListPager added in v0.5.0

NewListPager - Returns the list of available operations.

Generated from API version 2023-04-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ListOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.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.ClientDiscoveryResponse = armrecoveryservices.ClientDiscoveryResponse{
		// 	Value: []*armrecoveryservices.ClientDiscoveryValueForSingleAPI{
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/usages/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns usage details for a Recovery Services Vault."),
		// 				Operation: to.Ptr("Recovery Services Vault usage details."),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Vault Usage"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupUsageSummaries/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns summaries for Protected Items and Protected Servers for a Recovery Services ."),
		// 				Operation: to.Ptr("Recovery Services Protected Items and Protected Servers usage summaries details."),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Usages Summaries"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/storageConfig/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns Storage Configuration for Recovery Services Vault."),
		// 				Operation: to.Ptr("Get Resource Storage Config"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Vault Storage Config"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/storageConfig/write"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Updates Storage Configuration for Recovery Services Vault."),
		// 				Operation: to.Ptr("Write Resource Storage Config"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Vault Storage Config"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupconfig/vaultconfig/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns Configuration for Recovery Services Vault."),
		// 				Operation: to.Ptr("Get Resource Config"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Vault Config"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupconfig/vaultconfig/write"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Updates Configuration for Recovery Services Vault."),
		// 				Operation: to.Ptr("Update Resource Config"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Vault Config"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/tokenInfo/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns token information for Recovery Services Vault."),
		// 				Operation: to.Ptr("Get Vault Token Info"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Token Info"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupSecurityPIN/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns Security PIN Information for Recovery Services Vault."),
		// 				Operation: to.Ptr("Get Security PIN Info"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("SecurityPINInfo"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupManagementMetaData/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns Backup Management Metadata for Recovery Services Vault."),
		// 				Operation: to.Ptr("Get Backup Management Metadata"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Management Metadata"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupOperationResults/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns Backup Operation Result for Recovery Services Vault."),
		// 				Operation: to.Ptr("Get Backup Operation Result"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Operation Results"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupOperations/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns Backup Operation Status for Recovery Services Vault."),
		// 				Operation: to.Ptr("Get Backup Operation Status"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Operation Status"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupJobs/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns all Job Objects"),
		// 				Operation: to.Ptr("Get Jobs"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Jobs"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupJobs/cancel/action"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Cancel the Job"),
		// 				Operation: to.Ptr("Cancel Jobs"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Jobs"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupJobsExport/action"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Export Jobs"),
		// 				Operation: to.Ptr("Export Jobs"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Export Backup Jobs"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupJobs/operationResults/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns the Result of Job Operation."),
		// 				Operation: to.Ptr("Get Job Operation Result"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Jobs Operation Results"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupJobsExport/operationResults/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns the Result of Export Job Operation."),
		// 				Operation: to.Ptr("Get Export Job Operation Result"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Export Backup Jobs Operation Results"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Get Recovery Points for Protected Items."),
		// 				Operation: to.Ptr("Get Recovery Points"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Recovery Points"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/restore/action"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Restore Recovery Points for Protected Items."),
		// 				Operation: to.Ptr("Restore Recovery Points"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Recovery Points"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/provisionInstantItemRecovery/action"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Provision Instant Item Recovery for Protected Item"),
		// 				Operation: to.Ptr("Provision Instant Item Recovery for Protected Item"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Recovery Points"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/recoveryPoints/revokeInstantItemRecovery/action"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Revoke Instant Item Recovery for Protected Item"),
		// 				Operation: to.Ptr("Revoke Instant Item Recovery for Protected Item"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Recovery Points"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupPolicies/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns all Protection Policies"),
		// 				Operation: to.Ptr("Get Protection Policy"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Policies"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupPolicies/write"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Creates Protection Policy"),
		// 				Operation: to.Ptr("Create Protection Policy"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Policies"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupPolicies/delete"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Delete a Protection Policy"),
		// 				Operation: to.Ptr("Delete Protection Policy"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Policies"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupPolicies/operationResults/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Get Results of Policy Operation."),
		// 				Operation: to.Ptr("Get Policy Operation Results"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Policy Operation Results"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupPolicies/operationsStatus/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Get Status of Policy Operation."),
		// 				Operation: to.Ptr("Get Policy Operation Status"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Policy Operation Status"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns object details of the Protected Item"),
		// 				Operation: to.Ptr("Get Protected Item Details"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protected Items"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupProtectedItems/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns the list of all Protected Items."),
		// 				Operation: to.Ptr("Get All Protected Items"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protected Items"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/write"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Create a backup Protected Item"),
		// 				Operation: to.Ptr("Create Backup Protected Item"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protected Items"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/delete"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Deletes Protected Item"),
		// 				Operation: to.Ptr("Delete Protected Items"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protected Items"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/operationResults/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Gets Result of Operation Performed on Protected Items."),
		// 				Operation: to.Ptr("Get Protected Items Operation Results"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protected Item Operation Results"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/operationsStatus/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns the status of Operation performed on Protected Items."),
		// 				Operation: to.Ptr("Get Protected Items operation status"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protected Item Operation Status"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/protectedItems/backup/action"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Performs Backup for Protected Item."),
		// 				Operation: to.Ptr("Backup Protected Item"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protected Items"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupProtectableItems/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns list of all Protectable Items."),
		// 				Operation: to.Ptr("Get Protectable Items"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Protectable Items"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/refreshContainers/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Refreshes the container list"),
		// 				Operation: to.Ptr("Refresh container"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Refresh Containers"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/operationResults/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns status of the operation"),
		// 				Operation: to.Ptr("Get Operation Results"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Refresh Containers Operation Results"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupProtectionContainers/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns all containers belonging to the subscription"),
		// 				Operation: to.Ptr("Get Containers In Subscription"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Protection Containers"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns all registered containers"),
		// 				Operation: to.Ptr("Get Registered Container"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protection Containers"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/operationResults/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Gets result of Operation performed on Protection Container."),
		// 				Operation: to.Ptr("Get Container Operation Results"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protection Containers Operation Results"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupEngines"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Returns all the backup management servers registered with vault."),
		// 				Operation: to.Ptr("List of backup management servers."),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Engines"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupStatus"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Check Backup Status for Recovery Services Vaults"),
		// 				Operation: to.Ptr("Check Backup Status for Vault"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Backup Status"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupPreValidateProtection"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr(""),
		// 				Operation: to.Ptr("Pre Validate Enable Protection"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("PreValidate Protection"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupValidateFeatures"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Validate Features"),
		// 				Operation: to.Ptr("Validate Features"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Validate Features"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/backupProtectionIntent/write"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Create a backup Protection Intent"),
		// 				Operation: to.Ptr("Create backup Protection Intent"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protection Intent"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/{fabricName}/protectionContainers/{containerName}/items/read"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Get all items in a container"),
		// 				Operation: to.Ptr("Get all items in a container"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Workload Items"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 		},
		// 		{
		// 			Name: to.Ptr("microsoft.recoveryservices/vaults/backupFabrics/protectionContainers/inquire/action"),
		// 			Display: &armrecoveryservices.ClientDiscoveryDisplay{
		// 				Description: to.Ptr("Get all items in a container"),
		// 				Operation: to.Ptr("Get all items in a container"),
		// 				Provider: to.Ptr("microsoft.recoveryservices"),
		// 				Resource: to.Ptr("Protection Containers Inquire"),
		// 			},
		// 			Origin: to.Ptr("user"),
		// 	}},
		// }
	}
}
Output:

func (*OperationsClient) OperationStatusGet

func (client *OperationsClient) OperationStatusGet(ctx context.Context, resourceGroupName string, vaultName string, operationID string, options *OperationsClientOperationStatusGetOptions) (OperationsClientOperationStatusGetResponse, error)

OperationStatusGet - Gets the operation status for a resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - OperationsClientOperationStatusGetOptions contains the optional parameters for the OperationsClient.OperationStatusGet method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/GetOperationStatus.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOperationsClient().OperationStatusGet(ctx, "HelloWorld", "swaggerExample", "YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA==", 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.OperationResource = armrecoveryservices.OperationResource{
	// 	Name: to.Ptr("YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA=="),
	// 	EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-20T09:49:46.000Z"); return t}()),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample/operationStatus/YWUzNDFkMzQtZmM5OS00MmUyLWEzNDMtZGJkMDIxZjlmZjgzOzdmYzBiMzhmLTc2NmItNDM5NS05OWQ1LTVmOGEzNzg4MWQzNA=="),
	// 	StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-11-20T09:49:44.047Z"); return t}()),
	// 	Status: to.Ptr("Succeeded"),
	// }
}
Output:

type OperationsClientGetOperationResultOptions added in v0.3.0

type OperationsClientGetOperationResultOptions struct {
}

OperationsClientGetOperationResultOptions contains the optional parameters for the OperationsClient.GetOperationResult method.

type OperationsClientGetOperationResultResponse added in v0.3.0

type OperationsClientGetOperationResultResponse struct {
	// Resource information, as returned by the resource provider.
	Vault
}

OperationsClientGetOperationResultResponse contains the response from method OperationsClient.GetOperationResult.

type OperationsClientListOptions added in v0.3.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.3.0

type OperationsClientListResponse struct {
	// Operations List response which contains list of available APIs.
	ClientDiscoveryResponse
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OperationsClientOperationStatusGetOptions added in v0.3.0

type OperationsClientOperationStatusGetOptions struct {
}

OperationsClientOperationStatusGetOptions contains the optional parameters for the OperationsClient.OperationStatusGet method.

type OperationsClientOperationStatusGetResponse added in v0.3.0

type OperationsClientOperationStatusGetResponse struct {
	// Operation Resource
	OperationResource
}

OperationsClientOperationStatusGetResponse contains the response from method OperationsClient.OperationStatusGet.

type PatchTrackedResource

type PatchTrackedResource struct {
	// Optional ETag.
	Etag *string

	// Resource location.
	Location *string

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

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string

	// READ-ONLY; Resource name associated with the resource.
	Name *string

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string
}

PatchTrackedResource - Tracked resource with location.

func (PatchTrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PatchTrackedResource.

func (*PatchTrackedResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PatchTrackedResource.

type PatchVault

type PatchVault struct {
	// Optional ETag.
	Etag *string

	// Identity for the resource.
	Identity *IdentityData

	// Resource location.
	Location *string

	// Properties of the vault.
	Properties *VaultProperties

	// Identifies the unique system identifier for each Azure resource.
	SKU *SKU

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

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string

	// READ-ONLY; Resource name associated with the resource.
	Name *string

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string
}

PatchVault - Patch Resource information, as returned by the resource provider.

func (PatchVault) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PatchVault.

func (*PatchVault) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PatchVault.

type PrivateEndpoint

type PrivateEndpoint struct {
	// READ-ONLY; Gets or sets id.
	ID *string
}

PrivateEndpoint - The Private Endpoint network resource that is linked to the Private Endpoint connection.

func (PrivateEndpoint) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint.

func (*PrivateEndpoint) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Group Ids for the Private Endpoint
	GroupIDs []*VaultSubResourceType

	// READ-ONLY; The Private Endpoint network resource that is linked to the Private Endpoint connection.
	PrivateEndpoint *PrivateEndpoint

	// READ-ONLY; Gets or sets private link service connection state.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState

	// READ-ONLY; Gets or sets provisioning state of the private endpoint connection.
	ProvisioningState *ProvisioningState
}

PrivateEndpointConnection - Private Endpoint Connection Response Properties.

func (PrivateEndpointConnection) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionStatus

type PrivateEndpointConnectionStatus string

PrivateEndpointConnectionStatus - Gets or sets the status.

const (
	PrivateEndpointConnectionStatusApproved     PrivateEndpointConnectionStatus = "Approved"
	PrivateEndpointConnectionStatusDisconnected PrivateEndpointConnectionStatus = "Disconnected"
	PrivateEndpointConnectionStatusPending      PrivateEndpointConnectionStatus = "Pending"
	PrivateEndpointConnectionStatusRejected     PrivateEndpointConnectionStatus = "Rejected"
)

func PossiblePrivateEndpointConnectionStatusValues

func PossiblePrivateEndpointConnectionStatusValues() []PrivateEndpointConnectionStatus

PossiblePrivateEndpointConnectionStatusValues returns the possible values for the PrivateEndpointConnectionStatus const type.

type PrivateEndpointConnectionVaultProperties

type PrivateEndpointConnectionVaultProperties struct {
	// READ-ONLY; Format of id subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.[Service]/{resource}/{resourceName}/privateEndpointConnections/{connectionName}.
	ID *string

	// READ-ONLY; The location of the private Endpoint connection
	Location *string

	// READ-ONLY; The name of the private Endpoint Connection
	Name *string

	// READ-ONLY; Private Endpoint Connection Response Properties.
	Properties *PrivateEndpointConnection

	// READ-ONLY; The type, which will be of the format, Microsoft.RecoveryServices/vaults/privateEndpointConnections
	Type *string
}

PrivateEndpointConnectionVaultProperties - Information to be stored in Vault properties as an element of privateEndpointConnections List.

func (PrivateEndpointConnectionVaultProperties) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionVaultProperties.

func (*PrivateEndpointConnectionVaultProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionVaultProperties.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; Fully qualified identifier of the resource.
	ID *string

	// READ-ONLY; Name of the resource.
	Name *string

	// READ-ONLY; e.g. Microsoft.RecoveryServices/vaults/privateLinkResources
	Type *string
}

PrivateLinkResource - Information of the private link resource.

func (PrivateLinkResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// READ-ONLY; e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery)
	GroupID *string

	// READ-ONLY; [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1]
	RequiredMembers []*string

	// READ-ONLY; The private link resource Private link DNS zone name.
	RequiredZoneNames []*string
}

PrivateLinkResourceProperties - Properties of the private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResources

type PrivateLinkResources struct {
	// Link to the next chunk of the response
	NextLink *string

	// A collection of private link resources
	Value []*PrivateLinkResource
}

PrivateLinkResources - Class which represent the stamps associated with the vault.

func (PrivateLinkResources) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResources.

func (*PrivateLinkResources) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResources.

type PrivateLinkResourcesClient

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

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

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

func (*PrivateLinkResourcesClient) Get

func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, vaultName string, privateLinkResourceName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)

Get - Returns a specified private link resource that need to be created for Backup and SiteRecovery If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/GetPrivateLinkResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "petesting", "pemsi-ecy-rsv2", "backupResource", 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.PrivateLinkResource = armrecoveryservices.PrivateLinkResource{
	// 	Name: to.Ptr("backupResource"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/Vaults/privateLinkResources"),
	// 	ID: to.Ptr("/subscriptions/6c48fa17-39c7-45f1-90ac-47a587128ace/resourceGroups/petesting/providers/Microsoft.RecoveryServices/Vaults/pemsi-ecy-rsv2/privateLinkResources/backupResource"),
	// 	Properties: &armrecoveryservices.PrivateLinkResourceProperties{
	// 		GroupID: to.Ptr("AzureBackup"),
	// 		RequiredMembers: []*string{
	// 			to.Ptr("backup-fab1"),
	// 			to.Ptr("backup-rec2"),
	// 			to.Ptr("backup-prot1"),
	// 			to.Ptr("backup-ecs1"),
	// 			to.Ptr("backup-tel1"),
	// 			to.Ptr("backup-wbcm1"),
	// 			to.Ptr("backup-fc1"),
	// 			to.Ptr("backup-id1")},
	// 			RequiredZoneNames: []*string{
	// 				to.Ptr("privatelink.ecy.backup.windowsazure.com"),
	// 				to.Ptr("privatelink.queue.core.windows.net"),
	// 				to.Ptr("privatelink.blob.core.windows.net")},
	// 			},
	// 		}
}
Output:

func (*PrivateLinkResourcesClient) NewListPager added in v0.5.0

NewListPager - Returns the list of private link resources that need to be created for Backup and SiteRecovery

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ListPrivateLinkResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPrivateLinkResourcesClient().NewListPager("petesting", "pemsi-ecy-rsv2", 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.PrivateLinkResources = armrecoveryservices.PrivateLinkResources{
		// 	Value: []*armrecoveryservices.PrivateLinkResource{
		// 		{
		// 			Name: to.Ptr("backupResource"),
		// 			Type: to.Ptr("Microsoft.RecoveryServices/Vaults/privateLinkResources"),
		// 			ID: to.Ptr("/subscriptions/6c48fa17-39c7-45f1-90ac-47a587128ace/resourceGroups/petesting/providers/Microsoft.RecoveryServices/Vaults/pemsi-ecy-rsv2/privateLinkResources/backupResource"),
		// 			Properties: &armrecoveryservices.PrivateLinkResourceProperties{
		// 				GroupID: to.Ptr("AzureBackup"),
		// 				RequiredMembers: []*string{
		// 					to.Ptr("backup-fab1"),
		// 					to.Ptr("backup-rec2"),
		// 					to.Ptr("backup-prot1"),
		// 					to.Ptr("backup-ecs1"),
		// 					to.Ptr("backup-tel1"),
		// 					to.Ptr("backup-wbcm1"),
		// 					to.Ptr("backup-fc1"),
		// 					to.Ptr("backup-id1")},
		// 					RequiredZoneNames: []*string{
		// 						to.Ptr("privatelink.ecy.backup.windowsazure.com"),
		// 						to.Ptr("privatelink.queue.core.windows.net"),
		// 						to.Ptr("privatelink.blob.core.windows.net")},
		// 					},
		// 				},
		// 				{
		// 					Name: to.Ptr("siteRecoveryResource"),
		// 					Type: to.Ptr("Microsoft.RecoveryServices/vaults/privateLinkResources"),
		// 					ID: to.Ptr("/subscriptions/6c48fa17-39c7-45f1-90ac-47a587128ace/resourceGroups/gaallarg/providers/Microsoft.RecoveryServices/vaults/amchandnTest2702A/privateLinkResources/siteRecoveryResource"),
		// 					Properties: &armrecoveryservices.PrivateLinkResourceProperties{
		// 						GroupID: to.Ptr("AzureSiteRecovery"),
		// 						RequiredMembers: []*string{
		// 							to.Ptr("siteRecovery-rcm1"),
		// 							to.Ptr("siteRecovery-prot2"),
		// 							to.Ptr("siteRecovery-tel1"),
		// 							to.Ptr("siteRecovery-srs1"),
		// 							to.Ptr("siteRecovery-prot2b"),
		// 							to.Ptr("siteRecovery-id1")},
		// 							RequiredZoneNames: []*string{
		// 								to.Ptr("privatelink.ecy.siterecovery.windowsazure.com"),
		// 								to.Ptr("privatelink.queue.core.windows.net"),
		// 								to.Ptr("privatelink.blob.core.windows.net")},
		// 							},
		// 					}},
		// 				}
	}
}
Output:

type PrivateLinkResourcesClientGetOptions added in v0.3.0

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse added in v0.3.0

type PrivateLinkResourcesClientGetResponse struct {
	// Information of the private link resource.
	PrivateLinkResource
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListOptions added in v0.3.0

type PrivateLinkResourcesClientListOptions struct {
}

PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListPager method.

type PrivateLinkResourcesClientListResponse added in v0.3.0

type PrivateLinkResourcesClientListResponse struct {
	// Class which represent the stamps associated with the vault.
	PrivateLinkResources
}

PrivateLinkResourcesClientListResponse contains the response from method PrivateLinkResourcesClient.NewListPager.

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	// READ-ONLY; Gets or sets actions required.
	ActionsRequired *string

	// READ-ONLY; Gets or sets description.
	Description *string

	// READ-ONLY; Gets or sets the status.
	Status *PrivateEndpointConnectionStatus
}

PrivateLinkServiceConnectionState - Gets or sets private link service connection state.

func (PrivateLinkServiceConnectionState) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState.

func (*PrivateLinkServiceConnectionState) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Gets or sets provisioning state of the private endpoint connection.

const (
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStatePending   ProvisioningState = "Pending"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type PublicNetworkAccess added in v1.2.0

type PublicNetworkAccess string

PublicNetworkAccess - property to enable or disable resource provider inbound network traffic from public clients

const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func PossiblePublicNetworkAccessValues added in v1.2.0

func PossiblePublicNetworkAccessValues() []PublicNetworkAccess

PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.

type RawCertificateData

type RawCertificateData struct {
	// Specifies the authentication type.
	AuthType *AuthType

	// The base64 encoded certificate raw data string
	Certificate []byte
}

RawCertificateData - Raw certificate data.

func (RawCertificateData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RawCertificateData.

func (*RawCertificateData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RawCertificateData.

type RegisteredIdentitiesClient

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

RegisteredIdentitiesClient contains the methods for the RegisteredIdentities group. Don't use this type directly, use NewRegisteredIdentitiesClient() instead.

func NewRegisteredIdentitiesClient

func NewRegisteredIdentitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegisteredIdentitiesClient, error)

NewRegisteredIdentitiesClient creates a new instance of RegisteredIdentitiesClient with the specified values.

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

func (*RegisteredIdentitiesClient) Delete

Delete - Unregisters the given container from your Recovery Services vault. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • identityName - Name of the protection container to unregister.
  • options - RegisteredIdentitiesClientDeleteOptions contains the optional parameters for the RegisteredIdentitiesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/DeleteRegisteredIdentities.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewRegisteredIdentitiesClient().Delete(ctx, "BCDRIbzRG", "BCDRIbzVault", "dpmcontainer01", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

type RegisteredIdentitiesClientDeleteOptions added in v0.3.0

type RegisteredIdentitiesClientDeleteOptions struct {
}

RegisteredIdentitiesClientDeleteOptions contains the optional parameters for the RegisteredIdentitiesClient.Delete method.

type RegisteredIdentitiesClientDeleteResponse added in v0.3.0

type RegisteredIdentitiesClientDeleteResponse struct {
}

RegisteredIdentitiesClientDeleteResponse contains the response from method RegisteredIdentitiesClient.Delete.

type ReplicationUsage

type ReplicationUsage struct {
	// Summary of the replication jobs data for this vault.
	JobsSummary *JobsSummary

	// Summary of the replication monitoring data for this vault.
	MonitoringSummary *MonitoringSummary

	// Number of replication protected items for this vault.
	ProtectedItemCount *int32

	// Number of replication recovery plans for this vault.
	RecoveryPlanCount *int32

	// The authentication type of recovery service providers in the vault.
	RecoveryServicesProviderAuthType *int32

	// Number of servers registered to this vault.
	RegisteredServersCount *int32
}

ReplicationUsage - Replication usages of a vault.

func (ReplicationUsage) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ReplicationUsage.

func (*ReplicationUsage) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationUsage.

type ReplicationUsageList

type ReplicationUsageList struct {
	// The list of replication usages for the given vault.
	Value []*ReplicationUsage
}

ReplicationUsageList - Replication usages for vault.

func (ReplicationUsageList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ReplicationUsageList.

func (*ReplicationUsageList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationUsageList.

type ReplicationUsagesClient

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

ReplicationUsagesClient contains the methods for the ReplicationUsages group. Don't use this type directly, use NewReplicationUsagesClient() instead.

func NewReplicationUsagesClient

func NewReplicationUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationUsagesClient, error)

NewReplicationUsagesClient creates a new instance of ReplicationUsagesClient with the specified values.

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

func (*ReplicationUsagesClient) NewListPager added in v0.5.0

func (client *ReplicationUsagesClient) NewListPager(resourceGroupName string, vaultName string, options *ReplicationUsagesClientListOptions) *runtime.Pager[ReplicationUsagesClientListResponse]

NewListPager - Fetches the replication usages of the vault.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - ReplicationUsagesClientListOptions contains the optional parameters for the ReplicationUsagesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ListReplicationUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewReplicationUsagesClient().NewListPager("avrai7517RG1", "avrai7517Vault1", 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.ReplicationUsageList = armrecoveryservices.ReplicationUsageList{
		// 	Value: []*armrecoveryservices.ReplicationUsage{
		// 		{
		// 			JobsSummary: &armrecoveryservices.JobsSummary{
		// 				FailedJobs: to.Ptr[int32](0),
		// 				InProgressJobs: to.Ptr[int32](0),
		// 				SuspendedJobs: to.Ptr[int32](0),
		// 			},
		// 			MonitoringSummary: &armrecoveryservices.MonitoringSummary{
		// 				DeprecatedProviderCount: to.Ptr[int32](0),
		// 				EventsCount: to.Ptr[int32](0),
		// 				SupportedProviderCount: to.Ptr[int32](0),
		// 				UnHealthyProviderCount: to.Ptr[int32](0),
		// 				UnHealthyVMCount: to.Ptr[int32](0),
		// 				UnsupportedProviderCount: to.Ptr[int32](0),
		// 			},
		// 			ProtectedItemCount: to.Ptr[int32](2),
		// 			RecoveryPlanCount: to.Ptr[int32](1),
		// 			RegisteredServersCount: to.Ptr[int32](2),
		// 	}},
		// }
	}
}
Output:

type ReplicationUsagesClientListOptions added in v0.3.0

type ReplicationUsagesClientListOptions struct {
}

ReplicationUsagesClientListOptions contains the optional parameters for the ReplicationUsagesClient.NewListPager method.

type ReplicationUsagesClientListResponse added in v0.3.0

type ReplicationUsagesClientListResponse struct {
	// Replication usages for vault.
	ReplicationUsageList
}

ReplicationUsagesClientListResponse contains the response from method ReplicationUsagesClient.NewListPager.

type Resource

type Resource struct {
	// Optional ETag.
	Etag *string

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string

	// READ-ONLY; Resource name associated with the resource.
	Name *string

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string
}

Resource - ARM Resource.

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceCapabilities added in v1.2.0

type ResourceCapabilities struct {
	// REQUIRED; Describes the Resource type: Microsoft.RecoveryServices/Vaults
	Type *string

	// Capabilities information
	Properties *CapabilitiesProperties
}

ResourceCapabilities - Input to get capabilities information for Microsoft.RecoveryServices

func (ResourceCapabilities) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceCapabilities.

func (*ResourceCapabilities) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCapabilities.

type ResourceCapabilitiesBase added in v1.2.0

type ResourceCapabilitiesBase struct {
	// REQUIRED; Describes the Resource type: Microsoft.RecoveryServices/Vaults
	Type *string
}

ResourceCapabilitiesBase - Base class for request and response capabilities information for Microsoft.RecoveryServices

func (ResourceCapabilitiesBase) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceCapabilitiesBase.

func (*ResourceCapabilitiesBase) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCapabilitiesBase.

type ResourceCertificateAndAADDetails

type ResourceCertificateAndAADDetails struct {
	// REQUIRED; AAD tenant authority.
	AADAuthority *string

	// REQUIRED; AAD tenant Id.
	AADTenantID *string

	// REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
	AuthType *string

	// REQUIRED; Azure Management Endpoint Audience.
	AzureManagementEndpointAudience *string

	// REQUIRED; AAD service principal clientId.
	ServicePrincipalClientID *string

	// REQUIRED; AAD service principal ObjectId.
	ServicePrincipalObjectID *string

	// AAD audience for the resource
	AADAudience *string

	// The base64 encoded certificate raw data string.
	Certificate []byte

	// Certificate friendly name.
	FriendlyName *string

	// Certificate issuer.
	Issuer *string

	// Resource ID of the vault.
	ResourceID *int64

	// Service Resource Id.
	ServiceResourceID *string

	// Certificate Subject Name.
	Subject *string

	// Certificate thumbprint.
	Thumbprint *string

	// Certificate Validity start Date time.
	ValidFrom *time.Time

	// Certificate Validity End Date time.
	ValidTo *time.Time
}

ResourceCertificateAndAADDetails - Certificate details representing the Vault credentials for AAD.

func (*ResourceCertificateAndAADDetails) GetResourceCertificateDetails added in v0.3.0

func (r *ResourceCertificateAndAADDetails) GetResourceCertificateDetails() *ResourceCertificateDetails

GetResourceCertificateDetails implements the ResourceCertificateDetailsClassification interface for type ResourceCertificateAndAADDetails.

func (ResourceCertificateAndAADDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceCertificateAndAADDetails.

func (*ResourceCertificateAndAADDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCertificateAndAADDetails.

type ResourceCertificateAndAcsDetails

type ResourceCertificateAndAcsDetails struct {
	// REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
	AuthType *string

	// REQUIRED; Acs mgmt host name to connect to.
	GlobalAcsHostName *string

	// REQUIRED; ACS namespace name - tenant for our service.
	GlobalAcsNamespace *string

	// REQUIRED; Global ACS namespace RP realm.
	GlobalAcsRPRealm *string

	// The base64 encoded certificate raw data string.
	Certificate []byte

	// Certificate friendly name.
	FriendlyName *string

	// Certificate issuer.
	Issuer *string

	// Resource ID of the vault.
	ResourceID *int64

	// Certificate Subject Name.
	Subject *string

	// Certificate thumbprint.
	Thumbprint *string

	// Certificate Validity start Date time.
	ValidFrom *time.Time

	// Certificate Validity End Date time.
	ValidTo *time.Time
}

ResourceCertificateAndAcsDetails - Certificate details representing the Vault credentials for ACS.

func (*ResourceCertificateAndAcsDetails) GetResourceCertificateDetails added in v0.3.0

func (r *ResourceCertificateAndAcsDetails) GetResourceCertificateDetails() *ResourceCertificateDetails

GetResourceCertificateDetails implements the ResourceCertificateDetailsClassification interface for type ResourceCertificateAndAcsDetails.

func (ResourceCertificateAndAcsDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ResourceCertificateAndAcsDetails.

func (*ResourceCertificateAndAcsDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCertificateAndAcsDetails.

type ResourceCertificateDetails

type ResourceCertificateDetails struct {
	// REQUIRED; This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
	AuthType *string

	// The base64 encoded certificate raw data string.
	Certificate []byte

	// Certificate friendly name.
	FriendlyName *string

	// Certificate issuer.
	Issuer *string

	// Resource ID of the vault.
	ResourceID *int64

	// Certificate Subject Name.
	Subject *string

	// Certificate thumbprint.
	Thumbprint *string

	// Certificate Validity start Date time.
	ValidFrom *time.Time

	// Certificate Validity End Date time.
	ValidTo *time.Time
}

ResourceCertificateDetails - Certificate details representing the Vault credentials.

func (*ResourceCertificateDetails) GetResourceCertificateDetails

func (r *ResourceCertificateDetails) GetResourceCertificateDetails() *ResourceCertificateDetails

GetResourceCertificateDetails implements the ResourceCertificateDetailsClassification interface for type ResourceCertificateDetails.

func (ResourceCertificateDetails) MarshalJSON added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type ResourceCertificateDetails.

func (*ResourceCertificateDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceCertificateDetails.

type ResourceCertificateDetailsClassification

type ResourceCertificateDetailsClassification interface {
	// GetResourceCertificateDetails returns the ResourceCertificateDetails content of the underlying type.
	GetResourceCertificateDetails() *ResourceCertificateDetails
}

ResourceCertificateDetailsClassification provides polymorphic access to related types. Call the interface's GetResourceCertificateDetails() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *ResourceCertificateAndAADDetails, *ResourceCertificateAndAcsDetails, *ResourceCertificateDetails

type ResourceIdentityType

type ResourceIdentityType string

ResourceIdentityType - The type of managed identity used. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user-assigned identities. The type 'None' will remove any identities.

const (
	ResourceIdentityTypeNone                       ResourceIdentityType = "None"
	ResourceIdentityTypeSystemAssigned             ResourceIdentityType = "SystemAssigned"
	ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
	ResourceIdentityTypeUserAssigned               ResourceIdentityType = "UserAssigned"
)

func PossibleResourceIdentityTypeValues

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns the possible values for the ResourceIdentityType const type.

type ResourceMoveState

type ResourceMoveState string

ResourceMoveState - The State of the Resource after the move operation

const (
	ResourceMoveStateCommitFailed    ResourceMoveState = "CommitFailed"
	ResourceMoveStateCommitTimedout  ResourceMoveState = "CommitTimedout"
	ResourceMoveStateCriticalFailure ResourceMoveState = "CriticalFailure"
	ResourceMoveStateFailure         ResourceMoveState = "Failure"
	ResourceMoveStateInProgress      ResourceMoveState = "InProgress"
	ResourceMoveStateMoveSucceeded   ResourceMoveState = "MoveSucceeded"
	ResourceMoveStatePartialSuccess  ResourceMoveState = "PartialSuccess"
	ResourceMoveStatePrepareFailed   ResourceMoveState = "PrepareFailed"
	ResourceMoveStatePrepareTimedout ResourceMoveState = "PrepareTimedout"
	ResourceMoveStateUnknown         ResourceMoveState = "Unknown"
)

func PossibleResourceMoveStateValues

func PossibleResourceMoveStateValues() []ResourceMoveState

PossibleResourceMoveStateValues returns the possible values for the ResourceMoveState const type.

type RestoreSettings added in v1.4.0

type RestoreSettings struct {
	// Settings for CrossSubscriptionRestore
	CrossSubscriptionRestoreSettings *CrossSubscriptionRestoreSettings
}

RestoreSettings - Restore Settings of the vault

func (RestoreSettings) MarshalJSON added in v1.4.0

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

MarshalJSON implements the json.Marshaller interface for type RestoreSettings.

func (*RestoreSettings) UnmarshalJSON added in v1.4.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type RestoreSettings.

type SKU

type SKU struct {
	// REQUIRED; Name of SKU is RS0 (Recovery Services 0th version) and the tier is standard tier. They do not have affect on
	// backend storage redundancy or any other vault settings. To manage storage redundancy, use
	// the backupstorageconfig
	Name *SKUName

	// The sku capacity
	Capacity *string

	// The sku family
	Family *string

	// The sku size
	Size *string

	// The Sku tier.
	Tier *string
}

SKU - Identifies the unique system identifier for each Azure resource.

func (SKU) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type SKU.

func (*SKU) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SKU.

type SKUName

type SKUName string

SKUName - Name of SKU is RS0 (Recovery Services 0th version) and the tier is standard tier. They do not have affect on backend storage redundancy or any other vault settings. To manage storage redundancy, use the backupstorageconfig

const (
	SKUNameRS0      SKUName = "RS0"
	SKUNameStandard SKUName = "Standard"
)

func PossibleSKUNameValues

func PossibleSKUNameValues() []SKUName

PossibleSKUNameValues returns the possible values for the SKUName const type.

type SecureScoreLevel added in v1.5.0

type SecureScoreLevel string

SecureScoreLevel - Secure Score of Recovery Services Vault

const (
	SecureScoreLevelAdequate SecureScoreLevel = "Adequate"
	SecureScoreLevelMaximum  SecureScoreLevel = "Maximum"
	SecureScoreLevelMinimum  SecureScoreLevel = "Minimum"
	SecureScoreLevelNone     SecureScoreLevel = "None"
)

func PossibleSecureScoreLevelValues added in v1.5.0

func PossibleSecureScoreLevelValues() []SecureScoreLevel

PossibleSecureScoreLevelValues returns the possible values for the SecureScoreLevel const type.

type SecuritySettings added in v1.2.0

type SecuritySettings struct {
	// Immutability Settings of a vault
	ImmutabilitySettings *ImmutabilitySettings

	// Soft delete Settings of a vault
	SoftDeleteSettings *SoftDeleteSettings

	// READ-ONLY; MUA Settings of a vault
	MultiUserAuthorization *MultiUserAuthorization
}

SecuritySettings - Security Settings of the vault

func (SecuritySettings) MarshalJSON added in v1.2.0

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

MarshalJSON implements the json.Marshaller interface for type SecuritySettings.

func (*SecuritySettings) UnmarshalJSON added in v1.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SecuritySettings.

type SoftDeleteSettings added in v1.5.0

type SoftDeleteSettings struct {
	// Soft delete retention period in days
	SoftDeleteRetentionPeriodInDays *int32
	SoftDeleteState                 *SoftDeleteState
}

SoftDeleteSettings - Soft delete Settings of vault

func (SoftDeleteSettings) MarshalJSON added in v1.5.0

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

MarshalJSON implements the json.Marshaller interface for type SoftDeleteSettings.

func (*SoftDeleteSettings) UnmarshalJSON added in v1.5.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type SoftDeleteSettings.

type SoftDeleteState added in v1.5.0

type SoftDeleteState string
const (
	SoftDeleteStateAlwaysON SoftDeleteState = "AlwaysON"
	SoftDeleteStateDisabled SoftDeleteState = "Disabled"
	SoftDeleteStateEnabled  SoftDeleteState = "Enabled"
	SoftDeleteStateInvalid  SoftDeleteState = "Invalid"
)

func PossibleSoftDeleteStateValues added in v1.5.0

func PossibleSoftDeleteStateValues() []SoftDeleteState

PossibleSoftDeleteStateValues returns the possible values for the SoftDeleteState const type.

type StandardTierStorageRedundancy added in v1.1.0

type StandardTierStorageRedundancy string

StandardTierStorageRedundancy - The storage redundancy setting of a vault

const (
	StandardTierStorageRedundancyGeoRedundant     StandardTierStorageRedundancy = "GeoRedundant"
	StandardTierStorageRedundancyLocallyRedundant StandardTierStorageRedundancy = "LocallyRedundant"
	StandardTierStorageRedundancyZoneRedundant    StandardTierStorageRedundancy = "ZoneRedundant"
)

func PossibleStandardTierStorageRedundancyValues added in v1.1.0

func PossibleStandardTierStorageRedundancyValues() []StandardTierStorageRedundancy

PossibleStandardTierStorageRedundancyValues returns the possible values for the StandardTierStorageRedundancy 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 type of identity that last modified the resource.
	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; Resource location.
	Location *string

	// Optional ETag.
	Etag *string

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

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string

	// READ-ONLY; Resource name associated with the resource.
	Name *string

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string
}

TrackedResource - Tracked resource with location.

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type TriggerType

type TriggerType string

TriggerType - The way the vault upgrade was triggered.

const (
	TriggerTypeForcedUpgrade TriggerType = "ForcedUpgrade"
	TriggerTypeUserTriggered TriggerType = "UserTriggered"
)

func PossibleTriggerTypeValues

func PossibleTriggerTypeValues() []TriggerType

PossibleTriggerTypeValues returns the possible values for the TriggerType const type.

type UpgradeDetails

type UpgradeDetails struct {
	// READ-ONLY; UTC time at which the upgrade operation has ended.
	EndTimeUTC *time.Time

	// READ-ONLY; UTC time at which the upgrade operation status was last updated.
	LastUpdatedTimeUTC *time.Time

	// READ-ONLY; Message to the user containing information about the upgrade operation.
	Message *string

	// READ-ONLY; ID of the vault upgrade operation.
	OperationID *string

	// READ-ONLY; Resource ID of the vault before the upgrade.
	PreviousResourceID *string

	// READ-ONLY; UTC time at which the upgrade operation has started.
	StartTimeUTC *time.Time

	// READ-ONLY; Status of the vault upgrade operation.
	Status *VaultUpgradeState

	// READ-ONLY; The way the vault upgrade was triggered.
	TriggerType *TriggerType

	// READ-ONLY; Resource ID of the upgraded vault.
	UpgradedResourceID *string
}

UpgradeDetails - Details for upgrading vault.

func (UpgradeDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UpgradeDetails.

func (*UpgradeDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type UpgradeDetails.

type UsagesClient

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

UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.

func NewUsagesClient

func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)

NewUsagesClient creates a new instance of UsagesClient with the specified values.

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

func (*UsagesClient) NewListByVaultsPager added in v0.5.0

func (client *UsagesClient) NewListByVaultsPager(resourceGroupName string, vaultName string, options *UsagesClientListByVaultsOptions) *runtime.Pager[UsagesClientListByVaultsResponse]

NewListByVaultsPager - Fetches the usages of the vault.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - UsagesClientListByVaultsOptions contains the optional parameters for the UsagesClient.NewListByVaultsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ListUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewUsagesClient().NewListByVaultsPager("Default-RecoveryServices-ResourceGroup", "swaggerExample", 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.VaultUsageList = armrecoveryservices.VaultUsageList{
		// 	Value: []*armrecoveryservices.VaultUsage{
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Backup management servers"),
		// 				Value: to.Ptr("MABContainersCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](6),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Backup items/Azure virtual machine backup"),
		// 				Value: to.Ptr("ProtectedItemCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](3),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Critical"),
		// 				Value: to.Ptr("ProtectedItemCriticalCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Warning"),
		// 				Value: to.Ptr("ProtectedItemWarningCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Azure Virtual Machines"),
		// 				Value: to.Ptr("IaaSVMProtectedItemCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Critical"),
		// 				Value: to.Ptr("IaaSVMProtectedItemCriticalCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Warning"),
		// 				Value: to.Ptr("IaaSVMProtectedItemWarningCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("File-Folders"),
		// 				Value: to.Ptr("MABProtectedItemCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("DPM Protected Items Count"),
		// 				Value: to.Ptr("DPMProtectedItemCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](1),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Azure Backup Server Protected Items Count"),
		// 				Value: to.Ptr("AzureBackupServerProtectedItemCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](2),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("In progress"),
		// 				Value: to.Ptr("InProgressJobsCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			QuotaPeriod: to.Ptr("P1D"),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Failed"),
		// 				Value: to.Ptr("FailedJobsCount"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			QuotaPeriod: to.Ptr("P1D"),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Cloud - GRS"),
		// 				Value: to.Ptr("GRSStorageUsage"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](117007930),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitBytes),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Cloud - LRS"),
		// 				Value: to.Ptr("LRSStorageUsage"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitBytes),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Protected Instances"),
		// 				Value: to.Ptr("ManagedInstances"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](5),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitCount),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Dedup - GRS"),
		// 				Value: to.Ptr("GRSDedupStorageUsage"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitBytes),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Dedup - LRS"),
		// 				Value: to.Ptr("LRSDedupStorageUsage"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](0),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitBytes),
		// 		},
		// 		{
		// 			Name: &armrecoveryservices.NameInfo{
		// 				LocalizedValue: to.Ptr("Backup Engines' Disk Used"),
		// 				Value: to.Ptr("UsedDiskSize"),
		// 			},
		// 			CurrentValue: to.Ptr[int64](117851553792),
		// 			Limit: to.Ptr[int64](-1),
		// 			Unit: to.Ptr(armrecoveryservices.UsagesUnitBytes),
		// 	}},
		// }
	}
}
Output:

type UsagesClientListByVaultsOptions added in v0.3.0

type UsagesClientListByVaultsOptions struct {
}

UsagesClientListByVaultsOptions contains the optional parameters for the UsagesClient.NewListByVaultsPager method.

type UsagesClientListByVaultsResponse added in v0.3.0

type UsagesClientListByVaultsResponse struct {
	// Usage for vault.
	VaultUsageList
}

UsagesClientListByVaultsResponse contains the response from method UsagesClient.NewListByVaultsPager.

type UsagesUnit

type UsagesUnit string

UsagesUnit - Unit of the usage.

const (
	UsagesUnitBytes          UsagesUnit = "Bytes"
	UsagesUnitBytesPerSecond UsagesUnit = "BytesPerSecond"
	UsagesUnitCount          UsagesUnit = "Count"
	UsagesUnitCountPerSecond UsagesUnit = "CountPerSecond"
	UsagesUnitPercent        UsagesUnit = "Percent"
	UsagesUnitSeconds        UsagesUnit = "Seconds"
)

func PossibleUsagesUnitValues

func PossibleUsagesUnitValues() []UsagesUnit

PossibleUsagesUnitValues returns the possible values for the UsagesUnit const type.

type UserIdentity

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

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

UserIdentity - A resource identity that is managed by the user of the service.

func (UserIdentity) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type UserIdentity.

func (*UserIdentity) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentity.

type Vault

type Vault struct {
	// REQUIRED; Resource location.
	Location *string

	// Optional ETag.
	Etag *string

	// Identity for the resource.
	Identity *IdentityData

	// Properties of the vault.
	Properties *VaultProperties

	// Identifies the unique system identifier for each Azure resource.
	SKU *SKU

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

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string

	// READ-ONLY; Resource name associated with the resource.
	Name *string

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

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string
}

Vault - Resource information, as returned by the resource provider.

func (Vault) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Vault.

func (*Vault) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Vault.

type VaultCertificateResponse

type VaultCertificateResponse struct {
	// Certificate details representing the Vault credentials.
	Properties ResourceCertificateDetailsClassification

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string

	// READ-ONLY; Resource name associated with the resource.
	Name *string

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string
}

VaultCertificateResponse - Certificate corresponding to a vault that can be used by clients to register themselves with the vault.

func (VaultCertificateResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VaultCertificateResponse.

func (*VaultCertificateResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultCertificateResponse.

type VaultCertificatesClient

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

VaultCertificatesClient contains the methods for the VaultCertificates group. Don't use this type directly, use NewVaultCertificatesClient() instead.

func NewVaultCertificatesClient

func NewVaultCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VaultCertificatesClient, error)

NewVaultCertificatesClient creates a new instance of VaultCertificatesClient with the specified values.

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

func (*VaultCertificatesClient) Create

func (client *VaultCertificatesClient) Create(ctx context.Context, resourceGroupName string, vaultName string, certificateName string, certificateRequest CertificateRequest, options *VaultCertificatesClientCreateOptions) (VaultCertificatesClientCreateResponse, error)

Create - Uploads a certificate for a resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • certificateName - Certificate friendly name.
  • certificateRequest - Input parameters for uploading the vault certificate.
  • options - VaultCertificatesClientCreateOptions contains the optional parameters for the VaultCertificatesClient.Create method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PUTVaultCred.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVaultCertificatesClient().Create(ctx, "BCDRIbzRG", "BCDRIbzVault", "BCDRIbzVault77777777-d41f-4550-9f70-7708a3a2283b-12-18-2017-vaultcredentials", armrecoveryservices.CertificateRequest{
		Properties: &armrecoveryservices.RawCertificateData{
			AuthType:    to.Ptr(armrecoveryservices.AuthTypeAAD),
			Certificate: []byte("TUlJRE5EQ0NBaHlnQXdJQkFnSVFDYUxFKzVTSlNVeWdncDM0VS9HUm9qQU5CZ2txaGtpRzl3MEJBUXNGQURBWE1SVXdFd1lEVlFRREV3eGhiV05vWVc1a2JpNWpiMjB3SGhjTk1qSXhNREkwTVRJd05qRTRXaGNOTWpNeE1ESTBNVEl4TmpFNFdqQVhNUlV3RXdZRFZRUURFd3hoYldOb1lXNWtiaTVqYjIwd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUN4cFpwS293a2p4VU9VWkpLT2JvdGdPWXkzaW9UVkxMMmZyaW9nZVN1Qm5IMWw3aVdQWW9kUHRoWS8yVmh6ZFVUckNXL25pNUh3b0JHYzZMMHF6UGlBWXpHek94RmpMQjZjdFNkbm9nL1A4eEV2OGE0cnJWZlBZdS9INStoTGx3N0RubXlTNWs4TU9sSVhUemVWNkxZV2I2RWlpTFppc0k1R3lLU1liemNaQmJKdnhLTVdGdHRCV08xZUwzUWNUejlpb1VGQzVnRlFKQzg3YXFkeDR1Wk9WYzRLM3Ixb09sTFBKdmRLN25YU3VWci9ZOC80ZHhCdDJZUTRia0hjM2EzcUNBbTZrV0QzamRiajhCZmhlWWNVNjFFZ3llVFV2MlI4dzRubWJqVXZxRW05cDZtTG4xMTdEWWpQTHNFODVTL0FpQmF0dkNhQ3hCZ0lxb1N1blBOUkFnTUJBQUdqZkRCNk1BNEdBMVVkRHdFQi93UUVBd0lGb0RBSkJnTlZIUk1FQWpBQU1CMEdBMVVkSlFRV01CUUdDQ3NHQVFVRkJ3TUJCZ2dyQmdFRkJRY0RBakFmQmdOVkhTTUVHREFXZ0JRR1NZcDJMUTJwOE5wMHUzRThJZDdRUjRTQXBqQWRCZ05WSFE0RUZnUVVCa21LZGkwTnFmRGFkTHR4UENIZTBFZUVnS1l3RFFZSktvWklodmNOQVFFTEJRQURnZ0VCQUp2ZG9yRmJ4cExZaUhYRHpnR001WmxMWTRDZE1LYW5BdzVDZDNFVnhDbkhtT05ISnpLRmpzdHZjdUN1TDZ2S1ptci9abm5ENXNLUnE0d0xnTXV6dlNXNGtQTXlWeENrYzdVYnNZSWJCSXNIUDl3cUNmcUY5aG5LSE9YZFJJV2tBVXhnbmYxSlpLZjR1NlpTSzZ3dExaME9VT0c5Mmd3SlB2eW5PVmJoeWpqczdQTVpONEw1djZyeHJkRWp0WG5sYzIvRDlnS0NOTFhFZHdRM0dzS05ZTGZvYy9DT3JmbEIrRHVPSThrVzM0WmxzYlFHelgyQ3ArWVVlSDNrQlBjY3RpUWNURHFQcW5YS0NNMTJ6MGZDTjVpNXRkRlUrM0VzemZBQkpiOEZpU2ZCWFF1UUZRRDNDTDkraVdjZXhrMmxQako2akZIbHZtak9XbTdjQllHZlc4ST0="),
		},
	}, 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.VaultCertificateResponse = armrecoveryservices.VaultCertificateResponse{
	// 	Name: to.Ptr("BCDRIbzVault77777777-d41f-4550-9f70-7708a3a2283b-12-18-2017-vaultcredentials"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults/certificates"),
	// 	ID: to.Ptr("/Subscriptions/77777777-d41f-4550-9f70-7708a3a2283b/resourceGroups/BCDRIbzRG/providers/Microsoft.RecoveryServices/vaults/BCDRIbzVault/certificates/BCDRIbzVault77777777-d41f-4550-9f70-7708a3a2283b-12-18-2017-vaultcredentials"),
	// 	Properties: &armrecoveryservices.ResourceCertificateAndAADDetails{
	// 		AuthType: to.Ptr("AzureActiveDirectory"),
	// 		Certificate: []byte("TUlJRE5EQ0NBaHlnQXdJQkFnSVFDYUxFKzVTSlNVeWdncDM0VS9HUm9qQU5CZ2txaGtpRzl3MEJBUXNGQURBWE1SVXdFd1lEVlFRREV3eGhiV05vWVc1a2JpNWpiMjB3SGhjTk1qSXhNREkwTVRJd05qRTRXaGNOTWpNeE1ESTBNVEl4TmpFNFdqQVhNUlV3RXdZRFZRUURFd3hoYldOb1lXNWtiaTVqYjIwd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUN4cFpwS293a2p4VU9VWkpLT2JvdGdPWXkzaW9UVkxMMmZyaW9nZVN1Qm5IMWw3aVdQWW9kUHRoWS8yVmh6ZFVUckNXL25pNUh3b0JHYzZMMHF6UGlBWXpHek94RmpMQjZjdFNkbm9nL1A4eEV2OGE0cnJWZlBZdS9INStoTGx3N0RubXlTNWs4TU9sSVhUemVWNkxZV2I2RWlpTFppc0k1R3lLU1liemNaQmJKdnhLTVdGdHRCV08xZUwzUWNUejlpb1VGQzVnRlFKQzg3YXFkeDR1Wk9WYzRLM3Ixb09sTFBKdmRLN25YU3VWci9ZOC80ZHhCdDJZUTRia0hjM2EzcUNBbTZrV0QzamRiajhCZmhlWWNVNjFFZ3llVFV2MlI4dzRubWJqVXZxRW05cDZtTG4xMTdEWWpQTHNFODVTL0FpQmF0dkNhQ3hCZ0lxb1N1blBOUkFnTUJBQUdqZkRCNk1BNEdBMVVkRHdFQi93UUVBd0lGb0RBSkJnTlZIUk1FQWpBQU1CMEdBMVVkSlFRV01CUUdDQ3NHQVFVRkJ3TUJCZ2dyQmdFRkJRY0RBakFmQmdOVkhTTUVHREFXZ0JRR1NZcDJMUTJwOE5wMHUzRThJZDdRUjRTQXBqQWRCZ05WSFE0RUZnUVVCa21LZGkwTnFmRGFkTHR4UENIZTBFZUVnS1l3RFFZSktvWklodmNOQVFFTEJRQURnZ0VCQUp2ZG9yRmJ4cExZaUhYRHpnR001WmxMWTRDZE1LYW5BdzVDZDNFVnhDbkhtT05ISnpLRmpzdHZjdUN1TDZ2S1ptci9abm5ENXNLUnE0d0xnTXV6dlNXNGtQTXlWeENrYzdVYnNZSWJCSXNIUDl3cUNmcUY5aG5LSE9YZFJJV2tBVXhnbmYxSlpLZjR1NlpTSzZ3dExaME9VT0c5Mmd3SlB2eW5PVmJoeWpqczdQTVpONEw1djZyeHJkRWp0WG5sYzIvRDlnS0NOTFhFZHdRM0dzS05ZTGZvYy9DT3JmbEIrRHVPSThrVzM0WmxzYlFHelgyQ3ArWVVlSDNrQlBjY3RpUWNURHFQcW5YS0NNMTJ6MGZDTjVpNXRkRlUrM0VzemZBQkpiOEZpU2ZCWFF1UUZRRDNDTDkraVdjZXhrMmxQako2akZIbHZtak9XbTdjQllHZlc4ST0="),
	// 		FriendlyName: to.Ptr(""),
	// 		Issuer: to.Ptr("CN=Windows Azure Tools"),
	// 		ResourceID: to.Ptr[int64](8726350008099341000),
	// 		Subject: to.Ptr("CN=Windows Azure Tools"),
	// 		Thumbprint: to.Ptr("019FE9BAD18A5A09A5CA53B593AF66331F3054AF"),
	// 		ValidFrom: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-18T09:17:53.000Z"); return t}()),
	// 		ValidTo: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-23T09:27:53.000Z"); return t}()),
	// 		AADAudience: to.Ptr("api://9b0c2069-2eba-489f-95f4-eca15cb602ab/RecoveryServiceVault/US/AADReregisterTest/8726350008099341699"),
	// 		AADAuthority: to.Ptr("https://login.windows.net"),
	// 		AADTenantID: to.Ptr("9b0c2069-2eba-489f-95f4-eca15cb602ab"),
	// 		AzureManagementEndpointAudience: to.Ptr("https://ppe1-id1.wus.wabppe.obs-test.com/restapi/"),
	// 		ServicePrincipalClientID: to.Ptr("4932d0bd-b5f9-4659-94a0-7ab02d918933"),
	// 		ServicePrincipalObjectID: to.Ptr("2d60221e-cef5-4e13-ba66-b33701a533bb"),
	// 	},
	// }
}
Output:

type VaultCertificatesClientCreateOptions added in v0.3.0

type VaultCertificatesClientCreateOptions struct {
}

VaultCertificatesClientCreateOptions contains the optional parameters for the VaultCertificatesClient.Create method.

type VaultCertificatesClientCreateResponse added in v0.3.0

type VaultCertificatesClientCreateResponse struct {
	// Certificate corresponding to a vault that can be used by clients to register themselves with the vault.
	VaultCertificateResponse
}

VaultCertificatesClientCreateResponse contains the response from method VaultCertificatesClient.Create.

type VaultExtendedInfo

type VaultExtendedInfo struct {
	// Algorithm for Vault ExtendedInfo
	Algorithm *string

	// Encryption key.
	EncryptionKey *string

	// Encryption key thumbprint.
	EncryptionKeyThumbprint *string

	// Integrity key.
	IntegrityKey *string
}

VaultExtendedInfo - Vault extended information.

func (VaultExtendedInfo) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type VaultExtendedInfo.

func (*VaultExtendedInfo) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultExtendedInfo.

type VaultExtendedInfoClient

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

VaultExtendedInfoClient contains the methods for the VaultExtendedInfo group. Don't use this type directly, use NewVaultExtendedInfoClient() instead.

func NewVaultExtendedInfoClient

func NewVaultExtendedInfoClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VaultExtendedInfoClient, error)

NewVaultExtendedInfoClient creates a new instance of VaultExtendedInfoClient with the specified values.

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

func (*VaultExtendedInfoClient) CreateOrUpdate

func (client *VaultExtendedInfoClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, resourceExtendedInfoDetails VaultExtendedInfoResource, options *VaultExtendedInfoClientCreateOrUpdateOptions) (VaultExtendedInfoClientCreateOrUpdateResponse, error)

CreateOrUpdate - Create vault extended info. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • resourceExtendedInfoDetails - Details of ResourceExtendedInfo
  • options - VaultExtendedInfoClientCreateOrUpdateOptions contains the optional parameters for the VaultExtendedInfoClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/UpdateVaultExtendedInfo.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVaultExtendedInfoClient().CreateOrUpdate(ctx, "Default-RecoveryServices-ResourceGroup", "swaggerExample", armrecoveryservices.VaultExtendedInfoResource{}, 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.VaultExtendedInfoResource = armrecoveryservices.VaultExtendedInfoResource{
	// 	Name: to.Ptr("vaultExtendedInfo"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults/extendedInformation"),
	// 	Etag: to.Ptr("f0d0260b-b92d-4458-ba0a-32c6cdabacb7"),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample/extendedInformation/vaultExtendedInfo"),
	// 	Properties: &armrecoveryservices.VaultExtendedInfo{
	// 		Algorithm: to.Ptr("None"),
	// 		IntegrityKey: to.Ptr("J99wzS27fmJ+Wjot7xO5wA=="),
	// 	},
	// }
}
Output:

func (*VaultExtendedInfoClient) Get

Get - Get the vault extended info. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - VaultExtendedInfoClientGetOptions contains the optional parameters for the VaultExtendedInfoClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/GETVaultExtendedInfo.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVaultExtendedInfoClient().Get(ctx, "Default-RecoveryServices-ResourceGroup", "swaggerExample", 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.VaultExtendedInfoResource = armrecoveryservices.VaultExtendedInfoResource{
	// 	Name: to.Ptr("vaultExtendedInfo"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults/extendedInformation"),
	// 	Etag: to.Ptr("f0d0260b-b92d-4458-ba0a-32c6cdabacb7"),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample/extendedInformation/vaultExtendedInfo"),
	// 	Properties: &armrecoveryservices.VaultExtendedInfo{
	// 		Algorithm: to.Ptr("None"),
	// 		IntegrityKey: to.Ptr("J09wzS27fnJ+Wjot7xO5wA=="),
	// 	},
	// }
}
Output:

func (*VaultExtendedInfoClient) Update

func (client *VaultExtendedInfoClient) Update(ctx context.Context, resourceGroupName string, vaultName string, resourceExtendedInfoDetails VaultExtendedInfoResource, options *VaultExtendedInfoClientUpdateOptions) (VaultExtendedInfoClientUpdateResponse, error)

Update - Update vault extended info. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • resourceExtendedInfoDetails - Details of ResourceExtendedInfo
  • options - VaultExtendedInfoClientUpdateOptions contains the optional parameters for the VaultExtendedInfoClient.Update method.

type VaultExtendedInfoClientCreateOrUpdateOptions added in v0.3.0

type VaultExtendedInfoClientCreateOrUpdateOptions struct {
}

VaultExtendedInfoClientCreateOrUpdateOptions contains the optional parameters for the VaultExtendedInfoClient.CreateOrUpdate method.

type VaultExtendedInfoClientCreateOrUpdateResponse added in v0.3.0

type VaultExtendedInfoClientCreateOrUpdateResponse struct {
	// Vault extended information.
	VaultExtendedInfoResource
}

VaultExtendedInfoClientCreateOrUpdateResponse contains the response from method VaultExtendedInfoClient.CreateOrUpdate.

type VaultExtendedInfoClientGetOptions added in v0.3.0

type VaultExtendedInfoClientGetOptions struct {
}

VaultExtendedInfoClientGetOptions contains the optional parameters for the VaultExtendedInfoClient.Get method.

type VaultExtendedInfoClientGetResponse added in v0.3.0

type VaultExtendedInfoClientGetResponse struct {
	// Vault extended information.
	VaultExtendedInfoResource
}

VaultExtendedInfoClientGetResponse contains the response from method VaultExtendedInfoClient.Get.

type VaultExtendedInfoClientUpdateOptions added in v0.3.0

type VaultExtendedInfoClientUpdateOptions struct {
}

VaultExtendedInfoClientUpdateOptions contains the optional parameters for the VaultExtendedInfoClient.Update method.

type VaultExtendedInfoClientUpdateResponse added in v0.3.0

type VaultExtendedInfoClientUpdateResponse struct {
	// Vault extended information.
	VaultExtendedInfoResource
}

VaultExtendedInfoClientUpdateResponse contains the response from method VaultExtendedInfoClient.Update.

type VaultExtendedInfoResource

type VaultExtendedInfoResource struct {
	// Optional ETag.
	Etag *string

	// Vault extended information.
	Properties *VaultExtendedInfo

	// READ-ONLY; Resource Id represents the complete path to the resource.
	ID *string

	// READ-ONLY; Resource name associated with the resource.
	Name *string

	// READ-ONLY; Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/…
	Type *string
}

VaultExtendedInfoResource - Vault extended information.

func (VaultExtendedInfoResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VaultExtendedInfoResource.

func (*VaultExtendedInfoResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultExtendedInfoResource.

type VaultList

type VaultList struct {
	Value []*Vault

	// READ-ONLY
	NextLink *string
}

VaultList - The response model for a list of Vaults.

func (VaultList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VaultList.

func (*VaultList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultList.

type VaultPrivateEndpointState

type VaultPrivateEndpointState string

VaultPrivateEndpointState - Private endpoint state for backup.

const (
	VaultPrivateEndpointStateEnabled VaultPrivateEndpointState = "Enabled"
	VaultPrivateEndpointStateNone    VaultPrivateEndpointState = "None"
)

func PossibleVaultPrivateEndpointStateValues

func PossibleVaultPrivateEndpointStateValues() []VaultPrivateEndpointState

PossibleVaultPrivateEndpointStateValues returns the possible values for the VaultPrivateEndpointState const type.

type VaultProperties

type VaultProperties struct {
	// Customer Managed Key details of the resource.
	Encryption *VaultPropertiesEncryption

	// Monitoring Settings of the vault
	MonitoringSettings *MonitoringSettings

	// The details of the latest move operation performed on the Azure Resource
	MoveDetails *VaultPropertiesMoveDetails

	// property to enable or disable resource provider inbound network traffic from public clients
	PublicNetworkAccess *PublicNetworkAccess

	// The redundancy Settings of a Vault
	RedundancySettings *VaultPropertiesRedundancySettings

	// Restore Settings of the vault
	RestoreSettings *RestoreSettings

	// Security Settings of the vault
	SecuritySettings *SecuritySettings

	// Details for upgrading vault.
	UpgradeDetails *UpgradeDetails

	// READ-ONLY; Backup storage version
	BackupStorageVersion *BackupStorageVersion

	// READ-ONLY; The State of the Resource after the move operation
	MoveState *ResourceMoveState

	// READ-ONLY; List of private endpoint connection.
	PrivateEndpointConnections []*PrivateEndpointConnectionVaultProperties

	// READ-ONLY; Private endpoint state for backup.
	PrivateEndpointStateForBackup *VaultPrivateEndpointState

	// READ-ONLY; Private endpoint state for site recovery.
	PrivateEndpointStateForSiteRecovery *VaultPrivateEndpointState

	// READ-ONLY; Provisioning State.
	ProvisioningState *string

	// READ-ONLY; Secure Score of Recovery Services Vault
	SecureScore *SecureScoreLevel
}

VaultProperties - Properties of the vault.

func (VaultProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VaultProperties.

func (*VaultProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultProperties.

type VaultPropertiesEncryption

type VaultPropertiesEncryption struct {
	// Enabling/Disabling the Double Encryption state
	InfrastructureEncryption *InfrastructureEncryptionState

	// The details of the identity used for CMK
	KekIdentity *CmkKekIdentity

	// The properties of the Key Vault which hosts CMK
	KeyVaultProperties *CmkKeyVaultProperties
}

VaultPropertiesEncryption - Customer Managed Key details of the resource.

func (VaultPropertiesEncryption) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type VaultPropertiesEncryption.

func (*VaultPropertiesEncryption) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultPropertiesEncryption.

type VaultPropertiesMoveDetails

type VaultPropertiesMoveDetails struct {
	// READ-ONLY; End Time of the Resource Move Operation
	CompletionTimeUTC *time.Time

	// READ-ONLY; OperationId of the Resource Move Operation
	OperationID *string

	// READ-ONLY; Source Resource of the Resource Move Operation
	SourceResourceID *string

	// READ-ONLY; Start Time of the Resource Move Operation
	StartTimeUTC *time.Time

	// READ-ONLY; Target Resource of the Resource Move Operation
	TargetResourceID *string
}

VaultPropertiesMoveDetails - The details of the latest move operation performed on the Azure Resource

func (VaultPropertiesMoveDetails) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VaultPropertiesMoveDetails.

func (*VaultPropertiesMoveDetails) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultPropertiesMoveDetails.

type VaultPropertiesRedundancySettings added in v1.1.0

type VaultPropertiesRedundancySettings struct {
	// READ-ONLY; Flag to show if Cross Region Restore is enabled on the Vault or not
	CrossRegionRestore *CrossRegionRestore

	// READ-ONLY; The storage redundancy setting of a vault
	StandardTierStorageRedundancy *StandardTierStorageRedundancy
}

VaultPropertiesRedundancySettings - The redundancy Settings of a Vault

func (VaultPropertiesRedundancySettings) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type VaultPropertiesRedundancySettings.

func (*VaultPropertiesRedundancySettings) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultPropertiesRedundancySettings.

type VaultSubResourceType added in v1.2.0

type VaultSubResourceType string

VaultSubResourceType - Subresource type for vault AzureBackup, AzureBackup_secondary or AzureSiteRecovery

const (
	VaultSubResourceTypeAzureBackup          VaultSubResourceType = "AzureBackup"
	VaultSubResourceTypeAzureBackupSecondary VaultSubResourceType = "AzureBackup_secondary"
	VaultSubResourceTypeAzureSiteRecovery    VaultSubResourceType = "AzureSiteRecovery"
)

func PossibleVaultSubResourceTypeValues added in v1.2.0

func PossibleVaultSubResourceTypeValues() []VaultSubResourceType

PossibleVaultSubResourceTypeValues returns the possible values for the VaultSubResourceType const type.

type VaultUpgradeState

type VaultUpgradeState string

VaultUpgradeState - Status of the vault upgrade operation.

const (
	VaultUpgradeStateFailed     VaultUpgradeState = "Failed"
	VaultUpgradeStateInProgress VaultUpgradeState = "InProgress"
	VaultUpgradeStateUnknown    VaultUpgradeState = "Unknown"
	VaultUpgradeStateUpgraded   VaultUpgradeState = "Upgraded"
)

func PossibleVaultUpgradeStateValues

func PossibleVaultUpgradeStateValues() []VaultUpgradeState

PossibleVaultUpgradeStateValues returns the possible values for the VaultUpgradeState const type.

type VaultUsage

type VaultUsage struct {
	// Current value of usage.
	CurrentValue *int64

	// Limit of usage.
	Limit *int64

	// Name of usage.
	Name *NameInfo

	// Next reset time of usage.
	NextResetTime *time.Time

	// Quota period of usage.
	QuotaPeriod *string

	// Unit of the usage.
	Unit *UsagesUnit
}

VaultUsage - Usages of a vault.

func (VaultUsage) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VaultUsage.

func (*VaultUsage) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultUsage.

type VaultUsageList

type VaultUsageList struct {
	// The list of usages for the given vault.
	Value []*VaultUsage
}

VaultUsageList - Usage for vault.

func (VaultUsageList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VaultUsageList.

func (*VaultUsageList) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type VaultUsageList.

type VaultsClient

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

VaultsClient contains the methods for the Vaults group. Don't use this type directly, use NewVaultsClient() instead.

func NewVaultsClient

func NewVaultsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VaultsClient, error)

NewVaultsClient creates a new instance of VaultsClient with the specified values.

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

func (*VaultsClient) BeginCreateOrUpdate

func (client *VaultsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, vault Vault, options *VaultsClientBeginCreateOrUpdateOptions) (*runtime.Poller[VaultsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a Recovery Services vault. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • vault - Recovery Services Vault to be created.
  • options - VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate method.
Example (CreateOrUpdateRecoveryServicesVault)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PUTVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginCreateOrUpdate(ctx, "Default-RecoveryServices-ResourceGroup", "swaggerExample", armrecoveryservices.Vault{
		Location: to.Ptr("West US"),
		Identity: &armrecoveryservices.IdentityData{
			Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeSystemAssigned),
		},
		Properties: &armrecoveryservices.VaultProperties{
			PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
		},
		SKU: &armrecoveryservices.SKU{
			Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("3137d6c7-5d6c-411c-b934-7a2a729ee247"),
	// 		TenantID: to.Ptr("d676e86e-2206-4a7c-999c-ece52c144b5b"),
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameRS0),
	// 		Tier: to.Ptr("Standard"),
	// 	},
	// }
}
Output:

Example (CreateOrUpdateVaultWithCustomerManagedKeys)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PUTVault_WithCMK.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginCreateOrUpdate(ctx, "Default-RecoveryServices-ResourceGroup", "swaggerExample", armrecoveryservices.Vault{
		Location: to.Ptr("West US"),
		Identity: &armrecoveryservices.IdentityData{
			Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
				"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": {},
			},
		},
		Properties: &armrecoveryservices.VaultProperties{
			Encryption: &armrecoveryservices.VaultPropertiesEncryption{
				InfrastructureEncryption: to.Ptr(armrecoveryservices.InfrastructureEncryptionStateEnabled),
				KekIdentity: &armrecoveryservices.CmkKekIdentity{
					UserAssignedIdentity: to.Ptr("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"),
				},
				KeyVaultProperties: &armrecoveryservices.CmkKeyVaultProperties{
					KeyURI: to.Ptr("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"),
				},
			},
			PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
		},
		SKU: &armrecoveryservices.SKU{
			Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
	// 			"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": &armrecoveryservices.UserIdentity{
	// 				ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 				PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		Encryption: &armrecoveryservices.VaultPropertiesEncryption{
	// 			InfrastructureEncryption: to.Ptr(armrecoveryservices.InfrastructureEncryptionStateEnabled),
	// 			KekIdentity: &armrecoveryservices.CmkKekIdentity{
	// 				UseSystemAssignedIdentity: to.Ptr(false),
	// 				UserAssignedIdentity: to.Ptr("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"),
	// 			},
	// 			KeyVaultProperties: &armrecoveryservices.CmkKeyVaultProperties{
	// 				KeyURI: to.Ptr("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"),
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

Example (CreateOrUpdateVaultWithMonitoringSetting)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PUTVault_WithMonitoringSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginCreateOrUpdate(ctx, "Default-RecoveryServices-ResourceGroup", "swaggerExample", armrecoveryservices.Vault{
		Location: to.Ptr("West US"),
		Identity: &armrecoveryservices.IdentityData{
			Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeSystemAssigned),
		},
		Properties: &armrecoveryservices.VaultProperties{
			MonitoringSettings: &armrecoveryservices.MonitoringSettings{
				AzureMonitorAlertSettings: &armrecoveryservices.AzureMonitorAlertSettings{
					AlertsForAllJobFailures: to.Ptr(armrecoveryservices.AlertsStateEnabled),
				},
				ClassicAlertSettings: &armrecoveryservices.ClassicAlertSettings{
					AlertsForCriticalOperations: to.Ptr(armrecoveryservices.AlertsStateDisabled),
				},
			},
			PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
		},
		SKU: &armrecoveryservices.SKU{
			Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("3137d6c7-5d6c-411c-b934-7a2a729ee247"),
	// 		TenantID: to.Ptr("d676e86e-2206-4a7c-999c-ece52c144b5b"),
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		MonitoringSettings: &armrecoveryservices.MonitoringSettings{
	// 			AzureMonitorAlertSettings: &armrecoveryservices.AzureMonitorAlertSettings{
	// 				AlertsForAllJobFailures: to.Ptr(armrecoveryservices.AlertsStateEnabled),
	// 			},
	// 			ClassicAlertSettings: &armrecoveryservices.ClassicAlertSettings{
	// 				AlertsForCriticalOperations: to.Ptr(armrecoveryservices.AlertsStateDisabled),
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameRS0),
	// 		Tier: to.Ptr("Standard"),
	// 	},
	// }
}
Output:

Example (CreateOrUpdateVaultWithUserAssignedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PUTVault_WithUserAssignedIdentity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginCreateOrUpdate(ctx, "Default-RecoveryServices-ResourceGroup", "swaggerExample", armrecoveryservices.Vault{
		Location: to.Ptr("West US"),
		Identity: &armrecoveryservices.IdentityData{
			Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
				"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": {},
			},
		},
		Properties: &armrecoveryservices.VaultProperties{
			PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
		},
		SKU: &armrecoveryservices.SKU{
			Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
	// 			"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": &armrecoveryservices.UserIdentity{
	// 				ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 				PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

func (*VaultsClient) BeginUpdate

func (client *VaultsClient) BeginUpdate(ctx context.Context, resourceGroupName string, vaultName string, vault PatchVault, options *VaultsClientBeginUpdateOptions) (*runtime.Poller[VaultsClientUpdateResponse], error)

BeginUpdate - Updates the vault. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • vault - Recovery Services Vault to be created.
  • options - VaultsClientBeginUpdateOptions contains the optional parameters for the VaultsClient.BeginUpdate method.
Example (UpdateResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PATCHVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginUpdate(ctx, "HelloWorld", "swaggerExample", armrecoveryservices.PatchVault{
		Tags: map[string]*string{
			"PatchKey": to.Ptr("PatchKeyUpdated"),
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"PatchKey": to.Ptr("PatchKeyUpdated"),
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

Example (UpdateResourceWithCustomerManagedKeys)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PATCHVault_WithCMK.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginUpdate(ctx, "HelloWorld", "swaggerExample", armrecoveryservices.PatchVault{
		Tags: map[string]*string{
			"PatchKey": to.Ptr("PatchKeyUpdated"),
		},
		Identity: &armrecoveryservices.IdentityData{
			Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
				"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": {},
			},
		},
		Properties: &armrecoveryservices.VaultProperties{
			Encryption: &armrecoveryservices.VaultPropertiesEncryption{
				InfrastructureEncryption: to.Ptr(armrecoveryservices.InfrastructureEncryptionStateEnabled),
				KekIdentity: &armrecoveryservices.CmkKekIdentity{
					UserAssignedIdentity: to.Ptr("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"),
				},
				KeyVaultProperties: &armrecoveryservices.CmkKeyVaultProperties{
					KeyURI: to.Ptr("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"),
				},
			},
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"PatchKey": to.Ptr("PatchKeyUpdated"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
	// 			"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": &armrecoveryservices.UserIdentity{
	// 				ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 				PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		Encryption: &armrecoveryservices.VaultPropertiesEncryption{
	// 			InfrastructureEncryption: to.Ptr(armrecoveryservices.InfrastructureEncryptionStateEnabled),
	// 			KekIdentity: &armrecoveryservices.CmkKekIdentity{
	// 				UseSystemAssignedIdentity: to.Ptr(false),
	// 				UserAssignedIdentity: to.Ptr("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"),
	// 			},
	// 			KeyVaultProperties: &armrecoveryservices.CmkKeyVaultProperties{
	// 				KeyURI: to.Ptr("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"),
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

Example (UpdateResourceWithCustomerManagedKeys2)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PatchVault_WithCMK2.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginUpdate(ctx, "HelloWorld", "swaggerExample", armrecoveryservices.PatchVault{
		Tags: map[string]*string{
			"PatchKey": to.Ptr("PatchKeyUpdated"),
		},
		Identity: &armrecoveryservices.IdentityData{
			Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeSystemAssigned),
		},
		Properties: &armrecoveryservices.VaultProperties{
			Encryption: &armrecoveryservices.VaultPropertiesEncryption{
				KekIdentity: &armrecoveryservices.CmkKekIdentity{
					UseSystemAssignedIdentity: to.Ptr(true),
				},
			},
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"PatchKey": to.Ptr("PatchKeyUpdated"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
	// 			"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": &armrecoveryservices.UserIdentity{
	// 				ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 				PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		Encryption: &armrecoveryservices.VaultPropertiesEncryption{
	// 			InfrastructureEncryption: to.Ptr(armrecoveryservices.InfrastructureEncryptionStateEnabled),
	// 			KekIdentity: &armrecoveryservices.CmkKekIdentity{
	// 				UseSystemAssignedIdentity: to.Ptr(true),
	// 			},
	// 			KeyVaultProperties: &armrecoveryservices.CmkKeyVaultProperties{
	// 				KeyURI: to.Ptr("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"),
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

Example (UpdateResourceWithCustomerManagedKeys3)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PATCHVault_WithCMK3.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginUpdate(ctx, "HelloWorld", "swaggerExample", armrecoveryservices.PatchVault{
		Tags: map[string]*string{
			"PatchKey": to.Ptr("PatchKeyUpdated"),
		},
		Identity: &armrecoveryservices.IdentityData{
			Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
				"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": {},
			},
		},
		Properties: &armrecoveryservices.VaultProperties{
			Encryption: &armrecoveryservices.VaultPropertiesEncryption{
				KeyVaultProperties: &armrecoveryservices.CmkKeyVaultProperties{
					KeyURI: to.Ptr("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"),
				},
			},
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"PatchKey": to.Ptr("PatchKeyUpdated"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
	// 			"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": &armrecoveryservices.UserIdentity{
	// 				ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 				PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		Encryption: &armrecoveryservices.VaultPropertiesEncryption{
	// 			InfrastructureEncryption: to.Ptr(armrecoveryservices.InfrastructureEncryptionStateEnabled),
	// 			KekIdentity: &armrecoveryservices.CmkKekIdentity{
	// 				UseSystemAssignedIdentity: to.Ptr(false),
	// 				UserAssignedIdentity: to.Ptr("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi"),
	// 			},
	// 			KeyVaultProperties: &armrecoveryservices.CmkKeyVaultProperties{
	// 				KeyURI: to.Ptr("https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"),
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

Example (UpdateResourceWithUserAssignedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PATCHVault_WithUserAssignedIdentity.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginUpdate(ctx, "HelloWorld", "swaggerExample", armrecoveryservices.PatchVault{
		Tags: map[string]*string{
			"PatchKey": to.Ptr("PatchKeyUpdated"),
		},
		Identity: &armrecoveryservices.IdentityData{
			Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
				"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": {},
			},
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"PatchKey": to.Ptr("PatchKeyUpdated"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeUserAssigned),
	// 		UserAssignedIdentities: map[string]*armrecoveryservices.UserIdentity{
	// 			"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": &armrecoveryservices.UserIdentity{
	// 				ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 				PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 			},
	// 		},
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

Example (UpdateVaultWithMonitoringSetting)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/PATCHVault_WithMonitoringSettings.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVaultsClient().BeginUpdate(ctx, "HelloWorld", "swaggerExample", armrecoveryservices.PatchVault{
		Tags: map[string]*string{
			"PatchKey": to.Ptr("PatchKeyUpdated"),
		},
		Properties: &armrecoveryservices.VaultProperties{
			MonitoringSettings: &armrecoveryservices.MonitoringSettings{
				AzureMonitorAlertSettings: &armrecoveryservices.AzureMonitorAlertSettings{
					AlertsForAllJobFailures: to.Ptr(armrecoveryservices.AlertsStateEnabled),
				},
				ClassicAlertSettings: &armrecoveryservices.ClassicAlertSettings{
					AlertsForCriticalOperations: to.Ptr(armrecoveryservices.AlertsStateDisabled),
				},
			},
		},
	}, 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"PatchKey": to.Ptr("PatchKeyUpdated"),
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		MonitoringSettings: &armrecoveryservices.MonitoringSettings{
	// 			AzureMonitorAlertSettings: &armrecoveryservices.AzureMonitorAlertSettings{
	// 				AlertsForAllJobFailures: to.Ptr(armrecoveryservices.AlertsStateEnabled),
	// 			},
	// 			ClassicAlertSettings: &armrecoveryservices.ClassicAlertSettings{
	// 				AlertsForCriticalOperations: to.Ptr(armrecoveryservices.AlertsStateDisabled),
	// 			},
	// 		},
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 	},
	// 	SKU: &armrecoveryservices.SKU{
	// 		Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 	},
	// }
}
Output:

func (*VaultsClient) Delete

func (client *VaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientDeleteOptions) (VaultsClientDeleteResponse, error)

Delete - Deletes a vault. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/DeleteVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewVaultsClient().Delete(ctx, "Default-RecoveryServices-ResourceGroup", "swaggerExample", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}
Output:

func (*VaultsClient) Get

func (client *VaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string, options *VaultsClientGetOptions) (VaultsClientGetResponse, error)

Get - Get the Vault details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • vaultName - The name of the recovery services vault.
  • options - VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/GETVault.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVaultsClient().Get(ctx, "Default-RecoveryServices-ResourceGroup", "swaggerExample", 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.Vault = armrecoveryservices.Vault{
	// 	Name: to.Ptr("swaggerExample"),
	// 	Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
	// 	Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
	// 	ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
	// 	Location: to.Ptr("westus"),
	// 	Tags: map[string]*string{
	// 		"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
	// 	},
	// 	Identity: &armrecoveryservices.IdentityData{
	// 		Type: to.Ptr(armrecoveryservices.ResourceIdentityTypeSystemAssigned),
	// 		PrincipalID: to.Ptr("3137d6c7-5d6c-411c-b934-7a2a729ee247"),
	// 		TenantID: to.Ptr("d676e86e-2206-4a7c-999c-ece52c144b5b"),
	// 	},
	// 	Properties: &armrecoveryservices.VaultProperties{
	// 		MonitoringSettings: &armrecoveryservices.MonitoringSettings{
	// 			AzureMonitorAlertSettings: &armrecoveryservices.AzureMonitorAlertSettings{
	// 				AlertsForAllJobFailures: to.Ptr(armrecoveryservices.AlertsStateEnabled),
	// 			},
	// 			ClassicAlertSettings: &armrecoveryservices.ClassicAlertSettings{
	// 				AlertsForCriticalOperations: to.Ptr(armrecoveryservices.AlertsStateDisabled),
	// 			},
	// 		},
	// 		PrivateEndpointConnections: []*armrecoveryservices.PrivateEndpointConnectionVaultProperties{
	// 			{
	// 				ID: to.Ptr("/subscriptions/6c48fa17-39c7-45f1-90ac-47a587128ace/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/Vaults/pemsi-ecy-rsv2/privateEndpointConnections/pe114-pemsi-ecy-rsv.5944358949303501042.backup.75061caa-cba4-4849-8e09-608da4914aad"),
	// 				Properties: &armrecoveryservices.PrivateEndpointConnection{
	// 					GroupIDs: []*armrecoveryservices.VaultSubResourceType{
	// 						to.Ptr(armrecoveryservices.VaultSubResourceTypeAzureBackup)},
	// 						PrivateEndpoint: &armrecoveryservices.PrivateEndpoint{
	// 							ID: to.Ptr("/subscriptions/6c48fa17-39c7-45f1-90ac-47a587128ace/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.Network/privateEndpoints/pe114-pemsi-ecy-rsv"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armrecoveryservices.PrivateLinkServiceConnectionState{
	// 							Description: to.Ptr("None"),
	// 							ActionsRequired: to.Ptr("None"),
	// 							Status: to.Ptr(armrecoveryservices.PrivateEndpointConnectionStatusApproved),
	// 						},
	// 						ProvisioningState: to.Ptr(armrecoveryservices.ProvisioningStateSucceeded),
	// 					},
	// 			}},
	// 			PrivateEndpointStateForBackup: to.Ptr(armrecoveryservices.VaultPrivateEndpointStateEnabled),
	// 			PrivateEndpointStateForSiteRecovery: to.Ptr(armrecoveryservices.VaultPrivateEndpointStateNone),
	// 			ProvisioningState: to.Ptr("Succeeded"),
	// 			PublicNetworkAccess: to.Ptr(armrecoveryservices.PublicNetworkAccessEnabled),
	// 			RedundancySettings: &armrecoveryservices.VaultPropertiesRedundancySettings{
	// 				CrossRegionRestore: to.Ptr(armrecoveryservices.CrossRegionRestoreEnabled),
	// 				StandardTierStorageRedundancy: to.Ptr(armrecoveryservices.StandardTierStorageRedundancyGeoRedundant),
	// 			},
	// 			SecureScore: to.Ptr(armrecoveryservices.SecureScoreLevelNone),
	// 		},
	// 		SKU: &armrecoveryservices.SKU{
	// 			Name: to.Ptr(armrecoveryservices.SKUNameStandard),
	// 		},
	// 	}
}
Output:

func (*VaultsClient) NewListByResourceGroupPager added in v0.5.0

func (client *VaultsClient) NewListByResourceGroupPager(resourceGroupName string, options *VaultsClientListByResourceGroupOptions) *runtime.Pager[VaultsClientListByResourceGroupResponse]

NewListByResourceGroupPager - Retrieve a list of Vaults.

Generated from API version 2023-04-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ListResources.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVaultsClient().NewListByResourceGroupPager("Default-RecoveryServices-ResourceGroup", 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.VaultList = armrecoveryservices.VaultList{
		// 	Value: []*armrecoveryservices.Vault{
		// 		{
		// 			Name: to.Ptr("patchtest"),
		// 			Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
		// 			Etag: to.Ptr("W/\"datetime'2017-11-22T11%3A05%3A19.907Z'\""),
		// 			ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/patchtest"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 				"Love": to.Ptr("India"),
		// 			},
		// 			Properties: &armrecoveryservices.VaultProperties{
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 			},
		// 			SKU: &armrecoveryservices.SKU{
		// 				Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("swaggerExample"),
		// 			Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
		// 			Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
		// 			ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 				"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
		// 			},
		// 			Properties: &armrecoveryservices.VaultProperties{
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 			},
		// 			SKU: &armrecoveryservices.SKU{
		// 				Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("today1"),
		// 			Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
		// 			Etag: to.Ptr("W/\"datetime'2017-11-21T10%3A52%3A19.633Z'\""),
		// 			ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/today1"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 				"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
		// 			},
		// 			Properties: &armrecoveryservices.VaultProperties{
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 			},
		// 			SKU: &armrecoveryservices.SKU{
		// 				Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

func (*VaultsClient) NewListBySubscriptionIDPager added in v0.5.0

NewListBySubscriptionIDPager - Fetches all the resources of the specified type in the subscription.

Generated from API version 2023-04-01

  • options - VaultsClientListBySubscriptionIDOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionIDPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/recoveryservices/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ListBySubscriptionIds.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservices"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrecoveryservices.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVaultsClient().NewListBySubscriptionIDPager(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.VaultList = armrecoveryservices.VaultList{
		// 	Value: []*armrecoveryservices.Vault{
		// 		{
		// 			Name: to.Ptr("patchtest"),
		// 			Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
		// 			Etag: to.Ptr("W/\"datetime'2017-11-22T11%3A05%3A19.907Z'\""),
		// 			ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/patchtest"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 				"Love": to.Ptr("India"),
		// 			},
		// 			Properties: &armrecoveryservices.VaultProperties{
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 			},
		// 			SKU: &armrecoveryservices.SKU{
		// 				Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("swaggerExample"),
		// 			Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
		// 			Etag: to.Ptr("W/\"datetime'2017-12-15T12%3A36%3A51.68Z'\""),
		// 			ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/swaggerExample"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 				"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
		// 			},
		// 			Properties: &armrecoveryservices.VaultProperties{
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 			},
		// 			SKU: &armrecoveryservices.SKU{
		// 				Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("today1"),
		// 			Type: to.Ptr("Microsoft.RecoveryServices/vaults"),
		// 			Etag: to.Ptr("W/\"datetime'2017-11-21T10%3A52%3A19.633Z'\""),
		// 			ID: to.Ptr("/subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/HelloWorld/providers/Microsoft.RecoveryServices/vaults/today1"),
		// 			Location: to.Ptr("westus"),
		// 			Tags: map[string]*string{
		// 				"TestUpdatedKey": to.Ptr("TestUpdatedValue"),
		// 			},
		// 			Properties: &armrecoveryservices.VaultProperties{
		// 				ProvisioningState: to.Ptr("Succeeded"),
		// 			},
		// 			SKU: &armrecoveryservices.SKU{
		// 				Name: to.Ptr(armrecoveryservices.SKUNameStandard),
		// 			},
		// 	}},
		// }
	}
}
Output:

type VaultsClientBeginCreateOrUpdateOptions added in v0.3.0

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

VaultsClientBeginCreateOrUpdateOptions contains the optional parameters for the VaultsClient.BeginCreateOrUpdate method.

type VaultsClientBeginUpdateOptions added in v0.3.0

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

VaultsClientBeginUpdateOptions contains the optional parameters for the VaultsClient.BeginUpdate method.

type VaultsClientCreateOrUpdateResponse added in v0.3.0

type VaultsClientCreateOrUpdateResponse struct {
	// Resource information, as returned by the resource provider.
	Vault
}

VaultsClientCreateOrUpdateResponse contains the response from method VaultsClient.BeginCreateOrUpdate.

type VaultsClientDeleteOptions added in v0.3.0

type VaultsClientDeleteOptions struct {
}

VaultsClientDeleteOptions contains the optional parameters for the VaultsClient.Delete method.

type VaultsClientDeleteResponse added in v0.3.0

type VaultsClientDeleteResponse struct {
}

VaultsClientDeleteResponse contains the response from method VaultsClient.Delete.

type VaultsClientGetOptions added in v0.3.0

type VaultsClientGetOptions struct {
}

VaultsClientGetOptions contains the optional parameters for the VaultsClient.Get method.

type VaultsClientGetResponse added in v0.3.0

type VaultsClientGetResponse struct {
	// Resource information, as returned by the resource provider.
	Vault
}

VaultsClientGetResponse contains the response from method VaultsClient.Get.

type VaultsClientListByResourceGroupOptions added in v0.3.0

type VaultsClientListByResourceGroupOptions struct {
}

VaultsClientListByResourceGroupOptions contains the optional parameters for the VaultsClient.NewListByResourceGroupPager method.

type VaultsClientListByResourceGroupResponse added in v0.3.0

type VaultsClientListByResourceGroupResponse struct {
	// The response model for a list of Vaults.
	VaultList
}

VaultsClientListByResourceGroupResponse contains the response from method VaultsClient.NewListByResourceGroupPager.

type VaultsClientListBySubscriptionIDOptions added in v0.3.0

type VaultsClientListBySubscriptionIDOptions struct {
}

VaultsClientListBySubscriptionIDOptions contains the optional parameters for the VaultsClient.NewListBySubscriptionIDPager method.

type VaultsClientListBySubscriptionIDResponse added in v0.3.0

type VaultsClientListBySubscriptionIDResponse struct {
	// The response model for a list of Vaults.
	VaultList
}

VaultsClientListBySubscriptionIDResponse contains the response from method VaultsClient.NewListBySubscriptionIDPager.

type VaultsClientUpdateResponse added in v0.3.0

type VaultsClientUpdateResponse struct {
	// Resource information, as returned by the resource provider.
	Vault
}

VaultsClientUpdateResponse contains the response from method VaultsClient.BeginUpdate.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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