armcommunication

package module
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 14 Imported by: 14

README

Azure Communication Services Module for Go

PkgGoDev

The armcommunication module provides operations for working with Azure Communication 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 Communication Services module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/communication/armcommunication/v2

Authorization

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

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 Communication 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 ActionType

type ActionType string

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

const (
	ActionTypeInternal ActionType = "Internal"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type CheckNameAvailabilityReason

type CheckNameAvailabilityReason string

CheckNameAvailabilityReason - The reason why the given name is not available.

const (
	CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
	CheckNameAvailabilityReasonInvalid       CheckNameAvailabilityReason = "Invalid"
)

func PossibleCheckNameAvailabilityReasonValues

func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason

PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.

type CheckNameAvailabilityRequest

type CheckNameAvailabilityRequest struct {
	// The name of the resource for which availability needs to be checked.
	Name *string

	// The resource type.
	Type *string
}

CheckNameAvailabilityRequest - The check availability request body.

func (CheckNameAvailabilityRequest) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.

func (*CheckNameAvailabilityRequest) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.

type CheckNameAvailabilityResponse

type CheckNameAvailabilityResponse struct {
	// Detailed reason why the given name is available.
	Message *string

	// Indicates if the resource name is available.
	NameAvailable *bool

	// The reason why the given name is not available.
	Reason *CheckNameAvailabilityReason
}

CheckNameAvailabilityResponse - The check availability result.

func (CheckNameAvailabilityResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.

func (*CheckNameAvailabilityResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.

type ClientFactory

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

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

func NewClientFactory

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

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

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

func (*ClientFactory) NewDomainsClient

func (c *ClientFactory) NewDomainsClient() *DomainsClient

NewDomainsClient creates a new instance of DomainsClient.

func (*ClientFactory) NewEmailServicesClient

func (c *ClientFactory) NewEmailServicesClient() *EmailServicesClient

NewEmailServicesClient creates a new instance of EmailServicesClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewSenderUsernamesClient

func (c *ClientFactory) NewSenderUsernamesClient() *SenderUsernamesClient

NewSenderUsernamesClient creates a new instance of SenderUsernamesClient.

func (*ClientFactory) NewServicesClient

func (c *ClientFactory) NewServicesClient() *ServicesClient

NewServicesClient creates a new instance of ServicesClient.

type CommunicationServicesProvisioningState

type CommunicationServicesProvisioningState string

CommunicationServicesProvisioningState - Provisioning state of the resource.

const (
	CommunicationServicesProvisioningStateCanceled  CommunicationServicesProvisioningState = "Canceled"
	CommunicationServicesProvisioningStateCreating  CommunicationServicesProvisioningState = "Creating"
	CommunicationServicesProvisioningStateDeleting  CommunicationServicesProvisioningState = "Deleting"
	CommunicationServicesProvisioningStateFailed    CommunicationServicesProvisioningState = "Failed"
	CommunicationServicesProvisioningStateMoving    CommunicationServicesProvisioningState = "Moving"
	CommunicationServicesProvisioningStateRunning   CommunicationServicesProvisioningState = "Running"
	CommunicationServicesProvisioningStateSucceeded CommunicationServicesProvisioningState = "Succeeded"
	CommunicationServicesProvisioningStateUnknown   CommunicationServicesProvisioningState = "Unknown"
	CommunicationServicesProvisioningStateUpdating  CommunicationServicesProvisioningState = "Updating"
)

func PossibleCommunicationServicesProvisioningStateValues

func PossibleCommunicationServicesProvisioningStateValues() []CommunicationServicesProvisioningState

PossibleCommunicationServicesProvisioningStateValues returns the possible values for the CommunicationServicesProvisioningState const type.

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 DNSRecord

type DNSRecord struct {
	// READ-ONLY; Name of the DNS record.
	Name *string

	// READ-ONLY; Represents an expiry time in seconds to represent how long this entry can be cached by the resolver, default
	// = 3600sec.
	TTL *int32

	// READ-ONLY; Type of the DNS record. Example: TXT
	Type *string

	// READ-ONLY; Value of the DNS record.
	Value *string
}

DNSRecord - A class that represents a VerificationStatus record.

func (DNSRecord) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DNSRecord.

func (*DNSRecord) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DNSRecord.

type DomainManagement

type DomainManagement string

DomainManagement - Describes how a Domains resource is being managed.

const (
	DomainManagementAzureManaged                    DomainManagement = "AzureManaged"
	DomainManagementCustomerManaged                 DomainManagement = "CustomerManaged"
	DomainManagementCustomerManagedInExchangeOnline DomainManagement = "CustomerManagedInExchangeOnline"
)

func PossibleDomainManagementValues

func PossibleDomainManagementValues() []DomainManagement

PossibleDomainManagementValues returns the possible values for the DomainManagement const type.

type DomainProperties

type DomainProperties struct {
	// REQUIRED; Describes how a Domains resource is being managed.
	DomainManagement *DomainManagement

	// Describes whether user engagement tracking is enabled or disabled.
	UserEngagementTracking *UserEngagementTracking

	// READ-ONLY; The location where the Domains resource data is stored at rest.
	DataLocation *string

	// READ-ONLY; P2 sender domain that is displayed to the email recipients [RFC 5322].
	FromSenderDomain *string

	// READ-ONLY; P1 sender domain that is present on the email envelope [RFC 5321].
	MailFromSenderDomain *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *DomainsProvisioningState

	// READ-ONLY; List of DnsRecord
	VerificationRecords *DomainPropertiesVerificationRecords

	// READ-ONLY; List of VerificationStatusRecord
	VerificationStates *DomainPropertiesVerificationStates
}

DomainProperties - A class that describes the properties of a Domains resource.

func (DomainProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DomainProperties.

func (*DomainProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DomainProperties.

type DomainPropertiesVerificationRecords

type DomainPropertiesVerificationRecords struct {
	// A class that represents a VerificationStatus record.
	DKIM *DNSRecord

	// A class that represents a VerificationStatus record.
	DKIM2 *DNSRecord

	// A class that represents a VerificationStatus record.
	DMARC *DNSRecord

	// A class that represents a VerificationStatus record.
	Domain *DNSRecord

	// A class that represents a VerificationStatus record.
	SPF *DNSRecord
}

DomainPropertiesVerificationRecords - List of DnsRecord

func (DomainPropertiesVerificationRecords) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DomainPropertiesVerificationRecords.

func (*DomainPropertiesVerificationRecords) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DomainPropertiesVerificationRecords.

type DomainPropertiesVerificationStates

type DomainPropertiesVerificationStates struct {
	// A class that represents a VerificationStatus record.
	DKIM *VerificationStatusRecord

	// A class that represents a VerificationStatus record.
	DKIM2 *VerificationStatusRecord

	// A class that represents a VerificationStatus record.
	DMARC *VerificationStatusRecord

	// A class that represents a VerificationStatus record.
	Domain *VerificationStatusRecord

	// A class that represents a VerificationStatus record.
	SPF *VerificationStatusRecord
}

DomainPropertiesVerificationStates - List of VerificationStatusRecord

func (DomainPropertiesVerificationStates) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DomainPropertiesVerificationStates.

func (*DomainPropertiesVerificationStates) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DomainPropertiesVerificationStates.

type DomainResource

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

	// The properties of a Domains resource.
	Properties *DomainProperties

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

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DomainResource - A class representing a Domains resource.

func (DomainResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DomainResource.

func (*DomainResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DomainResource.

type DomainResourceList

type DomainResourceList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of Domains resource
	Value []*DomainResource
}

DomainResourceList - Object that includes an array of Domains resource and a possible link for next set.

func (DomainResourceList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type DomainResourceList.

func (*DomainResourceList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type DomainResourceList.

type DomainsClient

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

DomainsClient contains the methods for the Domains group. Don't use this type directly, use NewDomainsClient() instead.

func NewDomainsClient

func NewDomainsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainsClient, error)

NewDomainsClient creates a new instance of DomainsClient with the specified values.

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

func (*DomainsClient) BeginCancelVerification

func (client *DomainsClient) BeginCancelVerification(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, parameters VerificationParameter, options *DomainsClientBeginCancelVerificationOptions) (*runtime.Poller[DomainsClientCancelVerificationResponse], error)

BeginCancelVerification - Cancel verification of DNS record. 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • parameters - Type of verification to be canceled.
  • options - DomainsClientBeginCancelVerificationOptions contains the optional parameters for the DomainsClient.BeginCancelVerification method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/cancelVerification.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDomainsClient().BeginCancelVerification(ctx, "MyResourceGroup", "MyEmailServiceResource", "mydomain.com", armcommunication.VerificationParameter{
	VerificationType: to.Ptr(armcommunication.VerificationTypeSPF),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*DomainsClient) BeginCreateOrUpdate

func (client *DomainsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, parameters DomainResource, options *DomainsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DomainsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Add a new Domains resource under the parent EmailService resource or update an existing Domains 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • parameters - Parameters for the create or update operation
  • options - DomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/createOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDomainsClient().BeginCreateOrUpdate(ctx, "MyResourceGroup", "MyEmailServiceResource", "mydomain.com", armcommunication.DomainResource{
	Location: to.Ptr("Global"),
	Properties: &armcommunication.DomainProperties{
		DomainManagement: to.Ptr(armcommunication.DomainManagementCustomerManaged),
	},
}, 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.DomainResource = armcommunication.DomainResource{
// 	Name: to.Ptr("mydomain.com"),
// 	Type: to.Ptr("Microsoft.Communication/EmailServices/Domains"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource/Domains/mydomain.com"),
// 	Location: to.Ptr("Global"),
// 	Properties: &armcommunication.DomainProperties{
// 		DataLocation: to.Ptr("United States"),
// 		DomainManagement: to.Ptr(armcommunication.DomainManagementCustomerManaged),
// 		FromSenderDomain: to.Ptr("mydomain.com"),
// 		MailFromSenderDomain: to.Ptr("mydomain.com"),
// 		ProvisioningState: to.Ptr(armcommunication.DomainsProvisioningStateSucceeded),
// 		UserEngagementTracking: to.Ptr(armcommunication.UserEngagementTrackingDisabled),
// 		VerificationRecords: &armcommunication.DomainPropertiesVerificationRecords{
// 			Domain: &armcommunication.DNSRecord{
// 				Name: to.Ptr("recordName"),
// 				Type: to.Ptr("TXT"),
// 				TTL: to.Ptr[int32](3600),
// 				Value: to.Ptr("recordValue"),
// 			},
// 		},
// 		VerificationStates: &armcommunication.DomainPropertiesVerificationStates{
// 			Domain: &armcommunication.VerificationStatusRecord{
// 				ErrorCode: to.Ptr(""),
// 				Status: to.Ptr(armcommunication.VerificationStatusNotStarted),
// 			},
// 		},
// 	},
// }
Output:

func (*DomainsClient) BeginDelete

func (client *DomainsClient) BeginDelete(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, options *DomainsClientBeginDeleteOptions) (*runtime.Poller[DomainsClientDeleteResponse], error)

BeginDelete - Operation to delete a Domains 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • options - DomainsClientBeginDeleteOptions contains the optional parameters for the DomainsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/delete.json

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

func (*DomainsClient) BeginInitiateVerification

func (client *DomainsClient) BeginInitiateVerification(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, parameters VerificationParameter, options *DomainsClientBeginInitiateVerificationOptions) (*runtime.Poller[DomainsClientInitiateVerificationResponse], error)

BeginInitiateVerification - Initiate verification of DNS record. 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • parameters - Type of verification to be initiated.
  • options - DomainsClientBeginInitiateVerificationOptions contains the optional parameters for the DomainsClient.BeginInitiateVerification method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/initiateVerification.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDomainsClient().BeginInitiateVerification(ctx, "MyResourceGroup", "MyEmailServiceResource", "mydomain.com", armcommunication.VerificationParameter{
	VerificationType: to.Ptr(armcommunication.VerificationTypeSPF),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*DomainsClient) BeginUpdate

func (client *DomainsClient) BeginUpdate(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, parameters UpdateDomainRequestParameters, options *DomainsClientBeginUpdateOptions) (*runtime.Poller[DomainsClientUpdateResponse], error)

BeginUpdate - Operation to update an existing Domains 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • parameters - Parameters for the update operation
  • options - DomainsClientBeginUpdateOptions contains the optional parameters for the DomainsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDomainsClient().BeginUpdate(ctx, "MyResourceGroup", "MyEmailServiceResource", "mydomain.com", armcommunication.UpdateDomainRequestParameters{
	Properties: &armcommunication.UpdateDomainProperties{
		UserEngagementTracking: to.Ptr(armcommunication.UserEngagementTrackingEnabled),
	},
}, 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.DomainResource = armcommunication.DomainResource{
// 	Name: to.Ptr("mydomain.com"),
// 	Type: to.Ptr("Microsoft.Communication/EmailServices/Domains"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource/Domains/mydomain.com"),
// 	Location: to.Ptr("Global"),
// 	Properties: &armcommunication.DomainProperties{
// 		DataLocation: to.Ptr("United States"),
// 		DomainManagement: to.Ptr(armcommunication.DomainManagementCustomerManaged),
// 		FromSenderDomain: to.Ptr("mydomain.com"),
// 		MailFromSenderDomain: to.Ptr("mydomain.com"),
// 		ProvisioningState: to.Ptr(armcommunication.DomainsProvisioningStateSucceeded),
// 		UserEngagementTracking: to.Ptr(armcommunication.UserEngagementTrackingEnabled),
// 		VerificationRecords: &armcommunication.DomainPropertiesVerificationRecords{
// 			Domain: &armcommunication.DNSRecord{
// 				Name: to.Ptr("recordName"),
// 				Type: to.Ptr("TXT"),
// 				TTL: to.Ptr[int32](3600),
// 				Value: to.Ptr("recordValue"),
// 			},
// 			SPF: &armcommunication.DNSRecord{
// 				Name: to.Ptr("recordName"),
// 				Type: to.Ptr("TXT"),
// 				TTL: to.Ptr[int32](3600),
// 				Value: to.Ptr("recordValue"),
// 			},
// 		},
// 		VerificationStates: &armcommunication.DomainPropertiesVerificationStates{
// 			Domain: &armcommunication.VerificationStatusRecord{
// 				ErrorCode: to.Ptr(""),
// 				Status: to.Ptr(armcommunication.VerificationStatusVerified),
// 			},
// 			SPF: &armcommunication.VerificationStatusRecord{
// 				ErrorCode: to.Ptr(""),
// 				Status: to.Ptr(armcommunication.VerificationStatusNotStarted),
// 			},
// 		},
// 	},
// }
Output:

func (*DomainsClient) Get

func (client *DomainsClient) Get(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, options *DomainsClientGetOptions) (DomainsClientGetResponse, error)

Get - Get the Domains resource and its properties. 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • options - DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewDomainsClient().Get(ctx, "MyResourceGroup", "MyEmailServiceResource", "mydomain.com", 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.DomainResource = armcommunication.DomainResource{
// 	Name: to.Ptr("mydomain.com"),
// 	Type: to.Ptr("Microsoft.Communication/EmailServices/Domains"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource/Domains/mydomain.com"),
// 	Location: to.Ptr("Global"),
// 	Properties: &armcommunication.DomainProperties{
// 		DataLocation: to.Ptr("United States"),
// 		DomainManagement: to.Ptr(armcommunication.DomainManagementCustomerManaged),
// 		FromSenderDomain: to.Ptr("mydomain.com"),
// 		MailFromSenderDomain: to.Ptr("mydomain.com"),
// 		ProvisioningState: to.Ptr(armcommunication.DomainsProvisioningStateSucceeded),
// 		UserEngagementTracking: to.Ptr(armcommunication.UserEngagementTrackingDisabled),
// 		VerificationRecords: &armcommunication.DomainPropertiesVerificationRecords{
// 			Domain: &armcommunication.DNSRecord{
// 				Name: to.Ptr("recordName"),
// 				Type: to.Ptr("TXT"),
// 				TTL: to.Ptr[int32](3600),
// 				Value: to.Ptr("recordValue"),
// 			},
// 		},
// 		VerificationStates: &armcommunication.DomainPropertiesVerificationStates{
// 			Domain: &armcommunication.VerificationStatusRecord{
// 				ErrorCode: to.Ptr(""),
// 				Status: to.Ptr(armcommunication.VerificationStatusVerified),
// 			},
// 		},
// 	},
// }
Output:

func (*DomainsClient) NewListByEmailServiceResourcePager

func (client *DomainsClient) NewListByEmailServiceResourcePager(resourceGroupName string, emailServiceName string, options *DomainsClientListByEmailServiceResourceOptions) *runtime.Pager[DomainsClientListByEmailServiceResourceResponse]

NewListByEmailServiceResourcePager - Handles requests to list all Domains resources under the parent EmailServices resource.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • emailServiceName - The name of the EmailService resource.
  • options - DomainsClientListByEmailServiceResourceOptions contains the optional parameters for the DomainsClient.NewListByEmailServiceResourcePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/domains/listByEmailService.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewDomainsClient().NewListByEmailServiceResourcePager("MyResourceGroup", "MyEmailServiceResource", 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.DomainResourceList = armcommunication.DomainResourceList{
	// 	Value: []*armcommunication.DomainResource{
	// 		{
	// 			Name: to.Ptr("mydomain.com"),
	// 			Type: to.Ptr("Microsoft.Communication/EmailServices/Domains"),
	// 			ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource/Domains/mydomain.com"),
	// 			Location: to.Ptr("Global"),
	// 			Properties: &armcommunication.DomainProperties{
	// 				DataLocation: to.Ptr("United States"),
	// 				DomainManagement: to.Ptr(armcommunication.DomainManagementCustomerManaged),
	// 				FromSenderDomain: to.Ptr("mydomain.com"),
	// 				MailFromSenderDomain: to.Ptr("mydomain.com"),
	// 				ProvisioningState: to.Ptr(armcommunication.DomainsProvisioningStateSucceeded),
	// 				VerificationRecords: &armcommunication.DomainPropertiesVerificationRecords{
	// 					Domain: &armcommunication.DNSRecord{
	// 						Name: to.Ptr("recordName"),
	// 						Type: to.Ptr("TXT"),
	// 						TTL: to.Ptr[int32](3600),
	// 						Value: to.Ptr("recordValue"),
	// 					},
	// 					SPF: &armcommunication.DNSRecord{
	// 						Name: to.Ptr("recordName"),
	// 						Type: to.Ptr("TXT"),
	// 						TTL: to.Ptr[int32](3600),
	// 						Value: to.Ptr("recordValue"),
	// 					},
	// 				},
	// 				VerificationStates: &armcommunication.DomainPropertiesVerificationStates{
	// 					Domain: &armcommunication.VerificationStatusRecord{
	// 						ErrorCode: to.Ptr(""),
	// 						Status: to.Ptr(armcommunication.VerificationStatusVerified),
	// 					},
	// 					SPF: &armcommunication.VerificationStatusRecord{
	// 						ErrorCode: to.Ptr(""),
	// 						Status: to.Ptr(armcommunication.VerificationStatusNotStarted),
	// 					},
	// 				},
	// 			},
	// 	}},
	// }
}
Output:

type DomainsClientBeginCancelVerificationOptions

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

DomainsClientBeginCancelVerificationOptions contains the optional parameters for the DomainsClient.BeginCancelVerification method.

type DomainsClientBeginCreateOrUpdateOptions

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

DomainsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainsClient.BeginCreateOrUpdate method.

type DomainsClientBeginDeleteOptions

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

DomainsClientBeginDeleteOptions contains the optional parameters for the DomainsClient.BeginDelete method.

type DomainsClientBeginInitiateVerificationOptions

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

DomainsClientBeginInitiateVerificationOptions contains the optional parameters for the DomainsClient.BeginInitiateVerification method.

type DomainsClientBeginUpdateOptions

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

DomainsClientBeginUpdateOptions contains the optional parameters for the DomainsClient.BeginUpdate method.

type DomainsClientCancelVerificationResponse

type DomainsClientCancelVerificationResponse struct {
}

DomainsClientCancelVerificationResponse contains the response from method DomainsClient.BeginCancelVerification.

type DomainsClientCreateOrUpdateResponse

type DomainsClientCreateOrUpdateResponse struct {
	// A class representing a Domains resource.
	DomainResource
}

DomainsClientCreateOrUpdateResponse contains the response from method DomainsClient.BeginCreateOrUpdate.

type DomainsClientDeleteResponse

type DomainsClientDeleteResponse struct {
}

DomainsClientDeleteResponse contains the response from method DomainsClient.BeginDelete.

type DomainsClientGetOptions

type DomainsClientGetOptions struct {
}

DomainsClientGetOptions contains the optional parameters for the DomainsClient.Get method.

type DomainsClientGetResponse

type DomainsClientGetResponse struct {
	// A class representing a Domains resource.
	DomainResource
}

DomainsClientGetResponse contains the response from method DomainsClient.Get.

type DomainsClientInitiateVerificationResponse

type DomainsClientInitiateVerificationResponse struct {
}

DomainsClientInitiateVerificationResponse contains the response from method DomainsClient.BeginInitiateVerification.

type DomainsClientListByEmailServiceResourceOptions

type DomainsClientListByEmailServiceResourceOptions struct {
}

DomainsClientListByEmailServiceResourceOptions contains the optional parameters for the DomainsClient.NewListByEmailServiceResourcePager method.

type DomainsClientListByEmailServiceResourceResponse

type DomainsClientListByEmailServiceResourceResponse struct {
	// Object that includes an array of Domains resource and a possible link for next set.
	DomainResourceList
}

DomainsClientListByEmailServiceResourceResponse contains the response from method DomainsClient.NewListByEmailServiceResourcePager.

type DomainsClientUpdateResponse

type DomainsClientUpdateResponse struct {
	// A class representing a Domains resource.
	DomainResource
}

DomainsClientUpdateResponse contains the response from method DomainsClient.BeginUpdate.

type DomainsProvisioningState

type DomainsProvisioningState string

DomainsProvisioningState - Provisioning state of the resource.

const (
	DomainsProvisioningStateCanceled  DomainsProvisioningState = "Canceled"
	DomainsProvisioningStateCreating  DomainsProvisioningState = "Creating"
	DomainsProvisioningStateDeleting  DomainsProvisioningState = "Deleting"
	DomainsProvisioningStateFailed    DomainsProvisioningState = "Failed"
	DomainsProvisioningStateMoving    DomainsProvisioningState = "Moving"
	DomainsProvisioningStateRunning   DomainsProvisioningState = "Running"
	DomainsProvisioningStateSucceeded DomainsProvisioningState = "Succeeded"
	DomainsProvisioningStateUnknown   DomainsProvisioningState = "Unknown"
	DomainsProvisioningStateUpdating  DomainsProvisioningState = "Updating"
)

func PossibleDomainsProvisioningStateValues

func PossibleDomainsProvisioningStateValues() []DomainsProvisioningState

PossibleDomainsProvisioningStateValues returns the possible values for the DomainsProvisioningState const type.

type EmailServiceProperties

type EmailServiceProperties struct {
	// REQUIRED; The location where the email service stores its data at rest.
	DataLocation *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *EmailServicesProvisioningState
}

EmailServiceProperties - A class that describes the properties of the EmailService.

func (EmailServiceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailServiceProperties.

func (*EmailServiceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailServiceProperties.

type EmailServiceResource

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

	// The properties of the service.
	Properties *EmailServiceProperties

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

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

EmailServiceResource - A class representing an EmailService resource.

func (EmailServiceResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailServiceResource.

func (*EmailServiceResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailServiceResource.

type EmailServiceResourceList

type EmailServiceResourceList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of EmailService
	Value []*EmailServiceResource
}

EmailServiceResourceList - Object that includes an array of EmailServices and a possible link for next set.

func (EmailServiceResourceList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailServiceResourceList.

func (*EmailServiceResourceList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailServiceResourceList.

type EmailServiceResourceUpdate

type EmailServiceResourceUpdate struct {
	// Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]*string
}

EmailServiceResourceUpdate - A class representing update parameters for EmailService resource.

func (EmailServiceResourceUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type EmailServiceResourceUpdate.

func (*EmailServiceResourceUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type EmailServiceResourceUpdate.

type EmailServicesClient

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

EmailServicesClient contains the methods for the EmailServices group. Don't use this type directly, use NewEmailServicesClient() instead.

func NewEmailServicesClient

func NewEmailServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EmailServicesClient, error)

NewEmailServicesClient creates a new instance of EmailServicesClient with the specified values.

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

func (*EmailServicesClient) BeginCreateOrUpdate

func (client *EmailServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, emailServiceName string, parameters EmailServiceResource, options *EmailServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[EmailServicesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a new EmailService or update an existing EmailService. 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.
  • emailServiceName - The name of the EmailService resource.
  • parameters - Parameters for the create or update operation
  • options - EmailServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the EmailServicesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/createOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewEmailServicesClient().BeginCreateOrUpdate(ctx, "MyResourceGroup", "MyEmailServiceResource", armcommunication.EmailServiceResource{
	Location: to.Ptr("Global"),
	Properties: &armcommunication.EmailServiceProperties{
		DataLocation: to.Ptr("United States"),
	},
}, 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.EmailServiceResource = armcommunication.EmailServiceResource{
// 	Name: to.Ptr("MyEmailServiceResource"),
// 	Type: to.Ptr("Microsoft.Communication/EmailServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource"),
// 	Location: to.Ptr("Global"),
// 	Properties: &armcommunication.EmailServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		ProvisioningState: to.Ptr(armcommunication.EmailServicesProvisioningStateSucceeded),
// 	},
// }
Output:

func (*EmailServicesClient) BeginDelete

func (client *EmailServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, emailServiceName string, options *EmailServicesClientBeginDeleteOptions) (*runtime.Poller[EmailServicesClientDeleteResponse], error)

BeginDelete - Operation to delete a EmailService. 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.
  • emailServiceName - The name of the EmailService resource.
  • options - EmailServicesClientBeginDeleteOptions contains the optional parameters for the EmailServicesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/delete.json

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

func (*EmailServicesClient) BeginUpdate

func (client *EmailServicesClient) BeginUpdate(ctx context.Context, resourceGroupName string, emailServiceName string, parameters EmailServiceResourceUpdate, options *EmailServicesClientBeginUpdateOptions) (*runtime.Poller[EmailServicesClientUpdateResponse], error)

BeginUpdate - Operation to update an existing EmailService. 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.
  • emailServiceName - The name of the EmailService resource.
  • parameters - Parameters for the update operation
  • options - EmailServicesClientBeginUpdateOptions contains the optional parameters for the EmailServicesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewEmailServicesClient().BeginUpdate(ctx, "MyResourceGroup", "MyEmailServiceResource", armcommunication.EmailServiceResourceUpdate{
	Tags: map[string]*string{
		"newTag": to.Ptr("newVal"),
	},
}, 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.EmailServiceResource = armcommunication.EmailServiceResource{
// 	Name: to.Ptr("MyEmailServiceResource"),
// 	Type: to.Ptr("Microsoft.Communication/EmailServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource"),
// 	Location: to.Ptr("Global"),
// 	Tags: map[string]*string{
// 		"newTag": to.Ptr("newVal"),
// 	},
// 	Properties: &armcommunication.EmailServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		ProvisioningState: to.Ptr(armcommunication.EmailServicesProvisioningStateSucceeded),
// 	},
// }
Output:

func (*EmailServicesClient) Get

func (client *EmailServicesClient) Get(ctx context.Context, resourceGroupName string, emailServiceName string, options *EmailServicesClientGetOptions) (EmailServicesClientGetResponse, error)

Get - Get the EmailService and its properties. 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.
  • emailServiceName - The name of the EmailService resource.
  • options - EmailServicesClientGetOptions contains the optional parameters for the EmailServicesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEmailServicesClient().Get(ctx, "MyResourceGroup", "MyEmailServiceResource", 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.EmailServiceResource = armcommunication.EmailServiceResource{
// 	Name: to.Ptr("MyEmailServiceResource"),
// 	Type: to.Ptr("Microsoft.Communication/EmailServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource"),
// 	Location: to.Ptr("Global"),
// 	Properties: &armcommunication.EmailServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		ProvisioningState: to.Ptr(armcommunication.EmailServicesProvisioningStateSucceeded),
// 	},
// }
Output:

func (*EmailServicesClient) ListVerifiedExchangeOnlineDomains

ListVerifiedExchangeOnlineDomains - Get a list of domains that are fully verified in Exchange Online. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • options - EmailServicesClientListVerifiedExchangeOnlineDomainsOptions contains the optional parameters for the EmailServicesClient.ListVerifiedExchangeOnlineDomains method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/getVerifiedExchangeOnlineDomains.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewEmailServicesClient().ListVerifiedExchangeOnlineDomains(ctx, 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.StringArray = []*string{
// 	to.Ptr("example.com"),
// 	to.Ptr("contoso.com")}
Output:

func (*EmailServicesClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Handles requests to list all resources in a resource group.

Generated from API version 2023-04-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/listByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewEmailServicesClient().NewListByResourceGroupPager("MyResourceGroup", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.EmailServiceResourceList = armcommunication.EmailServiceResourceList{
	// 	Value: []*armcommunication.EmailServiceResource{
	// 		{
	// 			Name: to.Ptr("MyEmailServiceResource"),
	// 			Type: to.Ptr("Microsoft.Communication/EmailServices"),
	// 			ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource"),
	// 			Location: to.Ptr("Global"),
	// 			Properties: &armcommunication.EmailServiceProperties{
	// 				DataLocation: to.Ptr("United States"),
	// 				ProvisioningState: to.Ptr(armcommunication.EmailServicesProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

func (*EmailServicesClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Handles requests to list all resources in a subscription.

Generated from API version 2023-04-01

  • options - EmailServicesClientListBySubscriptionOptions contains the optional parameters for the EmailServicesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/emailServices/listBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewEmailServicesClient().NewListBySubscriptionPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.EmailServiceResourceList = armcommunication.EmailServiceResourceList{
	// 	Value: []*armcommunication.EmailServiceResource{
	// 		{
	// 			Name: to.Ptr("MyEmailServiceResource"),
	// 			Type: to.Ptr("Microsoft.Communication/EmailServices"),
	// 			ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/EmailServices/MyEmailServiceResource"),
	// 			Location: to.Ptr("Global"),
	// 			Properties: &armcommunication.EmailServiceProperties{
	// 				DataLocation: to.Ptr("United States"),
	// 				ProvisioningState: to.Ptr(armcommunication.EmailServicesProvisioningStateSucceeded),
	// 			},
	// 	}},
	// }
}
Output:

type EmailServicesClientBeginCreateOrUpdateOptions

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

EmailServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the EmailServicesClient.BeginCreateOrUpdate method.

type EmailServicesClientBeginDeleteOptions

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

EmailServicesClientBeginDeleteOptions contains the optional parameters for the EmailServicesClient.BeginDelete method.

type EmailServicesClientBeginUpdateOptions

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

EmailServicesClientBeginUpdateOptions contains the optional parameters for the EmailServicesClient.BeginUpdate method.

type EmailServicesClientCreateOrUpdateResponse

type EmailServicesClientCreateOrUpdateResponse struct {
	// A class representing an EmailService resource.
	EmailServiceResource
}

EmailServicesClientCreateOrUpdateResponse contains the response from method EmailServicesClient.BeginCreateOrUpdate.

type EmailServicesClientDeleteResponse

type EmailServicesClientDeleteResponse struct {
}

EmailServicesClientDeleteResponse contains the response from method EmailServicesClient.BeginDelete.

type EmailServicesClientGetOptions

type EmailServicesClientGetOptions struct {
}

EmailServicesClientGetOptions contains the optional parameters for the EmailServicesClient.Get method.

type EmailServicesClientGetResponse

type EmailServicesClientGetResponse struct {
	// A class representing an EmailService resource.
	EmailServiceResource
}

EmailServicesClientGetResponse contains the response from method EmailServicesClient.Get.

type EmailServicesClientListByResourceGroupOptions

type EmailServicesClientListByResourceGroupOptions struct {
}

EmailServicesClientListByResourceGroupOptions contains the optional parameters for the EmailServicesClient.NewListByResourceGroupPager method.

type EmailServicesClientListByResourceGroupResponse

type EmailServicesClientListByResourceGroupResponse struct {
	// Object that includes an array of EmailServices and a possible link for next set.
	EmailServiceResourceList
}

EmailServicesClientListByResourceGroupResponse contains the response from method EmailServicesClient.NewListByResourceGroupPager.

type EmailServicesClientListBySubscriptionOptions

type EmailServicesClientListBySubscriptionOptions struct {
}

EmailServicesClientListBySubscriptionOptions contains the optional parameters for the EmailServicesClient.NewListBySubscriptionPager method.

type EmailServicesClientListBySubscriptionResponse

type EmailServicesClientListBySubscriptionResponse struct {
	// Object that includes an array of EmailServices and a possible link for next set.
	EmailServiceResourceList
}

EmailServicesClientListBySubscriptionResponse contains the response from method EmailServicesClient.NewListBySubscriptionPager.

type EmailServicesClientListVerifiedExchangeOnlineDomainsOptions

type EmailServicesClientListVerifiedExchangeOnlineDomainsOptions struct {
}

EmailServicesClientListVerifiedExchangeOnlineDomainsOptions contains the optional parameters for the EmailServicesClient.ListVerifiedExchangeOnlineDomains method.

type EmailServicesClientListVerifiedExchangeOnlineDomainsResponse

type EmailServicesClientListVerifiedExchangeOnlineDomainsResponse struct {
	// List of FQDNs of verified domains in Exchange Online.
	StringArray []*string
}

EmailServicesClientListVerifiedExchangeOnlineDomainsResponse contains the response from method EmailServicesClient.ListVerifiedExchangeOnlineDomains.

type EmailServicesClientUpdateResponse

type EmailServicesClientUpdateResponse struct {
	// A class representing an EmailService resource.
	EmailServiceResource
}

EmailServicesClientUpdateResponse contains the response from method EmailServicesClient.BeginUpdate.

type EmailServicesProvisioningState

type EmailServicesProvisioningState string

EmailServicesProvisioningState - Provisioning state of the resource.

const (
	EmailServicesProvisioningStateCanceled  EmailServicesProvisioningState = "Canceled"
	EmailServicesProvisioningStateCreating  EmailServicesProvisioningState = "Creating"
	EmailServicesProvisioningStateDeleting  EmailServicesProvisioningState = "Deleting"
	EmailServicesProvisioningStateFailed    EmailServicesProvisioningState = "Failed"
	EmailServicesProvisioningStateMoving    EmailServicesProvisioningState = "Moving"
	EmailServicesProvisioningStateRunning   EmailServicesProvisioningState = "Running"
	EmailServicesProvisioningStateSucceeded EmailServicesProvisioningState = "Succeeded"
	EmailServicesProvisioningStateUnknown   EmailServicesProvisioningState = "Unknown"
	EmailServicesProvisioningStateUpdating  EmailServicesProvisioningState = "Updating"
)

func PossibleEmailServicesProvisioningStateValues

func PossibleEmailServicesProvisioningStateValues() []EmailServicesProvisioningState

PossibleEmailServicesProvisioningStateValues returns the possible values for the EmailServicesProvisioningState const type.

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

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

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

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

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

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

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

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type KeyType

type KeyType string

KeyType - The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive).

const (
	KeyTypePrimary   KeyType = "Primary"
	KeyTypeSecondary KeyType = "Secondary"
)

func PossibleKeyTypeValues

func PossibleKeyTypeValues() []KeyType

PossibleKeyTypeValues returns the possible values for the KeyType const type.

type LinkNotificationHubParameters

type LinkNotificationHubParameters struct {
	// REQUIRED; Connection string for the notification hub
	ConnectionString *string

	// REQUIRED; The resource ID of the notification hub
	ResourceID *string
}

LinkNotificationHubParameters - Description of an Azure Notification Hub to link to the communication service

func (LinkNotificationHubParameters) MarshalJSON

func (l LinkNotificationHubParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkNotificationHubParameters.

func (*LinkNotificationHubParameters) UnmarshalJSON

func (l *LinkNotificationHubParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkNotificationHubParameters.

type LinkedNotificationHub

type LinkedNotificationHub struct {
	// The resource ID of the notification hub
	ResourceID *string
}

LinkedNotificationHub - A notification hub that has been linked to the communication service

func (LinkedNotificationHub) MarshalJSON

func (l LinkedNotificationHub) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinkedNotificationHub.

func (*LinkedNotificationHub) UnmarshalJSON

func (l *LinkedNotificationHub) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinkedNotificationHub.

type ManagedServiceIdentity added in v2.2.0

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

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

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

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

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

func (ManagedServiceIdentity) MarshalJSON added in v2.2.0

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

MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity.

func (*ManagedServiceIdentity) UnmarshalJSON added in v2.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity.

type ManagedServiceIdentityType added in v2.2.0

type ManagedServiceIdentityType string

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

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

func PossibleManagedServiceIdentityTypeValues added in v2.2.0

func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType

PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type.

type NameAvailabilityParameters

type NameAvailabilityParameters struct {
	// The name of the resource for which availability needs to be checked.
	Name *string

	// The resource type.
	Type *string
}

NameAvailabilityParameters - Data POST-ed to the nameAvailability action

func (NameAvailabilityParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type NameAvailabilityParameters.

func (*NameAvailabilityParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type NameAvailabilityParameters.

type Operation

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

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

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

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

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

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

func (Operation) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Operation.

func (*Operation) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Operation.

type OperationDisplay

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

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

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

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

OperationDisplay - Localized display information for this particular operation.

func (OperationDisplay) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationListResult

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

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

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

func (OperationListResult) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationsClient

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

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

func NewOperationsClient

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

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

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

func (*OperationsClient) NewListPager

NewListPager - Lists all of the available REST API operations of the Microsoft.Communication provider.

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/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/operationsList.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.OperationListResult = armcommunication.OperationListResult{
	// 	Value: []*armcommunication.Operation{
	// 		{
	// 			Name: to.Ptr("<Action name>"),
	// 			Display: &armcommunication.OperationDisplay{
	// 				Description: to.Ptr("<Description>"),
	// 				Operation: to.Ptr("<Operation>"),
	// 				Provider: to.Ptr("<Provider name>"),
	// 				Resource: to.Ptr("<Resource name>"),
	// 			},
	// 			IsDataAction: to.Ptr(false),
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse

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

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type Origin

type Origin string

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

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

func PossibleOriginValues

func PossibleOriginValues() []Origin

PossibleOriginValues returns the possible values for the Origin const type.

type ProvisioningState

type ProvisioningState string

ProvisioningState - Provisioning state of the resource. Unknown is the default state for Communication Services.

const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateMoving    ProvisioningState = "Moving"
	ProvisioningStateRunning   ProvisioningState = "Running"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUnknown   ProvisioningState = "Unknown"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type ProxyResource

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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

func (ProxyResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type RegenerateKeyParameters

type RegenerateKeyParameters struct {
	// The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive).
	KeyType *KeyType
}

RegenerateKeyParameters - Parameters describes the request to regenerate access keys

func (RegenerateKeyParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type RegenerateKeyParameters.

func (*RegenerateKeyParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateKeyParameters.

type Resource

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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

func (Resource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type SenderUsernameProperties

type SenderUsernameProperties struct {
	// REQUIRED; A sender senderUsername to be used when sending emails.
	Username *string

	// The display name for the senderUsername.
	DisplayName *string

	// READ-ONLY; The location where the SenderUsername resource data is stored at rest.
	DataLocation *string

	// READ-ONLY; Provisioning state of the resource. Unknown is the default state for Communication Services.
	ProvisioningState *ProvisioningState
}

SenderUsernameProperties - A class that describes the properties of a SenderUsername resource.

func (SenderUsernameProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SenderUsernameProperties.

func (*SenderUsernameProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SenderUsernameProperties.

type SenderUsernameResource

type SenderUsernameResource struct {
	// The properties of a SenderUsername resource.
	Properties *SenderUsernameProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SenderUsernameResource - A class representing a SenderUsername resource.

func (SenderUsernameResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SenderUsernameResource.

func (*SenderUsernameResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SenderUsernameResource.

type SenderUsernameResourceCollection

type SenderUsernameResourceCollection struct {
	// The URL the client should use to fetch the next page (per server side paging).
	NextLink *string

	// List of SenderUsernames
	Value []*SenderUsernameResource
}

SenderUsernameResourceCollection - A class representing a Domains SenderUsernames collection.

func (SenderUsernameResourceCollection) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SenderUsernameResourceCollection.

func (*SenderUsernameResourceCollection) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SenderUsernameResourceCollection.

type SenderUsernamesClient

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

SenderUsernamesClient contains the methods for the SenderUsernames group. Don't use this type directly, use NewSenderUsernamesClient() instead.

func NewSenderUsernamesClient

func NewSenderUsernamesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SenderUsernamesClient, error)

NewSenderUsernamesClient creates a new instance of SenderUsernamesClient with the specified values.

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

func (*SenderUsernamesClient) CreateOrUpdate

func (client *SenderUsernamesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, senderUsername string, parameters SenderUsernameResource, options *SenderUsernamesClientCreateOrUpdateOptions) (SenderUsernamesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Add a new SenderUsername resource under the parent Domains resource or update an existing SenderUsername 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • senderUsername - The valid sender Username.
  • parameters - Parameters for the create or update operation
  • options - SenderUsernamesClientCreateOrUpdateOptions contains the optional parameters for the SenderUsernamesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/senderUsernames/createOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSenderUsernamesClient().CreateOrUpdate(ctx, "contosoResourceGroup", "contosoEmailService", "contoso.com", "contosoNewsAlerts", armcommunication.SenderUsernameResource{
	Properties: &armcommunication.SenderUsernameProperties{
		DisplayName: to.Ptr("Contoso News Alerts"),
		Username:    to.Ptr("contosoNewsAlerts"),
	},
}, 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.SenderUsernameResource = armcommunication.SenderUsernameResource{
// 	Name: to.Ptr("contoso.com"),
// 	Type: to.Ptr("Microsoft.Communication/EmailServices/Domains"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/contosoResourceGroup/providers/Microsoft.Communication/EmailServices/contosoEmailService/Domains/contoso.com/senderUsernames/contosoNewsAlerts"),
// 	Properties: &armcommunication.SenderUsernameProperties{
// 		DataLocation: to.Ptr("United States"),
// 		DisplayName: to.Ptr("Contoso News Alerts"),
// 		Username: to.Ptr("contosoNewsAlerts"),
// 	},
// }
Output:

func (*SenderUsernamesClient) Delete

func (client *SenderUsernamesClient) Delete(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, senderUsername string, options *SenderUsernamesClientDeleteOptions) (SenderUsernamesClientDeleteResponse, error)

Delete - Operation to delete a SenderUsernames 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • senderUsername - The valid sender Username.
  • options - SenderUsernamesClientDeleteOptions contains the optional parameters for the SenderUsernamesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/senderUsernames/delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewSenderUsernamesClient().Delete(ctx, "MyResourceGroup", "MyEmailServiceResource", "mydomain.com", "contosoNewsAlerts", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*SenderUsernamesClient) Get

func (client *SenderUsernamesClient) Get(ctx context.Context, resourceGroupName string, emailServiceName string, domainName string, senderUsername string, options *SenderUsernamesClientGetOptions) (SenderUsernamesClientGetResponse, error)

Get - Get a valid sender username for a domains 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.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • senderUsername - The valid sender Username.
  • options - SenderUsernamesClientGetOptions contains the optional parameters for the SenderUsernamesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/senderUsernames/get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewSenderUsernamesClient().Get(ctx, "contosoResourceGroup", "contosoEmailService", "contoso.com", "contosoNewsAlerts", 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.SenderUsernameResource = armcommunication.SenderUsernameResource{
// 	Name: to.Ptr("contoso.com"),
// 	Type: to.Ptr("Microsoft.Communication/EmailServices/Domains/SenderUsernames"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/contosoResourceGroup/providers/Microsoft.Communication/EmailServices/contosoEmailService/Domains/contoso.com/senderUsernames/contosoNewsAlerts"),
// 	Properties: &armcommunication.SenderUsernameProperties{
// 		DataLocation: to.Ptr("United States"),
// 		DisplayName: to.Ptr("Contoso News Alerts"),
// 		Username: to.Ptr("contosoNewsAlerts"),
// 	},
// }
Output:

func (*SenderUsernamesClient) NewListByDomainsPager

func (client *SenderUsernamesClient) NewListByDomainsPager(resourceGroupName string, emailServiceName string, domainName string, options *SenderUsernamesClientListByDomainsOptions) *runtime.Pager[SenderUsernamesClientListByDomainsResponse]

NewListByDomainsPager - List all valid sender usernames for a domains resource.

Generated from API version 2023-04-01

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • emailServiceName - The name of the EmailService resource.
  • domainName - The name of the Domains resource.
  • options - SenderUsernamesClientListByDomainsOptions contains the optional parameters for the SenderUsernamesClient.NewListByDomainsPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/senderUsernames/listByDomain.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewSenderUsernamesClient().NewListByDomainsPager("contosoResourceGroup", "contosoEmailService", "contoso.com", 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.SenderUsernameResourceCollection = armcommunication.SenderUsernameResourceCollection{
	// 	Value: []*armcommunication.SenderUsernameResource{
	// 		{
	// 			Name: to.Ptr("contosoNews"),
	// 			Type: to.Ptr("Microsoft.Communication/EmailServices/Domains/SenderUsernames"),
	// 			ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/contosoResourceGroup/providers/Microsoft.Communication/EmailServices/contosoEmailService/Domains/contoso.com/senderUsernames/contosoNews"),
	// 			Properties: &armcommunication.SenderUsernameProperties{
	// 				DataLocation: to.Ptr("United States"),
	// 				DisplayName: to.Ptr("Contoso News"),
	// 				Username: to.Ptr("contosoNews"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("contosoAlerts"),
	// 			Type: to.Ptr("Microsoft.Communication/EmailServices/Domains/SenderUsernames"),
	// 			ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/contosoResourceGroup/providers/Microsoft.Communication/EmailServices/contosoEmailService/Domains/contoso.com/senderUsernames/contosoAlerts"),
	// 			Properties: &armcommunication.SenderUsernameProperties{
	// 				DataLocation: to.Ptr("United States"),
	// 				DisplayName: to.Ptr("Contoso Alerts"),
	// 				Username: to.Ptr("contosoAlerts"),
	// 			},
	// 	}},
	// }
}
Output:

type SenderUsernamesClientCreateOrUpdateOptions

type SenderUsernamesClientCreateOrUpdateOptions struct {
}

SenderUsernamesClientCreateOrUpdateOptions contains the optional parameters for the SenderUsernamesClient.CreateOrUpdate method.

type SenderUsernamesClientCreateOrUpdateResponse

type SenderUsernamesClientCreateOrUpdateResponse struct {
	// A class representing a SenderUsername resource.
	SenderUsernameResource
}

SenderUsernamesClientCreateOrUpdateResponse contains the response from method SenderUsernamesClient.CreateOrUpdate.

type SenderUsernamesClientDeleteOptions

type SenderUsernamesClientDeleteOptions struct {
}

SenderUsernamesClientDeleteOptions contains the optional parameters for the SenderUsernamesClient.Delete method.

type SenderUsernamesClientDeleteResponse

type SenderUsernamesClientDeleteResponse struct {
}

SenderUsernamesClientDeleteResponse contains the response from method SenderUsernamesClient.Delete.

type SenderUsernamesClientGetOptions

type SenderUsernamesClientGetOptions struct {
}

SenderUsernamesClientGetOptions contains the optional parameters for the SenderUsernamesClient.Get method.

type SenderUsernamesClientGetResponse

type SenderUsernamesClientGetResponse struct {
	// A class representing a SenderUsername resource.
	SenderUsernameResource
}

SenderUsernamesClientGetResponse contains the response from method SenderUsernamesClient.Get.

type SenderUsernamesClientListByDomainsOptions

type SenderUsernamesClientListByDomainsOptions struct {
}

SenderUsernamesClientListByDomainsOptions contains the optional parameters for the SenderUsernamesClient.NewListByDomainsPager method.

type SenderUsernamesClientListByDomainsResponse

type SenderUsernamesClientListByDomainsResponse struct {
	// A class representing a Domains SenderUsernames collection.
	SenderUsernameResourceCollection
}

SenderUsernamesClientListByDomainsResponse contains the response from method SenderUsernamesClient.NewListByDomainsPager.

type ServiceKeys

type ServiceKeys struct {
	// CommunicationService connection string constructed via the primaryKey
	PrimaryConnectionString *string

	// The primary access key.
	PrimaryKey *string

	// CommunicationService connection string constructed via the secondaryKey
	SecondaryConnectionString *string

	// The secondary access key.
	SecondaryKey *string
}

ServiceKeys - A class representing the access keys of a CommunicationService.

func (ServiceKeys) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceKeys.

func (*ServiceKeys) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceKeys.

type ServiceProperties

type ServiceProperties struct {
	// REQUIRED; The location where the communication service stores its data at rest.
	DataLocation *string

	// List of email Domain resource Ids.
	LinkedDomains []*string

	// READ-ONLY; FQDN of the CommunicationService instance.
	HostName *string

	// READ-ONLY; The immutable resource Id of the communication service.
	ImmutableResourceID *string

	// READ-ONLY; Resource ID of an Azure Notification Hub linked to this resource.
	NotificationHubID *string

	// READ-ONLY; Provisioning state of the resource.
	ProvisioningState *CommunicationServicesProvisioningState

	// READ-ONLY; Version of the CommunicationService resource. Probably you need the same or higher version of client SDKs.
	Version *string
}

ServiceProperties - A class that describes the properties of the CommunicationService.

func (ServiceProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceProperties.

func (*ServiceProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceProperties.

type ServiceResource

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

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

	// The properties of the service.
	Properties *ServiceProperties

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

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ServiceResource - A class representing a CommunicationService resource.

func (ServiceResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceResource.

func (*ServiceResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResource.

type ServiceResourceList

type ServiceResourceList struct {
	// The URL the client should use to fetch the next page (per server side paging). It's null for now, added for future use.
	NextLink *string

	// List of CommunicationService
	Value []*ServiceResource
}

ServiceResourceList - Object that includes an array of CommunicationServices and a possible link for next set.

func (ServiceResourceList) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceResourceList.

func (*ServiceResourceList) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceList.

type ServiceResourceUpdate

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

	// The properties of the service.
	Properties *ServiceUpdateProperties

	// Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]*string
}

ServiceResourceUpdate - A class representing update parameters for CommunicationService resource.

func (ServiceResourceUpdate) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceResourceUpdate.

func (*ServiceResourceUpdate) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceResourceUpdate.

type ServiceUpdateProperties

type ServiceUpdateProperties struct {
	// List of email Domain resource Ids.
	LinkedDomains []*string
}

ServiceUpdateProperties - A class that describes the properties that can be updated for CommunicationService resource.

func (ServiceUpdateProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type ServiceUpdateProperties.

func (*ServiceUpdateProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceUpdateProperties.

type ServicesClient

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

ServicesClient contains the methods for the CommunicationServices group. Don't use this type directly, use NewServicesClient() instead.

func NewServicesClient

func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error)

NewServicesClient creates a new instance of ServicesClient with the specified values.

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

func (*ServicesClient) BeginCreateOrUpdate

func (client *ServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, communicationServiceName string, parameters ServiceResource, options *ServicesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServicesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create a new CommunicationService or update an existing CommunicationService. 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.
  • communicationServiceName - The name of the CommunicationService resource.
  • parameters - Parameters for the create or update operation
  • options - ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method.
Example (CreateOrUpdateResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/createOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "MyResourceGroup", "MyCommunicationResource", armcommunication.ServiceResource{
	Location: to.Ptr("Global"),
	Properties: &armcommunication.ServiceProperties{
		DataLocation: to.Ptr("United States"),
	},
}, 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.ServiceResource = armcommunication.ServiceResource{
// 	Name: to.Ptr("MyCommunicationResource"),
// 	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
// 	Location: to.Ptr("Global"),
// 	Identity: &armcommunication.ManagedServiceIdentity{
// 		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeNone),
// 	},
// 	Properties: &armcommunication.ServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		HostName: to.Ptr("mycommunicationresource.communications.azure.com"),
// 		ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
// 	},
// }
Output:

Example (CreateOrUpdateResourceWithManagedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/createOrUpdateWithSystemAssignedIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServicesClient().BeginCreateOrUpdate(ctx, "MyResourceGroup", "MyCommunicationResource", armcommunication.ServiceResource{
	Location: to.Ptr("Global"),
	Identity: &armcommunication.ManagedServiceIdentity{
		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeSystemAssigned),
	},
	Properties: &armcommunication.ServiceProperties{
		DataLocation: to.Ptr("United States"),
	},
}, 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.ServiceResource = armcommunication.ServiceResource{
// 	Name: to.Ptr("MyCommunicationResource"),
// 	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
// 	Location: to.Ptr("Global"),
// 	Identity: &armcommunication.ManagedServiceIdentity{
// 		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeSystemAssigned),
// 		PrincipalID: to.Ptr("11111111-1111-1111-1111-111111111111"),
// 		TenantID: to.Ptr("22222222-2222-2222-2222-222222222222"),
// 	},
// 	Properties: &armcommunication.ServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		HostName: to.Ptr("mycommunicationresource.communications.azure.com"),
// 		ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
// 	},
// }
Output:

func (*ServicesClient) BeginDelete

func (client *ServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, communicationServiceName string, options *ServicesClientBeginDeleteOptions) (*runtime.Poller[ServicesClientDeleteResponse], error)

BeginDelete - Operation to delete a CommunicationService. 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.
  • communicationServiceName - The name of the CommunicationService resource.
  • options - ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/delete.json

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

func (*ServicesClient) CheckNameAvailability

CheckNameAvailability - Checks that the CommunicationService name is valid and is not already in use. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-04-01

  • nameAvailabilityParameters - Parameters supplied to the operation.
  • options - ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability method.
Example (CheckNameAvailabilityAvailable)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/checkNameAvailabilityAvailable.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().CheckNameAvailability(ctx, armcommunication.NameAvailabilityParameters{
	Name: to.Ptr("MyCommunicationService"),
	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
}, 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.CheckNameAvailabilityResponse = armcommunication.CheckNameAvailabilityResponse{
// 	Message: to.Ptr("Requested name is available for the requested type"),
// 	NameAvailable: to.Ptr(true),
// 	Reason: to.Ptr(armcommunication.CheckNameAvailabilityReason("NameAvailable")),
// }
Output:

Example (CheckNameAvailabilityUnavailable)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/checkNameAvailabilityUnavailable.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().CheckNameAvailability(ctx, armcommunication.NameAvailabilityParameters{
	Name: to.Ptr("MyCommunicationService"),
	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
}, 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.CheckNameAvailabilityResponse = armcommunication.CheckNameAvailabilityResponse{
// 	Message: to.Ptr("Requested name is unavailable for the requested type"),
// 	NameAvailable: to.Ptr(false),
// 	Reason: to.Ptr(armcommunication.CheckNameAvailabilityReasonAlreadyExists),
// }
Output:

func (*ServicesClient) Get

func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, communicationServiceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error)

Get - Get the CommunicationService and its properties. 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.
  • communicationServiceName - The name of the CommunicationService resource.
  • options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().Get(ctx, "MyResourceGroup", "MyCommunicationResource", 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.ServiceResource = armcommunication.ServiceResource{
// 	Name: to.Ptr("MyCommunicationResource"),
// 	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
// 	Location: to.Ptr("Global"),
// 	Identity: &armcommunication.ManagedServiceIdentity{
// 		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeSystemAssigned),
// 		PrincipalID: to.Ptr("11111111-1111-1111-1111-111111111111"),
// 		TenantID: to.Ptr("22222222-2222-2222-2222-222222222222"),
// 	},
// 	Properties: &armcommunication.ServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		HostName: to.Ptr("mycommunicationservice.comms.azure.net"),
// 		ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
// 		Version: to.Ptr("0.2.0"),
// 	},
// }
Output:

func (*ServicesClient) LinkNotificationHub

func (client *ServicesClient) LinkNotificationHub(ctx context.Context, resourceGroupName string, communicationServiceName string, options *ServicesClientLinkNotificationHubOptions) (ServicesClientLinkNotificationHubResponse, error)

LinkNotificationHub - Links an Azure Notification Hub to this communication service. 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.
  • communicationServiceName - The name of the CommunicationService resource.
  • options - ServicesClientLinkNotificationHubOptions contains the optional parameters for the ServicesClient.LinkNotificationHub method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/linkNotificationHub.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().LinkNotificationHub(ctx, "MyResourceGroup", "MyCommunicationResource", &armcommunication.ServicesClientLinkNotificationHubOptions{LinkNotificationHubParameters: &armcommunication.LinkNotificationHubParameters{
	ConnectionString: to.Ptr("Endpoint=sb://MyNamespace.servicebus.windows.net/;SharedAccessKey=abcd1234"),
	ResourceID:       to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub"),
},
})
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.LinkedNotificationHub = armcommunication.LinkedNotificationHub{
// 	ResourceID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyOtherResourceGroup/providers/Microsoft.NotificationHubs/namespaces/MyNamespace/notificationHubs/MyHub"),
// }
Output:

func (*ServicesClient) ListKeys

func (client *ServicesClient) ListKeys(ctx context.Context, resourceGroupName string, communicationServiceName string, options *ServicesClientListKeysOptions) (ServicesClientListKeysResponse, error)

ListKeys - Get the access keys of the CommunicationService 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.
  • communicationServiceName - The name of the CommunicationService resource.
  • options - ServicesClientListKeysOptions contains the optional parameters for the ServicesClient.ListKeys method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/listKeys.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().ListKeys(ctx, "MyResourceGroup", "MyCommunicationResource", 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.ServiceKeys = armcommunication.ServiceKeys{
// 	PrimaryKey: to.Ptr("<primaryKey>"),
// 	SecondaryKey: to.Ptr("<secondaryKey>"),
// }
Output:

func (*ServicesClient) NewListByResourceGroupPager

func (client *ServicesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServicesClientListByResourceGroupOptions) *runtime.Pager[ServicesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Handles requests to list all resources in a resource group.

Generated from API version 2023-04-01

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/listByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServicesClient().NewListByResourceGroupPager("MyResourceGroup", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ServiceResourceList = armcommunication.ServiceResourceList{
	// 	Value: []*armcommunication.ServiceResource{
	// 		{
	// 			Name: to.Ptr("MyCommunicationResource"),
	// 			Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
	// 			ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
	// 			Location: to.Ptr("Global"),
	// 			Properties: &armcommunication.ServiceProperties{
	// 				DataLocation: to.Ptr("United States"),
	// 				HostName: to.Ptr("mycommunicationservice.comms.azure.net"),
	// 				ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
	// 				Version: to.Ptr("0.2.0"),
	// 			},
	// 	}},
	// }
}
Output:

func (*ServicesClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Handles requests to list all resources in a subscription.

Generated from API version 2023-04-01

  • options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/listBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewServicesClient().NewListBySubscriptionPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ServiceResourceList = armcommunication.ServiceResourceList{
	// 	Value: []*armcommunication.ServiceResource{
	// 		{
	// 			Name: to.Ptr("MyCommunicationResource"),
	// 			Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
	// 			ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
	// 			Location: to.Ptr("Global"),
	// 			Properties: &armcommunication.ServiceProperties{
	// 				DataLocation: to.Ptr("United States"),
	// 				HostName: to.Ptr("mycommunicationservice.comms.azure.net"),
	// 				ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
	// 				Version: to.Ptr("0.2.0"),
	// 			},
	// 	}},
	// }
}
Output:

func (*ServicesClient) RegenerateKey

func (client *ServicesClient) RegenerateKey(ctx context.Context, resourceGroupName string, communicationServiceName string, parameters RegenerateKeyParameters, options *ServicesClientRegenerateKeyOptions) (ServicesClientRegenerateKeyResponse, error)

RegenerateKey - Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. 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.
  • communicationServiceName - The name of the CommunicationService resource.
  • parameters - Parameter that describes the Regenerate Key Operation.
  • options - ServicesClientRegenerateKeyOptions contains the optional parameters for the ServicesClient.RegenerateKey method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/regenerateKey.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().RegenerateKey(ctx, "MyResourceGroup", "MyCommunicationResource", armcommunication.RegenerateKeyParameters{
	KeyType: to.Ptr(armcommunication.KeyTypePrimary),
}, 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.ServiceKeys = armcommunication.ServiceKeys{
// 	PrimaryConnectionString: to.Ptr("endpoint=http://example.com;accesskey=1234"),
// 	PrimaryKey: to.Ptr("1234"),
// }
Output:

func (*ServicesClient) Update

func (client *ServicesClient) Update(ctx context.Context, resourceGroupName string, communicationServiceName string, parameters ServiceResourceUpdate, options *ServicesClientUpdateOptions) (ServicesClientUpdateResponse, error)

Update - Operation to update an existing CommunicationService. 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.
  • communicationServiceName - The name of the CommunicationService resource.
  • parameters - Parameters for the update operation
  • options - ServicesClientUpdateOptions contains the optional parameters for the ServicesClient.Update method.
Example (UpdateResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().Update(ctx, "MyResourceGroup", "MyCommunicationResource", armcommunication.ServiceResourceUpdate{
	Tags: map[string]*string{
		"newTag": to.Ptr("newVal"),
	},
}, 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.ServiceResource = armcommunication.ServiceResource{
// 	Name: to.Ptr("MyCommunicationResource"),
// 	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
// 	Location: to.Ptr("Global"),
// 	Tags: map[string]*string{
// 		"newTag": to.Ptr("newVal"),
// 	},
// 	Identity: &armcommunication.ManagedServiceIdentity{
// 		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeNone),
// 	},
// 	Properties: &armcommunication.ServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		HostName: to.Ptr("mycommunicationresource.communications.azure.com"),
// 		ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
// 		Version: to.Ptr("0.2.0"),
// 	},
// }
Output:

Example (UpdateResourceToAddASystemAssignedManagedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/updateWithSystemAssignedIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().Update(ctx, "MyResourceGroup", "MyCommunicationResource", armcommunication.ServiceResourceUpdate{
	Tags: map[string]*string{
		"newTag": to.Ptr("newVal"),
	},
	Identity: &armcommunication.ManagedServiceIdentity{
		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeSystemAssigned),
	},
}, 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.ServiceResource = armcommunication.ServiceResource{
// 	Name: to.Ptr("MyCommunicationResource"),
// 	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
// 	Location: to.Ptr("Global"),
// 	Tags: map[string]*string{
// 		"newTag": to.Ptr("newVal"),
// 	},
// 	Identity: &armcommunication.ManagedServiceIdentity{
// 		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeSystemAssigned),
// 		PrincipalID: to.Ptr("11111111-1111-1111-1111-111111111111"),
// 		TenantID: to.Ptr("22222222-2222-2222-2222-222222222222"),
// 	},
// 	Properties: &armcommunication.ServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		HostName: to.Ptr("mycommunicationresource.communications.azure.com"),
// 		ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
// 		Version: to.Ptr("0.2.0"),
// 	},
// }
Output:

Example (UpdateResourceToAddAUserAssignedManagedIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/updateWithUserAssignedIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().Update(ctx, "MyResourceGroup", "MyCommunicationResource", armcommunication.ServiceResourceUpdate{
	Tags: map[string]*string{
		"newTag": to.Ptr("newVal"),
	},
	Identity: &armcommunication.ManagedServiceIdentity{
		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeUserAssigned),
		UserAssignedIdentities: map[string]*armcommunication.UserAssignedIdentity{
			"/user/assigned/resource/id": {},
		},
	},
}, 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.ServiceResource = armcommunication.ServiceResource{
// 	Name: to.Ptr("MyCommunicationResource"),
// 	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
// 	Location: to.Ptr("Global"),
// 	Tags: map[string]*string{
// 		"newTag": to.Ptr("newVal"),
// 	},
// 	Identity: &armcommunication.ManagedServiceIdentity{
// 		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeUserAssigned),
// 		UserAssignedIdentities: map[string]*armcommunication.UserAssignedIdentity{
// 			"/user/assigned/resource/id": &armcommunication.UserAssignedIdentity{
// 				ClientID: to.Ptr("11112222-3333-4444-5555-666677778888"),
// 				PrincipalID: to.Ptr("11112222-3333-4444-5555-666677778888"),
// 			},
// 		},
// 	},
// 	Properties: &armcommunication.ServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		HostName: to.Ptr("mycommunicationresource.communications.azure.com"),
// 		ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
// 		Version: to.Ptr("0.2.0"),
// 	},
// }
Output:

Example (UpdateResourceToAddSystemAndUserManagedIdentities)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/updateWithSystemAndUserIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().Update(ctx, "MyResourceGroup", "MyCommunicationResource", armcommunication.ServiceResourceUpdate{
	Tags: map[string]*string{
		"newTag": to.Ptr("newVal"),
	},
	Identity: &armcommunication.ManagedServiceIdentity{
		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
		UserAssignedIdentities: map[string]*armcommunication.UserAssignedIdentity{
			"/user/assigned/resource/id": {},
		},
	},
}, 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.ServiceResource = armcommunication.ServiceResource{
// 	Name: to.Ptr("MyCommunicationResource"),
// 	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
// 	Location: to.Ptr("Global"),
// 	Tags: map[string]*string{
// 		"newTag": to.Ptr("newVal"),
// 	},
// 	Identity: &armcommunication.ManagedServiceIdentity{
// 		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
// 		PrincipalID: to.Ptr("11111111-1111-1111-1111-111111111111"),
// 		TenantID: to.Ptr("22222222-2222-2222-2222-222222222222"),
// 		UserAssignedIdentities: map[string]*armcommunication.UserAssignedIdentity{
// 			"/user/assigned/resource/id": &armcommunication.UserAssignedIdentity{
// 				ClientID: to.Ptr("11112222-3333-4444-5555-666677778888"),
// 				PrincipalID: to.Ptr("11112222-3333-4444-5555-666677778888"),
// 			},
// 		},
// 	},
// 	Properties: &armcommunication.ServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		HostName: to.Ptr("mycommunicationresource.communications.azure.com"),
// 		ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
// 		Version: to.Ptr("0.2.0"),
// 	},
// }
Output:

Example (UpdateResourceToRemoveIdentity)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/cf5ad1932d00c7d15497705ad6b71171d3d68b1e/specification/communication/resource-manager/Microsoft.Communication/stable/2023-04-01/examples/communicationServices/updateRemoveSystemIdentity.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcommunication.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewServicesClient().Update(ctx, "MyResourceGroup", "MyCommunicationResource", armcommunication.ServiceResourceUpdate{
	Tags: map[string]*string{
		"newTag": to.Ptr("newVal"),
	},
	Identity: &armcommunication.ManagedServiceIdentity{
		Type: to.Ptr(armcommunication.ManagedServiceIdentityTypeNone),
	},
}, 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.ServiceResource = armcommunication.ServiceResource{
// 	Name: to.Ptr("MyCommunicationResource"),
// 	Type: to.Ptr("Microsoft.Communication/CommunicationServices"),
// 	ID: to.Ptr("/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource"),
// 	Location: to.Ptr("Global"),
// 	Tags: map[string]*string{
// 		"newTag": to.Ptr("newVal"),
// 	},
// 	Properties: &armcommunication.ServiceProperties{
// 		DataLocation: to.Ptr("United States"),
// 		HostName: to.Ptr("mycommunicationresource.communication.azure.com"),
// 		ProvisioningState: to.Ptr(armcommunication.CommunicationServicesProvisioningStateSucceeded),
// 	},
// }
Output:

type ServicesClientBeginCreateOrUpdateOptions

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

ServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServicesClient.BeginCreateOrUpdate method.

type ServicesClientBeginDeleteOptions

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

ServicesClientBeginDeleteOptions contains the optional parameters for the ServicesClient.BeginDelete method.

type ServicesClientCheckNameAvailabilityOptions

type ServicesClientCheckNameAvailabilityOptions struct {
}

ServicesClientCheckNameAvailabilityOptions contains the optional parameters for the ServicesClient.CheckNameAvailability method.

type ServicesClientCheckNameAvailabilityResponse

type ServicesClientCheckNameAvailabilityResponse struct {
	// The check availability result.
	CheckNameAvailabilityResponse
}

ServicesClientCheckNameAvailabilityResponse contains the response from method ServicesClient.CheckNameAvailability.

type ServicesClientCreateOrUpdateResponse

type ServicesClientCreateOrUpdateResponse struct {
	// A class representing a CommunicationService resource.
	ServiceResource
}

ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.BeginCreateOrUpdate.

type ServicesClientDeleteResponse

type ServicesClientDeleteResponse struct {
}

ServicesClientDeleteResponse contains the response from method ServicesClient.BeginDelete.

type ServicesClientGetOptions

type ServicesClientGetOptions struct {
}

ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.

type ServicesClientGetResponse

type ServicesClientGetResponse struct {
	// A class representing a CommunicationService resource.
	ServiceResource
}

ServicesClientGetResponse contains the response from method ServicesClient.Get.

type ServicesClientLinkNotificationHubOptions

type ServicesClientLinkNotificationHubOptions struct {
	// Parameters supplied to the operation.
	LinkNotificationHubParameters *LinkNotificationHubParameters
}

ServicesClientLinkNotificationHubOptions contains the optional parameters for the ServicesClient.LinkNotificationHub method.

type ServicesClientLinkNotificationHubResponse

type ServicesClientLinkNotificationHubResponse struct {
	// A notification hub that has been linked to the communication service
	LinkedNotificationHub
}

ServicesClientLinkNotificationHubResponse contains the response from method ServicesClient.LinkNotificationHub.

type ServicesClientListByResourceGroupOptions

type ServicesClientListByResourceGroupOptions struct {
}

ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.NewListByResourceGroupPager method.

type ServicesClientListByResourceGroupResponse

type ServicesClientListByResourceGroupResponse struct {
	// Object that includes an array of CommunicationServices and a possible link for next set.
	ServiceResourceList
}

ServicesClientListByResourceGroupResponse contains the response from method ServicesClient.NewListByResourceGroupPager.

type ServicesClientListBySubscriptionOptions

type ServicesClientListBySubscriptionOptions struct {
}

ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.NewListBySubscriptionPager method.

type ServicesClientListBySubscriptionResponse

type ServicesClientListBySubscriptionResponse struct {
	// Object that includes an array of CommunicationServices and a possible link for next set.
	ServiceResourceList
}

ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.NewListBySubscriptionPager.

type ServicesClientListKeysOptions

type ServicesClientListKeysOptions struct {
}

ServicesClientListKeysOptions contains the optional parameters for the ServicesClient.ListKeys method.

type ServicesClientListKeysResponse

type ServicesClientListKeysResponse struct {
	// A class representing the access keys of a CommunicationService.
	ServiceKeys
}

ServicesClientListKeysResponse contains the response from method ServicesClient.ListKeys.

type ServicesClientRegenerateKeyOptions

type ServicesClientRegenerateKeyOptions struct {
}

ServicesClientRegenerateKeyOptions contains the optional parameters for the ServicesClient.RegenerateKey method.

type ServicesClientRegenerateKeyResponse

type ServicesClientRegenerateKeyResponse struct {
	// A class representing the access keys of a CommunicationService.
	ServiceKeys
}

ServicesClientRegenerateKeyResponse contains the response from method ServicesClient.RegenerateKey.

type ServicesClientUpdateOptions

type ServicesClientUpdateOptions struct {
}

ServicesClientUpdateOptions contains the optional parameters for the ServicesClient.Update method.

type ServicesClientUpdateResponse

type ServicesClientUpdateResponse struct {
	// A class representing a CommunicationService resource.
	ServiceResource
}

ServicesClientUpdateResponse contains the response from method ServicesClient.Update.

type SystemData

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

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

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

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TaggedResource

type TaggedResource struct {
	// Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]*string
}

TaggedResource - An ARM resource with that can accept tags

func (TaggedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TaggedResource.

func (*TaggedResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TaggedResource.

type TrackedResource

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

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

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

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

func (TrackedResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

type UpdateDomainProperties

type UpdateDomainProperties struct {
	// Describes whether user engagement tracking is enabled or disabled.
	UserEngagementTracking *UserEngagementTracking
}

UpdateDomainProperties - A class that describes the updatable properties of a Domains resource.

func (UpdateDomainProperties) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UpdateDomainProperties.

func (*UpdateDomainProperties) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateDomainProperties.

type UpdateDomainRequestParameters

type UpdateDomainRequestParameters struct {
	// A class that describes the updatable properties of a Domains resource.
	Properties *UpdateDomainProperties

	// Tags of the service which is a list of key value pairs that describe the resource.
	Tags map[string]*string
}

UpdateDomainRequestParameters - A class that describes the PATCH request parameters of a Domains resource.

func (UpdateDomainRequestParameters) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type UpdateDomainRequestParameters.

func (*UpdateDomainRequestParameters) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type UpdateDomainRequestParameters.

type UserAssignedIdentity added in v2.2.0

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

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

UserAssignedIdentity - User assigned identity properties

func (UserAssignedIdentity) MarshalJSON added in v2.2.0

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

MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity.

func (*UserAssignedIdentity) UnmarshalJSON added in v2.2.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity.

type UserEngagementTracking

type UserEngagementTracking string

UserEngagementTracking - Describes whether user engagement tracking is enabled or disabled.

const (
	UserEngagementTrackingDisabled UserEngagementTracking = "Disabled"
	UserEngagementTrackingEnabled  UserEngagementTracking = "Enabled"
)

func PossibleUserEngagementTrackingValues

func PossibleUserEngagementTrackingValues() []UserEngagementTracking

PossibleUserEngagementTrackingValues returns the possible values for the UserEngagementTracking const type.

type VerificationParameter

type VerificationParameter struct {
	// REQUIRED; Type of verification.
	VerificationType *VerificationType
}

VerificationParameter - Input parameter for verification APIs

func (VerificationParameter) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VerificationParameter.

func (*VerificationParameter) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VerificationParameter.

type VerificationStatus

type VerificationStatus string

VerificationStatus - Status of the verification operation.

const (
	VerificationStatusCancellationRequested  VerificationStatus = "CancellationRequested"
	VerificationStatusNotStarted             VerificationStatus = "NotStarted"
	VerificationStatusVerificationFailed     VerificationStatus = "VerificationFailed"
	VerificationStatusVerificationInProgress VerificationStatus = "VerificationInProgress"
	VerificationStatusVerificationRequested  VerificationStatus = "VerificationRequested"
	VerificationStatusVerified               VerificationStatus = "Verified"
)

func PossibleVerificationStatusValues

func PossibleVerificationStatusValues() []VerificationStatus

PossibleVerificationStatusValues returns the possible values for the VerificationStatus const type.

type VerificationStatusRecord

type VerificationStatusRecord struct {
	// READ-ONLY; Error code. This property will only be present if the status is UnableToVerify.
	ErrorCode *string

	// READ-ONLY; Status of the verification operation.
	Status *VerificationStatus
}

VerificationStatusRecord - A class that represents a VerificationStatus record.

func (VerificationStatusRecord) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type VerificationStatusRecord.

func (*VerificationStatusRecord) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaller interface for type VerificationStatusRecord.

type VerificationType

type VerificationType string

VerificationType - Type of verification.

const (
	VerificationTypeDKIM   VerificationType = "DKIM"
	VerificationTypeDKIM2  VerificationType = "DKIM2"
	VerificationTypeDMARC  VerificationType = "DMARC"
	VerificationTypeDomain VerificationType = "Domain"
	VerificationTypeSPF    VerificationType = "SPF"
)

func PossibleVerificationTypeValues

func PossibleVerificationTypeValues() []VerificationType

PossibleVerificationTypeValues returns the possible values for the VerificationType const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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