Documentation
¶
Index ¶
- type AccessRights
- type AdmCredential
- type AdmCredentialProperties
- type ApnsCredential
- type ApnsCredentialProperties
- type Availability
- type BaiduCredential
- type BaiduCredentialProperties
- type BrowserCredential
- type BrowserCredentialProperties
- type CheckAvailabilityParameters
- type CheckAvailabilityResult
- type Client
- func (client *Client) CheckNotificationHubAvailability(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientCheckNotificationHubAvailabilityResponse, error)
- func (client *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientCreateOrUpdateResponse, error)
- func (client *Client) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientCreateOrUpdateAuthorizationRuleResponse, error)
- func (client *Client) DebugSend(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientDebugSendResponse, error)
- func (client *Client) Delete(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientDeleteResponse, error)
- func (client *Client) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientDeleteAuthorizationRuleResponse, error)
- func (client *Client) Get(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientGetResponse, error)
- func (client *Client) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientGetAuthorizationRuleResponse, error)
- func (client *Client) GetPnsCredentials(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientGetPnsCredentialsResponse, error)
- func (client *Client) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientListKeysResponse, error)
- func (client *Client) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, notificationHubName string, ...) *runtime.Pager[ClientListAuthorizationRulesResponse]
- func (client *Client) NewListPager(resourceGroupName string, namespaceName string, options *ClientListOptions) *runtime.Pager[ClientListResponse]
- func (client *Client) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientRegenerateKeysResponse, error)
- func (client *Client) Update(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientUpdateResponse, error)
- type ClientCheckNotificationHubAvailabilityOptions
- type ClientCheckNotificationHubAvailabilityResponse
- type ClientCreateOrUpdateAuthorizationRuleOptions
- type ClientCreateOrUpdateAuthorizationRuleResponse
- type ClientCreateOrUpdateOptions
- type ClientCreateOrUpdateResponse
- type ClientDebugSendOptions
- type ClientDebugSendResponse
- type ClientDeleteAuthorizationRuleOptions
- type ClientDeleteAuthorizationRuleResponse
- type ClientDeleteOptions
- type ClientDeleteResponse
- type ClientFactory
- type ClientGetAuthorizationRuleOptions
- type ClientGetAuthorizationRuleResponse
- type ClientGetOptions
- type ClientGetPnsCredentialsOptions
- type ClientGetPnsCredentialsResponse
- type ClientGetResponse
- type ClientListAuthorizationRulesOptions
- type ClientListAuthorizationRulesResponse
- type ClientListKeysOptions
- type ClientListKeysResponse
- type ClientListOptions
- type ClientListResponse
- type ClientRegenerateKeysOptions
- type ClientRegenerateKeysResponse
- type ClientUpdateOptions
- type ClientUpdateResponse
- type ConnectionDetails
- type CreatedByType
- type DebugSendResponse
- type DebugSendResult
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- type FcmV1Credential
- type FcmV1CredentialProperties
- type GCMCredential
- type GCMCredentialProperties
- type GroupConnectivityInformation
- type IPRule
- type LogSpecification
- type MetricSpecification
- type MpnsCredential
- type MpnsCredentialProperties
- type NamespaceListResult
- type NamespacePatchParameters
- type NamespaceProperties
- type NamespaceResource
- type NamespaceStatus
- type NamespaceType
- type NamespacesClient
- func (client *NamespacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, ...) (*runtime.Poller[NamespacesClientCreateOrUpdateResponse], error)
- func (client *NamespacesClient) CheckAvailability(ctx context.Context, parameters CheckAvailabilityParameters, ...) (NamespacesClientCheckAvailabilityResponse, error)
- func (client *NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientCreateOrUpdateAuthorizationRuleResponse, error)
- func (client *NamespacesClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientDeleteResponse, error)
- func (client *NamespacesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientDeleteAuthorizationRuleResponse, error)
- func (client *NamespacesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientGetResponse, error)
- func (client *NamespacesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientGetAuthorizationRuleResponse, error)
- func (client *NamespacesClient) GetPnsCredentials(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientGetPnsCredentialsResponse, error)
- func (client *NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientListKeysResponse, error)
- func (client *NamespacesClient) NewListAllPager(options *NamespacesClientListAllOptions) *runtime.Pager[NamespacesClientListAllResponse]
- func (client *NamespacesClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, ...) *runtime.Pager[NamespacesClientListAuthorizationRulesResponse]
- func (client *NamespacesClient) NewListPager(resourceGroupName string, options *NamespacesClientListOptions) *runtime.Pager[NamespacesClientListResponse]
- func (client *NamespacesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientRegenerateKeysResponse, error)
- func (client *NamespacesClient) Update(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientUpdateResponse, error)
- type NamespacesClientBeginCreateOrUpdateOptions
- type NamespacesClientCheckAvailabilityOptions
- type NamespacesClientCheckAvailabilityResponse
- type NamespacesClientCreateOrUpdateAuthorizationRuleOptions
- type NamespacesClientCreateOrUpdateAuthorizationRuleResponse
- type NamespacesClientCreateOrUpdateResponse
- type NamespacesClientDeleteAuthorizationRuleOptions
- type NamespacesClientDeleteAuthorizationRuleResponse
- type NamespacesClientDeleteOptions
- type NamespacesClientDeleteResponse
- type NamespacesClientGetAuthorizationRuleOptions
- type NamespacesClientGetAuthorizationRuleResponse
- type NamespacesClientGetOptions
- type NamespacesClientGetPnsCredentialsOptions
- type NamespacesClientGetPnsCredentialsResponse
- type NamespacesClientGetResponse
- type NamespacesClientListAllOptions
- type NamespacesClientListAllResponse
- type NamespacesClientListAuthorizationRulesOptions
- type NamespacesClientListAuthorizationRulesResponse
- type NamespacesClientListKeysOptions
- type NamespacesClientListKeysResponse
- type NamespacesClientListOptions
- type NamespacesClientListResponse
- type NamespacesClientRegenerateKeysOptions
- type NamespacesClientRegenerateKeysResponse
- type NamespacesClientUpdateOptions
- type NamespacesClientUpdateResponse
- type NetworkACLs
- type NotificationHubListResult
- type NotificationHubPatchParameters
- type NotificationHubProperties
- type NotificationHubResource
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationProperties
- type OperationProvisioningState
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PnsCredentials
- type PnsCredentialsResource
- type PolicyKeyResource
- type PolicyKeyType
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionProvisioningState
- type PrivateEndpointConnectionResource
- type PrivateEndpointConnectionResourceListResult
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, namespaceName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientUpdateResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) GetGroupID(ctx context.Context, resourceGroupName string, namespaceName string, ...) (PrivateEndpointConnectionsClientGetGroupIDResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListGroupIDsPager(resourceGroupName string, namespaceName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListGroupIDsResponse]
- func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, namespaceName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListResponse]
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientBeginUpdateOptions
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetGroupIDOptions
- type PrivateEndpointConnectionsClientGetGroupIDResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListGroupIDsOptions
- type PrivateEndpointConnectionsClientListGroupIDsResponse
- type PrivateEndpointConnectionsClientListOptions
- type PrivateEndpointConnectionsClientListResponse
- type PrivateEndpointConnectionsClientUpdateResponse
- type PrivateLinkConnectionStatus
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkServiceConnection
- type ProxyResource
- type PublicInternetAuthorizationRule
- type PublicNetworkAccess
- type RegistrationResult
- type RemotePrivateEndpointConnection
- type RemotePrivateLinkServiceConnectionState
- type ReplicationRegion
- type Resource
- type ResourceListKeys
- type SKU
- type SKUName
- type ServiceSpecification
- type SharedAccessAuthorizationRuleListResult
- type SharedAccessAuthorizationRuleProperties
- type SharedAccessAuthorizationRuleResource
- type SystemData
- type TrackedResource
- type WnsCredential
- type WnsCredentialProperties
- type XiaomiCredential
- type XiaomiCredentialProperties
- type ZoneRedundancyPreference
Examples ¶
- Client.CheckNotificationHubAvailability
- Client.CreateOrUpdate
- Client.CreateOrUpdateAuthorizationRule
- Client.DebugSend
- Client.Delete
- Client.DeleteAuthorizationRule
- Client.Get
- Client.GetAuthorizationRule
- Client.GetPnsCredentials
- Client.ListKeys
- Client.NewListAuthorizationRulesPager
- Client.NewListPager
- Client.RegenerateKeys
- Client.Update
- NamespacesClient.BeginCreateOrUpdate
- NamespacesClient.CheckAvailability
- NamespacesClient.CreateOrUpdateAuthorizationRule
- NamespacesClient.Delete
- NamespacesClient.DeleteAuthorizationRule
- NamespacesClient.Get
- NamespacesClient.GetAuthorizationRule
- NamespacesClient.GetPnsCredentials
- NamespacesClient.ListKeys
- NamespacesClient.NewListAllPager
- NamespacesClient.NewListAuthorizationRulesPager
- NamespacesClient.NewListPager
- NamespacesClient.RegenerateKeys
- NamespacesClient.Update
- OperationsClient.NewListPager
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.BeginUpdate
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.GetGroupID
- PrivateEndpointConnectionsClient.NewListGroupIDsPager
- PrivateEndpointConnectionsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRights ¶
type AccessRights string
AccessRights - Defines values for AccessRights.
const ( AccessRightsListen AccessRights = "Listen" AccessRightsManage AccessRights = "Manage" AccessRightsSend AccessRights = "Send" )
func PossibleAccessRightsValues ¶
func PossibleAccessRightsValues() []AccessRights
PossibleAccessRightsValues returns the possible values for the AccessRights const type.
type AdmCredential ¶
type AdmCredential struct { // REQUIRED; Description of a NotificationHub AdmCredential. Properties *AdmCredentialProperties }
AdmCredential - Description of a NotificationHub AdmCredential.
func (AdmCredential) MarshalJSON ¶
func (a AdmCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdmCredential.
func (*AdmCredential) UnmarshalJSON ¶
func (a *AdmCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdmCredential.
type AdmCredentialProperties ¶
type AdmCredentialProperties struct { // REQUIRED; Gets or sets the URL of the authorization token. AuthTokenURL *string // REQUIRED; Gets or sets the client identifier. ClientID *string // REQUIRED; Gets or sets the credential secret access key. ClientSecret *string }
AdmCredentialProperties - Description of a NotificationHub AdmCredential.
func (AdmCredentialProperties) MarshalJSON ¶
func (a AdmCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdmCredentialProperties.
func (*AdmCredentialProperties) UnmarshalJSON ¶
func (a *AdmCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdmCredentialProperties.
type ApnsCredential ¶
type ApnsCredential struct { // REQUIRED; Description of a NotificationHub ApnsCredential. Properties *ApnsCredentialProperties }
ApnsCredential - Description of a NotificationHub ApnsCredential.
func (ApnsCredential) MarshalJSON ¶
func (a ApnsCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApnsCredential.
func (*ApnsCredential) UnmarshalJSON ¶
func (a *ApnsCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApnsCredential.
type ApnsCredentialProperties ¶
type ApnsCredentialProperties struct { // REQUIRED; Gets or sets the endpoint of this credential. Endpoint *string // Gets or sets the APNS certificate. ApnsCertificate *string // Gets or sets the issuer (iss) registered claim key, whose value is your 10-character Team ID, obtained from your developer // account AppID *string // Gets or sets the name of the application AppName *string // Gets or sets the certificate key. CertificateKey *string // Gets or sets a 10-character key identifier (kid) key, obtained from your developer account KeyID *string // Gets or sets the APNS certificate Thumbprint Thumbprint *string // Gets or sets provider Authentication Token, obtained through your developer account Token *string }
ApnsCredentialProperties - Description of a NotificationHub ApnsCredential.
func (ApnsCredentialProperties) MarshalJSON ¶
func (a ApnsCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApnsCredentialProperties.
func (*ApnsCredentialProperties) UnmarshalJSON ¶
func (a *ApnsCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApnsCredentialProperties.
type Availability ¶
type Availability struct { // READ-ONLY; Duration of the availability blob. BlobDuration *string // READ-ONLY; Time grain of the availability. TimeGrain *string }
Availability - Represents metric availability (part of RP operation descriptions).
func (Availability) MarshalJSON ¶
func (a Availability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Availability.
func (*Availability) UnmarshalJSON ¶
func (a *Availability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Availability.
type BaiduCredential ¶
type BaiduCredential struct { // REQUIRED; Description of a NotificationHub BaiduCredential. Properties *BaiduCredentialProperties }
BaiduCredential - Description of a NotificationHub BaiduCredential.
func (BaiduCredential) MarshalJSON ¶
func (b BaiduCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BaiduCredential.
func (*BaiduCredential) UnmarshalJSON ¶
func (b *BaiduCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BaiduCredential.
type BaiduCredentialProperties ¶
type BaiduCredentialProperties struct { // REQUIRED; Gets or sets baidu Api Key. BaiduAPIKey *string // REQUIRED; Gets or sets baidu Endpoint. BaiduEndPoint *string // REQUIRED; Gets or sets baidu Secret Key BaiduSecretKey *string }
BaiduCredentialProperties - Description of a NotificationHub BaiduCredential.
func (BaiduCredentialProperties) MarshalJSON ¶
func (b BaiduCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BaiduCredentialProperties.
func (*BaiduCredentialProperties) UnmarshalJSON ¶
func (b *BaiduCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BaiduCredentialProperties.
type BrowserCredential ¶
type BrowserCredential struct { // REQUIRED; Description of a NotificationHub BrowserCredential. Properties *BrowserCredentialProperties }
BrowserCredential - Description of a NotificationHub BrowserCredential.
func (BrowserCredential) MarshalJSON ¶
func (b BrowserCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BrowserCredential.
func (*BrowserCredential) UnmarshalJSON ¶
func (b *BrowserCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BrowserCredential.
type BrowserCredentialProperties ¶
type BrowserCredentialProperties struct { // REQUIRED; Gets or sets web push subject. Subject *string // REQUIRED; Gets or sets VAPID private key. VapidPrivateKey *string // REQUIRED; Gets or sets VAPID public key. VapidPublicKey *string }
BrowserCredentialProperties - Description of a NotificationHub BrowserCredential.
func (BrowserCredentialProperties) MarshalJSON ¶
func (b BrowserCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BrowserCredentialProperties.
func (*BrowserCredentialProperties) UnmarshalJSON ¶
func (b *BrowserCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BrowserCredentialProperties.
type CheckAvailabilityParameters ¶
type CheckAvailabilityParameters struct { // REQUIRED; Gets or sets resource name Name *string // Not used and deprecated since API version 2023-01-01-preview IsAvailiable *bool // Gets or sets resource location Location *string // The Sku description for a namespace SKU *SKU // Gets or sets resource tags Tags map[string]*string // READ-ONLY; Gets resource Id ID *string // READ-ONLY; Gets resource type Type *string }
CheckAvailabilityParameters - Parameters supplied to the Check Name Availability for Namespace and NotificationHubs.
func (CheckAvailabilityParameters) MarshalJSON ¶
func (c CheckAvailabilityParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckAvailabilityParameters.
func (*CheckAvailabilityParameters) UnmarshalJSON ¶
func (c *CheckAvailabilityParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckAvailabilityParameters.
type CheckAvailabilityResult ¶
type CheckAvailabilityResult struct { // Gets or sets true if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. IsAvailiable *bool // Deprecated - only for compatibility. Location *string // The Sku description for a namespace SKU *SKU // Deprecated - only for compatibility. 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 }
CheckAvailabilityResult - Description of a CheckAvailability resource.
func (CheckAvailabilityResult) MarshalJSON ¶
func (c CheckAvailabilityResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckAvailabilityResult.
func (*CheckAvailabilityResult) UnmarshalJSON ¶
func (c *CheckAvailabilityResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckAvailabilityResult.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains the methods for the NotificationHubs group. Don't use this type directly, use NewClient() instead.
func NewClient ¶
func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client with the specified values.
- subscriptionID - The ID of the target subscription. 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 (*Client) CheckNotificationHubAvailability ¶
func (client *Client) CheckNotificationHubAvailability(ctx context.Context, resourceGroupName string, namespaceName string, parameters CheckAvailabilityParameters, options *ClientCheckNotificationHubAvailabilityOptions) (ClientCheckNotificationHubAvailabilityResponse, error)
CheckNotificationHubAvailability - Checks the availability of the given notificationHub in a namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- parameters - Request content.
- options - ClientCheckNotificationHubAvailabilityOptions contains the optional parameters for the Client.CheckNotificationHubAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/CheckAvailability.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().CheckNotificationHubAvailability(ctx, "5ktrial", "locp-newns", armnotificationhubs.CheckAvailabilityParameters{ Name: to.Ptr("sdktest"), Location: to.Ptr("West Europe"), }, 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.CheckAvailabilityResult = armnotificationhubs.CheckAvailabilityResult{ // Name: to.Ptr("sdktest"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/sdktest"), // IsAvailiable: to.Ptr(true), // }
Output:
func (*Client) CreateOrUpdate ¶
func (client *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, parameters NotificationHubResource, options *ClientCreateOrUpdateOptions) (ClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates/Update a NotificationHub in a namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- parameters - Request content.
- options - ClientCreateOrUpdateOptions contains the optional parameters for the Client.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/CreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().CreateOrUpdate(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", armnotificationhubs.NotificationHubResource{ Location: to.Ptr("eastus"), Properties: &armnotificationhubs.NotificationHubProperties{}, }, 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.NotificationHubResource = armnotificationhubs.NotificationHubResource{ // Name: to.Ptr("test"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "hubTag1": to.Ptr("hubTagValue1"), // "hubTag2": to.Ptr("hubTagValue2"), // }, // Properties: &armnotificationhubs.NotificationHubProperties{ // Name: to.Ptr("test"), // DailyMaxActiveDevices: to.Ptr[int64](0), // RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), // }, // }
Output:
func (*Client) CreateOrUpdateAuthorizationRule ¶
func (client *Client) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleResource, options *ClientCreateOrUpdateAuthorizationRuleOptions) (ClientCreateOrUpdateAuthorizationRuleResponse, error)
CreateOrUpdateAuthorizationRule - Creates/Updates an authorization rule for a NotificationHub If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- authorizationRuleName - Authorization Rule Name
- parameters - Request content.
- options - ClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the Client.CreateOrUpdateAuthorizationRule method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/AuthorizationRuleCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().CreateOrUpdateAuthorizationRule(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", "MyManageSharedAccessKey", armnotificationhubs.SharedAccessAuthorizationRuleResource{ Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ Rights: []*armnotificationhubs.AccessRights{ to.Ptr(armnotificationhubs.AccessRightsListen), to.Ptr(armnotificationhubs.AccessRightsSend)}, }, }, 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.SharedAccessAuthorizationRuleResource = armnotificationhubs.SharedAccessAuthorizationRuleResource{ // Name: to.Ptr("MyManageSharedAccessKey"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test/authorizationRules/MyManageSharedAccessKey"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T12:24:40.586Z"); return t}()), // ModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T12:24:40.586Z"); return t}()), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }
Output:
func (*Client) DebugSend ¶
func (client *Client) DebugSend(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *ClientDebugSendOptions) (ClientDebugSendResponse, error)
DebugSend - Test send a push notification. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- options - ClientDebugSendOptions contains the optional parameters for the Client.DebugSend method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/DebugSend.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().DebugSend(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", 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.DebugSendResponse = armnotificationhubs.DebugSendResponse{ // Name: to.Ptr("test"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/debugSend"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test"), // Properties: &armnotificationhubs.DebugSendResult{ // Failure: to.Ptr[int64](0), // Results: []*armnotificationhubs.RegistrationResult{ // }, // Success: to.Ptr[int64](0), // }, // }
Output:
func (*Client) Delete ¶
func (client *Client) Delete(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *ClientDeleteOptions) (ClientDeleteResponse, error)
Delete - Deletes a notification hub associated with a namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- options - ClientDeleteOptions contains the optional parameters for the Client.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewClient().Delete(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*Client) DeleteAuthorizationRule ¶
func (client *Client) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, options *ClientDeleteAuthorizationRuleOptions) (ClientDeleteAuthorizationRuleResponse, error)
DeleteAuthorizationRule - Deletes a notificationHub authorization rule If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- authorizationRuleName - Authorization Rule Name
- options - ClientDeleteAuthorizationRuleOptions contains the optional parameters for the Client.DeleteAuthorizationRule method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/AuthorizationRuleDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewClient().DeleteAuthorizationRule(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", "DefaultListenSharedAccessSignature", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*Client) Get ¶
func (client *Client) Get(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *ClientGetOptions) (ClientGetResponse, error)
Get - Gets the notification hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().Get(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", 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.NotificationHubResource = armnotificationhubs.NotificationHubResource{ // Name: to.Ptr("test"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "hubTag1": to.Ptr("hubTagValue1"), // "hubTag2": to.Ptr("hubTagValue2"), // }, // Properties: &armnotificationhubs.NotificationHubProperties{ // Name: to.Ptr("test"), // DailyMaxActiveDevices: to.Ptr[int64](0), // RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), // }, // }
Output:
func (*Client) GetAuthorizationRule ¶
func (client *Client) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, options *ClientGetAuthorizationRuleOptions) (ClientGetAuthorizationRuleResponse, error)
GetAuthorizationRule - Gets an authorization rule for a NotificationHub by name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- authorizationRuleName - Authorization Rule Name
- options - ClientGetAuthorizationRuleOptions contains the optional parameters for the Client.GetAuthorizationRule method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/AuthorizationRuleGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().GetAuthorizationRule(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", "DefaultListenSharedAccessSignature", 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.SharedAccessAuthorizationRuleResource = armnotificationhubs.SharedAccessAuthorizationRuleResource{ // Name: to.Ptr("DefaultListenSharedAccessSignature"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test/authorizationRules/DefaultListenSharedAccessSignature"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T12:24:40.586Z"); return t}()), // ModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T12:24:40.586Z"); return t}()), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }
Output:
func (*Client) GetPnsCredentials ¶
func (client *Client) GetPnsCredentials(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *ClientGetPnsCredentialsOptions) (ClientGetPnsCredentialsResponse, error)
GetPnsCredentials - Lists the PNS Credentials associated with a notification hub. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- options - ClientGetPnsCredentialsOptions contains the optional parameters for the Client.GetPnsCredentials method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/PnsCredentialsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().GetPnsCredentials(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", 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.PnsCredentialsResource = armnotificationhubs.PnsCredentialsResource{ // Name: to.Ptr("test"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/pnsCredentials"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test"), // Properties: &armnotificationhubs.PnsCredentials{ // GCMCredential: &armnotificationhubs.GCMCredential{ // Properties: &armnotificationhubs.GCMCredentialProperties{ // GCMEndpoint: to.Ptr("https://fcm.googleapis.com/fcm/send"), // GoogleAPIKey: to.Ptr("###################################"), // }, // }, // }, // }
Output:
func (*Client) ListKeys ¶
func (client *Client) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, options *ClientListKeysOptions) (ClientListKeysResponse, error)
ListKeys - Gets the Primary and Secondary ConnectionStrings to the NotificationHub If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- authorizationRuleName - Authorization Rule Name
- options - ClientListKeysOptions contains the optional parameters for the Client.ListKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/AuthorizationRuleListKeys.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().ListKeys(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", "sdk-AuthRules-5800", 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.ResourceListKeys = armnotificationhubs.ResourceListKeys{ // KeyName: to.Ptr("sdk-AuthRules-5800"), // PrimaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-notificationHubs-2317"), // PrimaryKey: to.Ptr("############################################"), // SecondaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-notificationHubs-2317"), // SecondaryKey: to.Ptr("############################################"), // }
Output:
func (*Client) NewListAuthorizationRulesPager ¶
func (client *Client) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, notificationHubName string, options *ClientListAuthorizationRulesOptions) *runtime.Pager[ClientListAuthorizationRulesResponse]
NewListAuthorizationRulesPager - Gets the authorization rules for a NotificationHub.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- options - ClientListAuthorizationRulesOptions contains the optional parameters for the Client.NewListAuthorizationRulesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/AuthorizationRuleList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClient().NewListAuthorizationRulesPager("5ktrial", "nh-sdk-ns", "nh-sdk-hub", 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.SharedAccessAuthorizationRuleListResult = armnotificationhubs.SharedAccessAuthorizationRuleListResult{ // Value: []*armnotificationhubs.SharedAccessAuthorizationRuleResource{ // { // Name: to.Ptr("DefaultListenSharedAccessSignature"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test/authorizationRules/DefaultListenSharedAccessSignature"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:43:00.532Z"); return t}()), // ModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:43:00.532Z"); return t}()), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }, // }, // { // Name: to.Ptr("DefaultFullSharedAccessSignature"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test/authorizationRules/DefaultFullSharedAccessSignature"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:43:00.532Z"); return t}()), // ModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:43:00.532Z"); return t}()), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }}, // } }
Output:
func (*Client) NewListPager ¶
func (client *Client) NewListPager(resourceGroupName string, namespaceName string, options *ClientListOptions) *runtime.Pager[ClientListResponse]
NewListPager - Lists the notification hubs associated with a namespace.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- options - ClientListOptions contains the optional parameters for the Client.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/List.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClient().NewListPager("5ktrial", "nh-sdk-ns", &armnotificationhubs.ClientListOptions{SkipToken: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.NotificationHubListResult = armnotificationhubs.NotificationHubListResult{ // Value: []*armnotificationhubs.NotificationHubResource{ // { // Name: to.Ptr("test"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "hubTag1": to.Ptr("hubTagValue1"), // "hubTag2": to.Ptr("hubTagValue2"), // }, // Properties: &armnotificationhubs.NotificationHubProperties{ // Name: to.Ptr("test"), // DailyMaxActiveDevices: to.Ptr[int64](0), // RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), // }, // }}, // } }
Output:
func (*Client) RegenerateKeys ¶
func (client *Client) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters PolicyKeyResource, options *ClientRegenerateKeysOptions) (ClientRegenerateKeysResponse, error)
RegenerateKeys - Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- authorizationRuleName - Authorization Rule Name
- parameters - Request content.
- options - ClientRegenerateKeysOptions contains the optional parameters for the Client.RegenerateKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/AuthorizationRuleRegenerateKey.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().RegenerateKeys(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", "DefaultListenSharedAccessSignature", armnotificationhubs.PolicyKeyResource{ PolicyKey: to.Ptr(armnotificationhubs.PolicyKeyTypePrimaryKey), }, 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.ResourceListKeys = armnotificationhubs.ResourceListKeys{ // KeyName: to.Ptr("DefaultListenSharedAccessSignature"), // PrimaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-notificationHubs-2317"), // PrimaryKey: to.Ptr("############################################"), // SecondaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-notificationHubs-2317"), // SecondaryKey: to.Ptr("############################################"), // }
Output:
func (*Client) Update ¶
func (client *Client) Update(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, parameters NotificationHubPatchParameters, options *ClientUpdateOptions) (ClientUpdateResponse, error)
Update - Patch a NotificationHub in a namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- notificationHubName - Notification Hub name
- parameters - Request content.
- options - ClientUpdateOptions contains the optional parameters for the Client.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NotificationHubs/Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClient().Update(ctx, "sdkresourceGroup", "nh-sdk-ns", "sdk-notificationHubs-8708", armnotificationhubs.NotificationHubPatchParameters{ Properties: &armnotificationhubs.NotificationHubProperties{ GCMCredential: &armnotificationhubs.GCMCredential{ Properties: &armnotificationhubs.GCMCredentialProperties{ GCMEndpoint: to.Ptr("https://fcm.googleapis.com/fcm/send"), GoogleAPIKey: to.Ptr("###################################"), }, }, RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), }, }, 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.NotificationHubResource = armnotificationhubs.NotificationHubResource{ // Name: to.Ptr("test"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/test"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "hubTag1": to.Ptr("hubTagValue1"), // "hubTag2": to.Ptr("hubTagValue2"), // }, // Properties: &armnotificationhubs.NotificationHubProperties{ // Name: to.Ptr("test"), // DailyMaxActiveDevices: to.Ptr[int64](0), // RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), // }, // }
Output:
type ClientCheckNotificationHubAvailabilityOptions ¶
type ClientCheckNotificationHubAvailabilityOptions struct { }
ClientCheckNotificationHubAvailabilityOptions contains the optional parameters for the Client.CheckNotificationHubAvailability method.
type ClientCheckNotificationHubAvailabilityResponse ¶
type ClientCheckNotificationHubAvailabilityResponse struct { // Description of a CheckAvailability resource. CheckAvailabilityResult }
ClientCheckNotificationHubAvailabilityResponse contains the response from method Client.CheckNotificationHubAvailability.
type ClientCreateOrUpdateAuthorizationRuleOptions ¶
type ClientCreateOrUpdateAuthorizationRuleOptions struct { }
ClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the Client.CreateOrUpdateAuthorizationRule method.
type ClientCreateOrUpdateAuthorizationRuleResponse ¶
type ClientCreateOrUpdateAuthorizationRuleResponse struct { SharedAccessAuthorizationRuleResource }
ClientCreateOrUpdateAuthorizationRuleResponse contains the response from method Client.CreateOrUpdateAuthorizationRule.
type ClientCreateOrUpdateOptions ¶
type ClientCreateOrUpdateOptions struct { }
ClientCreateOrUpdateOptions contains the optional parameters for the Client.CreateOrUpdate method.
type ClientCreateOrUpdateResponse ¶
type ClientCreateOrUpdateResponse struct { // Notification Hub Resource. NotificationHubResource }
ClientCreateOrUpdateResponse contains the response from method Client.CreateOrUpdate.
type ClientDebugSendOptions ¶
type ClientDebugSendOptions struct { }
ClientDebugSendOptions contains the optional parameters for the Client.DebugSend method.
type ClientDebugSendResponse ¶
type ClientDebugSendResponse struct { // Description of a NotificationHub Resource. DebugSendResponse }
ClientDebugSendResponse contains the response from method Client.DebugSend.
type ClientDeleteAuthorizationRuleOptions ¶
type ClientDeleteAuthorizationRuleOptions struct { }
ClientDeleteAuthorizationRuleOptions contains the optional parameters for the Client.DeleteAuthorizationRule method.
type ClientDeleteAuthorizationRuleResponse ¶
type ClientDeleteAuthorizationRuleResponse struct { }
ClientDeleteAuthorizationRuleResponse contains the response from method Client.DeleteAuthorizationRule.
type ClientDeleteOptions ¶
type ClientDeleteOptions struct { }
ClientDeleteOptions contains the optional parameters for the Client.Delete method.
type ClientDeleteResponse ¶
type ClientDeleteResponse struct { }
ClientDeleteResponse contains the response from method Client.Delete.
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) NewClient ¶
func (c *ClientFactory) NewClient() *Client
NewClient creates a new instance of Client.
func (*ClientFactory) NewNamespacesClient ¶
func (c *ClientFactory) NewNamespacesClient() *NamespacesClient
NewNamespacesClient creates a new instance of NamespacesClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
type ClientGetAuthorizationRuleOptions ¶
type ClientGetAuthorizationRuleOptions struct { }
ClientGetAuthorizationRuleOptions contains the optional parameters for the Client.GetAuthorizationRule method.
type ClientGetAuthorizationRuleResponse ¶
type ClientGetAuthorizationRuleResponse struct { SharedAccessAuthorizationRuleResource }
ClientGetAuthorizationRuleResponse contains the response from method Client.GetAuthorizationRule.
type ClientGetOptions ¶
type ClientGetOptions struct { }
ClientGetOptions contains the optional parameters for the Client.Get method.
type ClientGetPnsCredentialsOptions ¶
type ClientGetPnsCredentialsOptions struct { }
ClientGetPnsCredentialsOptions contains the optional parameters for the Client.GetPnsCredentials method.
type ClientGetPnsCredentialsResponse ¶
type ClientGetPnsCredentialsResponse struct { // Description of a NotificationHub PNS Credentials. This is a response of the POST requests that return namespace or hubs // PNS credentials. PnsCredentialsResource }
ClientGetPnsCredentialsResponse contains the response from method Client.GetPnsCredentials.
type ClientGetResponse ¶
type ClientGetResponse struct { // Notification Hub Resource. NotificationHubResource }
ClientGetResponse contains the response from method Client.Get.
type ClientListAuthorizationRulesOptions ¶
type ClientListAuthorizationRulesOptions struct { }
ClientListAuthorizationRulesOptions contains the optional parameters for the Client.NewListAuthorizationRulesPager method.
type ClientListAuthorizationRulesResponse ¶
type ClientListAuthorizationRulesResponse struct { SharedAccessAuthorizationRuleListResult }
ClientListAuthorizationRulesResponse contains the response from method Client.NewListAuthorizationRulesPager.
type ClientListKeysOptions ¶
type ClientListKeysOptions struct { }
ClientListKeysOptions contains the optional parameters for the Client.ListKeys method.
type ClientListKeysResponse ¶
type ClientListKeysResponse struct { // Response for the POST request that returns Namespace or NotificationHub access keys (connection strings). ResourceListKeys }
ClientListKeysResponse contains the response from method Client.ListKeys.
type ClientListOptions ¶
ClientListOptions contains the optional parameters for the Client.NewListPager method.
type ClientListResponse ¶
type ClientListResponse struct { // The response of the List NotificationHub operation. NotificationHubListResult }
ClientListResponse contains the response from method Client.NewListPager.
type ClientRegenerateKeysOptions ¶
type ClientRegenerateKeysOptions struct { }
ClientRegenerateKeysOptions contains the optional parameters for the Client.RegenerateKeys method.
type ClientRegenerateKeysResponse ¶
type ClientRegenerateKeysResponse struct { // Response for the POST request that returns Namespace or NotificationHub access keys (connection strings). ResourceListKeys }
ClientRegenerateKeysResponse contains the response from method Client.RegenerateKeys.
type ClientUpdateOptions ¶
type ClientUpdateOptions struct { }
ClientUpdateOptions contains the optional parameters for the Client.Update method.
type ClientUpdateResponse ¶
type ClientUpdateResponse struct { // Notification Hub Resource. NotificationHubResource }
ClientUpdateResponse contains the response from method Client.Update.
type ConnectionDetails ¶
type ConnectionDetails struct { // READ-ONLY; Group name. Always "namespace" for Notification Hubs. GroupID *string // READ-ONLY; A unique ID of the connection. This is not the ARM id, but rather an internal identifier set by the Networking // RP. Notification Hubs code does not analyze it. ID *string // READ-ONLY; Link identifier. This is a string representation of an integer that is also encoded in every IPv6 frame received // by Front Door, and we use it to create implicit authorization rule that allows // connection from the associated Private Endpoint. LinkIdentifier *string // READ-ONLY; Member name. Always "namespace" for Notification Hubs. MemberName *string // READ-ONLY; IP address of the Private Endpoint. This is not used by Notification Hubs. PrivateIPAddress *string }
ConnectionDetails - Part of Private Endpoint description that stores information about a connection between Private Endpoint and Notification Hubs namespace. This is internal class, not visible to customers, and we use it only to discover the link identifier.
func (ConnectionDetails) MarshalJSON ¶
func (c ConnectionDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectionDetails.
func (*ConnectionDetails) UnmarshalJSON ¶
func (c *ConnectionDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionDetails.
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 DebugSendResponse ¶
type DebugSendResponse struct { // Deprecated - only for compatibility. Location *string // Result of DebugSend operations. Properties *DebugSendResult // Deprecated - only for compatibility. 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 }
DebugSendResponse - Description of a NotificationHub Resource.
func (DebugSendResponse) MarshalJSON ¶
func (d DebugSendResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DebugSendResponse.
func (*DebugSendResponse) UnmarshalJSON ¶
func (d *DebugSendResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DebugSendResponse.
type DebugSendResult ¶
type DebugSendResult struct { // READ-ONLY; Gets or sets send failure Failure *int64 // READ-ONLY; Gets or sets actual failure description Results []*RegistrationResult // READ-ONLY; Gets or sets successful send Success *int64 }
DebugSendResult - Result of DebugSend operations.
func (DebugSendResult) MarshalJSON ¶
func (d DebugSendResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DebugSendResult.
func (*DebugSendResult) UnmarshalJSON ¶
func (d *DebugSendResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DebugSendResult.
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 FcmV1Credential ¶
type FcmV1Credential struct { // REQUIRED; Description of a NotificationHub FcmV1Credential. Properties *FcmV1CredentialProperties }
FcmV1Credential - Description of a NotificationHub FcmV1Credential.
func (FcmV1Credential) MarshalJSON ¶
func (f FcmV1Credential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FcmV1Credential.
func (*FcmV1Credential) UnmarshalJSON ¶
func (f *FcmV1Credential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FcmV1Credential.
type FcmV1CredentialProperties ¶
type FcmV1CredentialProperties struct { // REQUIRED; Gets or sets client email. ClientEmail *string // REQUIRED; Gets or sets private key. PrivateKey *string // REQUIRED; Gets or sets project id. ProjectID *string }
FcmV1CredentialProperties - Description of a NotificationHub FcmV1Credential.
func (FcmV1CredentialProperties) MarshalJSON ¶
func (f FcmV1CredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FcmV1CredentialProperties.
func (*FcmV1CredentialProperties) UnmarshalJSON ¶
func (f *FcmV1CredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FcmV1CredentialProperties.
type GCMCredential ¶
type GCMCredential struct { // REQUIRED; Description of a NotificationHub GcmCredential. Properties *GCMCredentialProperties }
GCMCredential - Description of a NotificationHub GcmCredential.
func (GCMCredential) MarshalJSON ¶
func (g GCMCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GCMCredential.
func (*GCMCredential) UnmarshalJSON ¶
func (g *GCMCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GCMCredential.
type GCMCredentialProperties ¶
type GCMCredentialProperties struct { // REQUIRED; Gets or sets the Google API key. GoogleAPIKey *string // Gets or sets the GCM endpoint. GCMEndpoint *string }
GCMCredentialProperties - Description of a NotificationHub GcmCredential.
func (GCMCredentialProperties) MarshalJSON ¶
func (g GCMCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GCMCredentialProperties.
func (*GCMCredentialProperties) UnmarshalJSON ¶
func (g *GCMCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GCMCredentialProperties.
type GroupConnectivityInformation ¶
type GroupConnectivityInformation struct { // READ-ONLY; List of customer-visible domain names that point to a Notification Hubs namespace. CustomerVisibleFqdns []*string // READ-ONLY; Group id. Always set to "namespace". GroupID *string // READ-ONLY; One of the domain name from the customer-visible names; this is used internally by Private Link service to make // connection to Notification Hubs namespace. InternalFqdn *string // READ-ONLY; Member name. Always set to "namespace". MemberName *string // READ-ONLY; ARM region for Private Link Service. We use the region that contains the connected Notification Hubs namespace. PrivateLinkServiceArmRegion *string // READ-ONLY; Not used by Notification Hubs. RedirectMapID *string }
GroupConnectivityInformation - Represents a connectivity information to Notification Hubs namespace. This is part of PrivateLinkService proxy that tell the Networking RP how to connect to the Notification Hubs namespace.
func (GroupConnectivityInformation) MarshalJSON ¶
func (g GroupConnectivityInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GroupConnectivityInformation.
func (*GroupConnectivityInformation) UnmarshalJSON ¶
func (g *GroupConnectivityInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GroupConnectivityInformation.
type IPRule ¶
type IPRule struct { // REQUIRED; IP mask. IPMask *string // REQUIRED; List of access rights. Rights []*AccessRights }
IPRule - A network authorization rule that filters traffic based on IP address.
func (IPRule) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type IPRule.
func (*IPRule) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type IPRule.
type LogSpecification ¶
type LogSpecification struct { // Category group for the log specification. CategoryGroups []*string // READ-ONLY; Duration of data written to a single blob. BlobDuration *string // READ-ONLY; Display name of the log category. DisplayName *string // READ-ONLY; Name of the log category. Name *string }
LogSpecification - A single log category specification.
func (LogSpecification) MarshalJSON ¶
func (l LogSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogSpecification.
func (*LogSpecification) UnmarshalJSON ¶
func (l *LogSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogSpecification.
type MetricSpecification ¶
type MetricSpecification struct { // READ-ONLY; Type of the aggregation (Average, Minimum, Maximum, Total or Count). AggregationType *string // READ-ONLY; List of availabilities. Availabilities []*Availability // READ-ONLY; Description of the metric. DisplayDescription *string // READ-ONLY; User-visible metric name. DisplayName *string // READ-ONLY; Optional property. If set to true, then zero will be returned for time duration where no metric is emitted / // published. FillGapWithZero *bool // READ-ONLY; The matching regex pattern to be applied to the field pointed by the "metricsFilterPathSelector" flag in the // ARM manifest. MetricFilterPattern *string // READ-ONLY; Metric name / id. Name *string // READ-ONLY; List of supported time grain types. SupportedTimeGrainTypes []*string // READ-ONLY; Metric unit. Unit *string }
MetricSpecification - A metric specification.
func (MetricSpecification) MarshalJSON ¶
func (m MetricSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricSpecification.
func (*MetricSpecification) UnmarshalJSON ¶
func (m *MetricSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricSpecification.
type MpnsCredential ¶
type MpnsCredential struct { // REQUIRED; Description of a NotificationHub MpnsCredential. Properties *MpnsCredentialProperties }
MpnsCredential - Description of a NotificationHub MpnsCredential.
func (MpnsCredential) MarshalJSON ¶
func (m MpnsCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MpnsCredential.
func (*MpnsCredential) UnmarshalJSON ¶
func (m *MpnsCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MpnsCredential.
type MpnsCredentialProperties ¶
type MpnsCredentialProperties struct { // REQUIRED; Gets or sets the certificate key for this credential. CertificateKey *string // REQUIRED; Gets or sets the MPNS certificate. MpnsCertificate *string // REQUIRED; Gets or sets the MPNS certificate Thumbprint Thumbprint *string }
MpnsCredentialProperties - Description of a NotificationHub MpnsCredential.
func (MpnsCredentialProperties) MarshalJSON ¶
func (m MpnsCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MpnsCredentialProperties.
func (*MpnsCredentialProperties) UnmarshalJSON ¶
func (m *MpnsCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MpnsCredentialProperties.
type NamespaceListResult ¶
type NamespaceListResult struct { // READ-ONLY; Gets or sets link to the next set of results. NextLink *string // READ-ONLY; Gets or sets result of the List AuthorizationRules operation. Value []*NamespaceResource }
NamespaceListResult - The response of the List Namespace operation.
func (NamespaceListResult) MarshalJSON ¶
func (n NamespaceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamespaceListResult.
func (*NamespaceListResult) UnmarshalJSON ¶
func (n *NamespaceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceListResult.
type NamespacePatchParameters ¶
type NamespacePatchParameters struct { // Represents namespace properties. Properties *NamespaceProperties // The Sku description for a namespace SKU *SKU // Dictionary of Tags map[string]*string }
NamespacePatchParameters - Patch parameter for NamespaceResource.
func (NamespacePatchParameters) MarshalJSON ¶
func (n NamespacePatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamespacePatchParameters.
func (*NamespacePatchParameters) UnmarshalJSON ¶
func (n *NamespacePatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespacePatchParameters.
type NamespaceProperties ¶
type NamespaceProperties struct { // Deprecated. DataCenter *string // Defines values for NamespaceType. NamespaceType *NamespaceType // A collection of network authorization rules. NetworkACLs *NetworkACLs // Collection of Notification Hub or Notification Hub Namespace PNS credentials. PnsCredentials *PnsCredentials // Defines values for OperationProvisioningState. ProvisioningState *OperationProvisioningState // Type of public network access. PublicNetworkAccess *PublicNetworkAccess // Allowed replication region ReplicationRegion *ReplicationRegion // Gets or sets scaleUnit where the namespace gets created ScaleUnit *string // Namespace status. Status *NamespaceStatus // Namespace SKU name. ZoneRedundancy *ZoneRedundancyPreference // READ-ONLY; Time when the namespace was created. CreatedAt *time.Time // READ-ONLY; Gets or sets whether or not the namespace is set as Critical. Critical *bool // READ-ONLY; Gets or sets whether or not the namespace is currently enabled. Enabled *bool // READ-ONLY; Azure Insights Metrics id. MetricID *string // READ-ONLY; Name of the Notification Hubs namespace. This is immutable property, set automatically by the service when the // namespace is created. Name *string // READ-ONLY; Private Endpoint Connections for namespace PrivateEndpointConnections []*PrivateEndpointConnectionResource // READ-ONLY; Region. The value is always set to the same value as Namespace.Location, so we are deprecating this property. Region *string // READ-ONLY; Gets or sets endpoint you can use to perform NotificationHub operations. ServiceBusEndpoint *string // READ-ONLY; Namespace subscription id. SubscriptionID *string // READ-ONLY; Time when the namespace was updated. UpdatedAt *time.Time }
NamespaceProperties - Represents namespace properties.
func (NamespaceProperties) MarshalJSON ¶
func (n NamespaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamespaceProperties.
func (*NamespaceProperties) UnmarshalJSON ¶
func (n *NamespaceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceProperties.
type NamespaceResource ¶
type NamespaceResource struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The Sku description for a namespace SKU *SKU // Represents namespace properties. Properties *NamespaceProperties // 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 }
NamespaceResource - Notification Hubs Namespace Resource.
func (NamespaceResource) MarshalJSON ¶
func (n NamespaceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamespaceResource.
func (*NamespaceResource) UnmarshalJSON ¶
func (n *NamespaceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceResource.
type NamespaceStatus ¶
type NamespaceStatus string
NamespaceStatus - Namespace status.
const ( NamespaceStatusCreated NamespaceStatus = "Created" NamespaceStatusCreating NamespaceStatus = "Creating" NamespaceStatusDeleting NamespaceStatus = "Deleting" NamespaceStatusSuspended NamespaceStatus = "Suspended" )
func PossibleNamespaceStatusValues ¶
func PossibleNamespaceStatusValues() []NamespaceStatus
PossibleNamespaceStatusValues returns the possible values for the NamespaceStatus const type.
type NamespaceType ¶
type NamespaceType string
NamespaceType - Defines values for NamespaceType.
const ( NamespaceTypeMessaging NamespaceType = "Messaging" NamespaceTypeNotificationHub NamespaceType = "NotificationHub" )
func PossibleNamespaceTypeValues ¶
func PossibleNamespaceTypeValues() []NamespaceType
PossibleNamespaceTypeValues returns the possible values for the NamespaceType const type.
type NamespacesClient ¶
type NamespacesClient struct {
// contains filtered or unexported fields
}
NamespacesClient contains the methods for the Namespaces group. Don't use this type directly, use NewNamespacesClient() instead.
func NewNamespacesClient ¶
func NewNamespacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NamespacesClient, error)
NewNamespacesClient creates a new instance of NamespacesClient 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 (*NamespacesClient) BeginCreateOrUpdate ¶
func (client *NamespacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, parameters NamespaceResource, options *NamespacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[NamespacesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates / Updates a Notification Hub namespace. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- parameters - Request content.
- options - NamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/CreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewNamespacesClient().BeginCreateOrUpdate(ctx, "5ktrial", "nh-sdk-ns", armnotificationhubs.NamespaceResource{ Location: to.Ptr("South Central US"), Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, Properties: &armnotificationhubs.NamespaceProperties{ NetworkACLs: &armnotificationhubs.NetworkACLs{ IPRules: []*armnotificationhubs.IPRule{ { IPMask: to.Ptr("185.48.100.00/24"), Rights: []*armnotificationhubs.AccessRights{ to.Ptr(armnotificationhubs.AccessRightsManage), to.Ptr(armnotificationhubs.AccessRightsSend), to.Ptr(armnotificationhubs.AccessRightsListen)}, }}, PublicNetworkRule: &armnotificationhubs.PublicInternetAuthorizationRule{ Rights: []*armnotificationhubs.AccessRights{ to.Ptr(armnotificationhubs.AccessRightsListen)}, }, }, ZoneRedundancy: to.Ptr(armnotificationhubs.ZoneRedundancyPreferenceEnabled), }, SKU: &armnotificationhubs.SKU{ Name: to.Ptr(armnotificationhubs.SKUNameStandard), Tier: to.Ptr("Standard"), }, }, 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.NamespaceResource = armnotificationhubs.NamespaceResource{ // Name: to.Ptr("nh-sdk-ns"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // Name: to.Ptr("nh-sdk-ns"), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.010Z"); return t}()), // Critical: to.Ptr(false), // Enabled: to.Ptr(true), // NamespaceType: to.Ptr(armnotificationhubs.NamespaceTypeNotificationHub), // NetworkACLs: &armnotificationhubs.NetworkACLs{ // IPRules: []*armnotificationhubs.IPRule{ // { // IPMask: to.Ptr("185.48.100.00/24"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsSend), // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }}, // PublicNetworkRule: &armnotificationhubs.PublicInternetAuthorizationRule{ // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }, // }, // PrivateEndpointConnections: []*armnotificationhubs.PrivateEndpointConnectionResource{ // }, // ProvisioningState: to.Ptr(armnotificationhubs.OperationProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armnotificationhubs.PublicNetworkAccessEnabled), // ServiceBusEndpoint: to.Ptr("https://nh-sdk-ns.servicebus.windows.net:443/"), // Status: to.Ptr(armnotificationhubs.NamespaceStatusCreated), // SubscriptionID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:16:17.697Z"); return t}()), // ZoneRedundancy: to.Ptr(armnotificationhubs.ZoneRedundancyPreferenceEnabled), // }, // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // }, // }
Output:
func (*NamespacesClient) CheckAvailability ¶
func (client *NamespacesClient) CheckAvailability(ctx context.Context, parameters CheckAvailabilityParameters, options *NamespacesClientCheckAvailabilityOptions) (NamespacesClientCheckAvailabilityResponse, error)
CheckAvailability - Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- parameters - Request content.
- options - NamespacesClientCheckAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/CheckAvailability.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNamespacesClient().CheckAvailability(ctx, armnotificationhubs.CheckAvailabilityParameters{ Name: to.Ptr("sdk-Namespace-2924"), }, 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.CheckAvailabilityResult = armnotificationhubs.CheckAvailabilityResult{ // Name: to.Ptr("sdk-Namespace-2924"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/providers/Microsoft.NotificationHubs/namespaces/sdk-Namespace-2924"), // IsAvailiable: to.Ptr(true), // }
Output:
func (*NamespacesClient) CreateOrUpdateAuthorizationRule ¶
func (client *NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleResource, options *NamespacesClientCreateOrUpdateAuthorizationRuleOptions) (NamespacesClientCreateOrUpdateAuthorizationRuleResponse, error)
CreateOrUpdateAuthorizationRule - Creates an authorization rule for a namespace If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- authorizationRuleName - Authorization Rule Name
- parameters - Request content.
- options - NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/AuthorizationRuleCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNamespacesClient().CreateOrUpdateAuthorizationRule(ctx, "5ktrial", "nh-sdk-ns", "sdk-AuthRules-1788", armnotificationhubs.SharedAccessAuthorizationRuleResource{ Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ Rights: []*armnotificationhubs.AccessRights{ to.Ptr(armnotificationhubs.AccessRightsListen), to.Ptr(armnotificationhubs.AccessRightsSend)}, }, }, 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.SharedAccessAuthorizationRuleResource = armnotificationhubs.SharedAccessAuthorizationRuleResource{ // Name: to.Ptr("NewAuthorizationRule"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/authorizationRules/NewAuthorizationRule"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:09:19.967Z"); return t}()), // ModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:09:19.967Z"); return t}()), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }
Output:
func (*NamespacesClient) Delete ¶
func (client *NamespacesClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientDeleteOptions) (NamespacesClientDeleteResponse, error)
Delete - Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- options - NamespacesClientDeleteOptions contains the optional parameters for the NamespacesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/Delete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewNamespacesClient().Delete(ctx, "5ktrial", "nh-sdk-ns", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*NamespacesClient) DeleteAuthorizationRule ¶
func (client *NamespacesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientDeleteAuthorizationRuleOptions) (NamespacesClientDeleteAuthorizationRuleResponse, error)
DeleteAuthorizationRule - Deletes a namespace authorization rule If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- authorizationRuleName - Authorization Rule Name
- options - NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/AuthorizationRuleDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewNamespacesClient().DeleteAuthorizationRule(ctx, "5ktrial", "nh-sdk-ns", "RootManageSharedAccessKey", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*NamespacesClient) Get ¶
func (client *NamespacesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientGetOptions) (NamespacesClientGetResponse, error)
Get - Returns the given namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- options - NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/Get.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNamespacesClient().Get(ctx, "5ktrial", "nh-sdk-ns", 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.NamespaceResource = armnotificationhubs.NamespaceResource{ // Name: to.Ptr("nh-sdk-ns"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // Name: to.Ptr("nh-sdk-ns"), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.010Z"); return t}()), // Critical: to.Ptr(false), // Enabled: to.Ptr(true), // NamespaceType: to.Ptr(armnotificationhubs.NamespaceTypeNotificationHub), // NetworkACLs: &armnotificationhubs.NetworkACLs{ // IPRules: []*armnotificationhubs.IPRule{ // { // IPMask: to.Ptr("185.48.100.00/24"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsSend), // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }}, // PublicNetworkRule: &armnotificationhubs.PublicInternetAuthorizationRule{ // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }, // }, // PrivateEndpointConnections: []*armnotificationhubs.PrivateEndpointConnectionResource{ // }, // ProvisioningState: to.Ptr(armnotificationhubs.OperationProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armnotificationhubs.PublicNetworkAccessEnabled), // ServiceBusEndpoint: to.Ptr("https://nh-sdk-ns.servicebus.windows.net:443/"), // Status: to.Ptr(armnotificationhubs.NamespaceStatusCreated), // SubscriptionID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.030Z"); return t}()), // }, // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // }, // }
Output:
func (*NamespacesClient) GetAuthorizationRule ¶
func (client *NamespacesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientGetAuthorizationRuleOptions) (NamespacesClientGetAuthorizationRuleResponse, error)
GetAuthorizationRule - Gets an authorization rule for a namespace by name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- authorizationRuleName - Authorization Rule Name
- options - NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/AuthorizationRuleGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNamespacesClient().GetAuthorizationRule(ctx, "5ktrial", "nh-sdk-ns", "RootManageSharedAccessKey", 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.SharedAccessAuthorizationRuleResource = armnotificationhubs.SharedAccessAuthorizationRuleResource{ // Name: to.Ptr("RootManageSharedAccessKey"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/authorizationRules/RootManageSharedAccessKey"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:19:36.331Z"); return t}()), // ModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:19:36.331Z"); return t}()), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }
Output:
func (*NamespacesClient) GetPnsCredentials ¶
func (client *NamespacesClient) GetPnsCredentials(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientGetPnsCredentialsOptions) (NamespacesClientGetPnsCredentialsResponse, error)
GetPnsCredentials - Lists the PNS credentials associated with a namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- options - NamespacesClientGetPnsCredentialsOptions contains the optional parameters for the NamespacesClient.GetPnsCredentials method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/PnsCredentialsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNamespacesClient().GetPnsCredentials(ctx, "5ktrial", "nh-sdk-ns", 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.PnsCredentialsResource = armnotificationhubs.PnsCredentialsResource{ // Name: to.Ptr("nh-sdk-hub"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/pnsCredentials"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns"), // Properties: &armnotificationhubs.PnsCredentials{ // MpnsCredential: &armnotificationhubs.MpnsCredential{ // Properties: &armnotificationhubs.MpnsCredentialProperties{ // Thumbprint: to.Ptr("#################################"), // }, // }, // }, // }
Output:
func (*NamespacesClient) ListKeys ¶
func (client *NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, options *NamespacesClientListKeysOptions) (NamespacesClientListKeysResponse, error)
ListKeys - Gets the Primary and Secondary ConnectionStrings to the namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- authorizationRuleName - Authorization Rule Name
- options - NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/AuthorizationRuleListKeys.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNamespacesClient().ListKeys(ctx, "5ktrial", "nh-sdk-ns", "RootManageSharedAccessKey", 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.ResourceListKeys = armnotificationhubs.ResourceListKeys{ // KeyName: to.Ptr("RootManageSharedAccessKey"), // PrimaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"), // PrimaryKey: to.Ptr("############################################"), // SecondaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=############################################"), // SecondaryKey: to.Ptr("############################################"), // }
Output:
func (*NamespacesClient) NewListAllPager ¶
func (client *NamespacesClient) NewListAllPager(options *NamespacesClientListAllOptions) *runtime.Pager[NamespacesClientListAllResponse]
NewListAllPager - Lists all the available namespaces within the subscription.
Generated from API version 2023-10-01-preview
- options - NamespacesClientListAllOptions contains the optional parameters for the NamespacesClient.NewListAllPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/ListBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNamespacesClient().NewListAllPager(&armnotificationhubs.NamespacesClientListAllOptions{SkipToken: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.NamespaceListResult = armnotificationhubs.NamespaceListResult{ // Value: []*armnotificationhubs.NamespaceResource{ // { // Name: to.Ptr("namespace-2"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/namespace-1"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // Name: to.Ptr("namespace-1"), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.010Z"); return t}()), // Critical: to.Ptr(false), // Enabled: to.Ptr(true), // NamespaceType: to.Ptr(armnotificationhubs.NamespaceTypeNotificationHub), // NetworkACLs: &armnotificationhubs.NetworkACLs{ // IPRules: []*armnotificationhubs.IPRule{ // { // IPMask: to.Ptr("185.48.100.00/24"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsSend), // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }}, // PublicNetworkRule: &armnotificationhubs.PublicInternetAuthorizationRule{ // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }, // }, // PrivateEndpointConnections: []*armnotificationhubs.PrivateEndpointConnectionResource{ // }, // ProvisioningState: to.Ptr(armnotificationhubs.OperationProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armnotificationhubs.PublicNetworkAccessEnabled), // ServiceBusEndpoint: to.Ptr("https://namespace-1.servicebus.windows.net:443/"), // Status: to.Ptr(armnotificationhubs.NamespaceStatusCreated), // SubscriptionID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.030Z"); return t}()), // }, // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // }, // }, // { // Name: to.Ptr("namespace-2"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/namespace-2"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // Name: to.Ptr("namespace-2"), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.010Z"); return t}()), // Critical: to.Ptr(false), // Enabled: to.Ptr(true), // NamespaceType: to.Ptr(armnotificationhubs.NamespaceTypeNotificationHub), // NetworkACLs: &armnotificationhubs.NetworkACLs{ // IPRules: []*armnotificationhubs.IPRule{ // }, // PublicNetworkRule: &armnotificationhubs.PublicInternetAuthorizationRule{ // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }, // PrivateEndpointConnections: []*armnotificationhubs.PrivateEndpointConnectionResource{ // }, // ProvisioningState: to.Ptr(armnotificationhubs.OperationProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armnotificationhubs.PublicNetworkAccessEnabled), // ServiceBusEndpoint: to.Ptr("https://namespace-2.servicebus.windows.net:443/"), // Status: to.Ptr(armnotificationhubs.NamespaceStatusCreated), // SubscriptionID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.030Z"); return t}()), // }, // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // }, // }}, // } }
Output:
func (*NamespacesClient) NewListAuthorizationRulesPager ¶
func (client *NamespacesClient) NewListAuthorizationRulesPager(resourceGroupName string, namespaceName string, options *NamespacesClientListAuthorizationRulesOptions) *runtime.Pager[NamespacesClientListAuthorizationRulesResponse]
NewListAuthorizationRulesPager - Gets the authorization rules for a namespace.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- options - NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/AuthorizationRuleList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNamespacesClient().NewListAuthorizationRulesPager("5ktrial", "nh-sdk-ns", 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.SharedAccessAuthorizationRuleListResult = armnotificationhubs.SharedAccessAuthorizationRuleListResult{ // Value: []*armnotificationhubs.SharedAccessAuthorizationRuleResource{ // { // Name: to.Ptr("RootManageSharedAccessKey"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/authorizationRules/RootManageSharedAccessKey"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.040Z"); return t}()), // ModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.040Z"); return t}()), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }, // { // Name: to.Ptr("NewAuthorizationRule"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/authorizationRules/NewAuthorizationRule"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // CreatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:09:19.967Z"); return t}()), // ModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T10:09:19.967Z"); return t}()), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }}, // } }
Output:
func (*NamespacesClient) NewListPager ¶
func (client *NamespacesClient) NewListPager(resourceGroupName string, options *NamespacesClientListOptions) *runtime.Pager[NamespacesClientListResponse]
NewListPager - Lists the available namespaces within a resource group.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/ListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewNamespacesClient().NewListPager("5ktrial", &armnotificationhubs.NamespacesClientListOptions{SkipToken: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.NamespaceListResult = armnotificationhubs.NamespaceListResult{ // Value: []*armnotificationhubs.NamespaceResource{ // { // Name: to.Ptr("namespace-2"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/namespace-1"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // Name: to.Ptr("namespace-1"), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.010Z"); return t}()), // Critical: to.Ptr(false), // Enabled: to.Ptr(true), // NamespaceType: to.Ptr(armnotificationhubs.NamespaceTypeNotificationHub), // NetworkACLs: &armnotificationhubs.NetworkACLs{ // IPRules: []*armnotificationhubs.IPRule{ // { // IPMask: to.Ptr("185.48.100.00/24"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsSend), // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }}, // PublicNetworkRule: &armnotificationhubs.PublicInternetAuthorizationRule{ // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }, // }, // PrivateEndpointConnections: []*armnotificationhubs.PrivateEndpointConnectionResource{ // }, // ProvisioningState: to.Ptr(armnotificationhubs.OperationProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armnotificationhubs.PublicNetworkAccessEnabled), // ServiceBusEndpoint: to.Ptr("https://namespace-1.servicebus.windows.net:443/"), // Status: to.Ptr(armnotificationhubs.NamespaceStatusCreated), // SubscriptionID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.030Z"); return t}()), // }, // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // }, // }, // { // Name: to.Ptr("namespace-2"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/namespace-2"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // Name: to.Ptr("namespace-2"), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.010Z"); return t}()), // Critical: to.Ptr(false), // Enabled: to.Ptr(true), // NamespaceType: to.Ptr(armnotificationhubs.NamespaceTypeNotificationHub), // NetworkACLs: &armnotificationhubs.NetworkACLs{ // IPRules: []*armnotificationhubs.IPRule{ // }, // PublicNetworkRule: &armnotificationhubs.PublicInternetAuthorizationRule{ // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // }, // PrivateEndpointConnections: []*armnotificationhubs.PrivateEndpointConnectionResource{ // }, // ProvisioningState: to.Ptr(armnotificationhubs.OperationProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armnotificationhubs.PublicNetworkAccessEnabled), // ServiceBusEndpoint: to.Ptr("https://namespace-2.servicebus.windows.net:443/"), // Status: to.Ptr(armnotificationhubs.NamespaceStatusCreated), // SubscriptionID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.030Z"); return t}()), // }, // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // }, // }}, // } }
Output:
func (*NamespacesClient) RegenerateKeys ¶
func (client *NamespacesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters PolicyKeyResource, options *NamespacesClientRegenerateKeysOptions) (NamespacesClientRegenerateKeysResponse, error)
RegenerateKeys - Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- authorizationRuleName - Authorization Rule Name
- parameters - Request content.
- options - NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/AuthorizationRuleRegenerateKey.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNamespacesClient().RegenerateKeys(ctx, "5ktrial", "nh-sdk-ns", "RootManageSharedAccessKey", armnotificationhubs.PolicyKeyResource{ PolicyKey: to.Ptr(armnotificationhubs.PolicyKeyTypePrimaryKey), }, 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.ResourceListKeys = armnotificationhubs.ResourceListKeys{ // KeyName: to.Ptr("RootManageSharedAccessKey"), // PrimaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=########################################"), // PrimaryKey: to.Ptr("########################################"), // SecondaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=########################################"), // SecondaryKey: to.Ptr("########################################"), // }
Output:
func (*NamespacesClient) Update ¶
func (client *NamespacesClient) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters NamespacePatchParameters, options *NamespacesClientUpdateOptions) (NamespacesClientUpdateResponse, error)
Update - Patches the existing namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- parameters - Request content.
- options - NamespacesClientUpdateOptions contains the optional parameters for the NamespacesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/Update.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewNamespacesClient().Update(ctx, "5ktrial", "nh-sdk-ns", armnotificationhubs.NamespacePatchParameters{ Properties: &armnotificationhubs.NamespaceProperties{ PnsCredentials: &armnotificationhubs.PnsCredentials{ GCMCredential: &armnotificationhubs.GCMCredential{ Properties: &armnotificationhubs.GCMCredentialProperties{ GCMEndpoint: to.Ptr("https://fcm.googleapis.com/fcm/send"), GoogleAPIKey: to.Ptr("#############################"), }, }, }, }, SKU: &armnotificationhubs.SKU{ Name: to.Ptr(armnotificationhubs.SKUNameFree), }, Tags: map[string]*string{ "tag1": to.Ptr("value3"), }, }, 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.NamespaceResource = armnotificationhubs.NamespaceResource{ // Name: to.Ptr("nh-sdk-ns"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "tag1": to.Ptr("value3"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // Name: to.Ptr("nh-sdk-ns"), // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.010Z"); return t}()), // Critical: to.Ptr(false), // Enabled: to.Ptr(true), // NamespaceType: to.Ptr(armnotificationhubs.NamespaceTypeNotificationHub), // NetworkACLs: &armnotificationhubs.NetworkACLs{ // IPRules: []*armnotificationhubs.IPRule{ // { // IPMask: to.Ptr("185.48.100.00/24"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsSend), // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }}, // PublicNetworkRule: &armnotificationhubs.PublicInternetAuthorizationRule{ // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // }, // }, // PrivateEndpointConnections: []*armnotificationhubs.PrivateEndpointConnectionResource{ // }, // ProvisioningState: to.Ptr(armnotificationhubs.OperationProvisioningStateSucceeded), // PublicNetworkAccess: to.Ptr(armnotificationhubs.PublicNetworkAccessEnabled), // ServiceBusEndpoint: to.Ptr("https://nh-sdk-ns.servicebus.windows.net:443/"), // Status: to.Ptr(armnotificationhubs.NamespaceStatusCreated), // SubscriptionID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-26T06:10:44.030Z"); return t}()), // }, // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameFree), // }, // }
Output:
type NamespacesClientBeginCreateOrUpdateOptions ¶
type NamespacesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.BeginCreateOrUpdate method.
type NamespacesClientCheckAvailabilityOptions ¶
type NamespacesClientCheckAvailabilityOptions struct { }
NamespacesClientCheckAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckAvailability method.
type NamespacesClientCheckAvailabilityResponse ¶
type NamespacesClientCheckAvailabilityResponse struct { // Description of a CheckAvailability resource. CheckAvailabilityResult }
NamespacesClientCheckAvailabilityResponse contains the response from method NamespacesClient.CheckAvailability.
type NamespacesClientCreateOrUpdateAuthorizationRuleOptions ¶
type NamespacesClientCreateOrUpdateAuthorizationRuleOptions struct { }
NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.
type NamespacesClientCreateOrUpdateAuthorizationRuleResponse ¶
type NamespacesClientCreateOrUpdateAuthorizationRuleResponse struct { SharedAccessAuthorizationRuleResource }
NamespacesClientCreateOrUpdateAuthorizationRuleResponse contains the response from method NamespacesClient.CreateOrUpdateAuthorizationRule.
type NamespacesClientCreateOrUpdateResponse ¶
type NamespacesClientCreateOrUpdateResponse struct { // Notification Hubs Namespace Resource. NamespaceResource }
NamespacesClientCreateOrUpdateResponse contains the response from method NamespacesClient.BeginCreateOrUpdate.
type NamespacesClientDeleteAuthorizationRuleOptions ¶
type NamespacesClientDeleteAuthorizationRuleOptions struct { }
NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.
type NamespacesClientDeleteAuthorizationRuleResponse ¶
type NamespacesClientDeleteAuthorizationRuleResponse struct { }
NamespacesClientDeleteAuthorizationRuleResponse contains the response from method NamespacesClient.DeleteAuthorizationRule.
type NamespacesClientDeleteOptions ¶
type NamespacesClientDeleteOptions struct { }
NamespacesClientDeleteOptions contains the optional parameters for the NamespacesClient.Delete method.
type NamespacesClientDeleteResponse ¶
type NamespacesClientDeleteResponse struct { }
NamespacesClientDeleteResponse contains the response from method NamespacesClient.Delete.
type NamespacesClientGetAuthorizationRuleOptions ¶
type NamespacesClientGetAuthorizationRuleOptions struct { }
NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.
type NamespacesClientGetAuthorizationRuleResponse ¶
type NamespacesClientGetAuthorizationRuleResponse struct { SharedAccessAuthorizationRuleResource }
NamespacesClientGetAuthorizationRuleResponse contains the response from method NamespacesClient.GetAuthorizationRule.
type NamespacesClientGetOptions ¶
type NamespacesClientGetOptions struct { }
NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.
type NamespacesClientGetPnsCredentialsOptions ¶
type NamespacesClientGetPnsCredentialsOptions struct { }
NamespacesClientGetPnsCredentialsOptions contains the optional parameters for the NamespacesClient.GetPnsCredentials method.
type NamespacesClientGetPnsCredentialsResponse ¶
type NamespacesClientGetPnsCredentialsResponse struct { // Description of a NotificationHub PNS Credentials. This is a response of the POST requests that return namespace or hubs // PNS credentials. PnsCredentialsResource }
NamespacesClientGetPnsCredentialsResponse contains the response from method NamespacesClient.GetPnsCredentials.
type NamespacesClientGetResponse ¶
type NamespacesClientGetResponse struct { // Notification Hubs Namespace Resource. NamespaceResource }
NamespacesClientGetResponse contains the response from method NamespacesClient.Get.
type NamespacesClientListAllOptions ¶
type NamespacesClientListAllOptions struct { // Skip token for subsequent requests. SkipToken *string // Maximum number of results to return. Top *int32 }
NamespacesClientListAllOptions contains the optional parameters for the NamespacesClient.NewListAllPager method.
type NamespacesClientListAllResponse ¶
type NamespacesClientListAllResponse struct { // The response of the List Namespace operation. NamespaceListResult }
NamespacesClientListAllResponse contains the response from method NamespacesClient.NewListAllPager.
type NamespacesClientListAuthorizationRulesOptions ¶
type NamespacesClientListAuthorizationRulesOptions struct { }
NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.
type NamespacesClientListAuthorizationRulesResponse ¶
type NamespacesClientListAuthorizationRulesResponse struct { SharedAccessAuthorizationRuleListResult }
NamespacesClientListAuthorizationRulesResponse contains the response from method NamespacesClient.NewListAuthorizationRulesPager.
type NamespacesClientListKeysOptions ¶
type NamespacesClientListKeysOptions struct { }
NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.
type NamespacesClientListKeysResponse ¶
type NamespacesClientListKeysResponse struct { // Response for the POST request that returns Namespace or NotificationHub access keys (connection strings). ResourceListKeys }
NamespacesClientListKeysResponse contains the response from method NamespacesClient.ListKeys.
type NamespacesClientListOptions ¶
type NamespacesClientListOptions struct { // Skip token for subsequent requests. SkipToken *string // Maximum number of results to return. Top *int32 }
NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.
type NamespacesClientListResponse ¶
type NamespacesClientListResponse struct { // The response of the List Namespace operation. NamespaceListResult }
NamespacesClientListResponse contains the response from method NamespacesClient.NewListPager.
type NamespacesClientRegenerateKeysOptions ¶
type NamespacesClientRegenerateKeysOptions struct { }
NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.
type NamespacesClientRegenerateKeysResponse ¶
type NamespacesClientRegenerateKeysResponse struct { // Response for the POST request that returns Namespace or NotificationHub access keys (connection strings). ResourceListKeys }
NamespacesClientRegenerateKeysResponse contains the response from method NamespacesClient.RegenerateKeys.
type NamespacesClientUpdateOptions ¶
type NamespacesClientUpdateOptions struct { }
NamespacesClientUpdateOptions contains the optional parameters for the NamespacesClient.Update method.
type NamespacesClientUpdateResponse ¶
type NamespacesClientUpdateResponse struct { // Notification Hubs Namespace Resource. NamespaceResource }
NamespacesClientUpdateResponse contains the response from method NamespacesClient.Update.
type NetworkACLs ¶
type NetworkACLs struct { // List of IP rules. IPRules []*IPRule // A default (public Internet) network authorization rule, which contains rights if no other network rule matches. PublicNetworkRule *PublicInternetAuthorizationRule }
NetworkACLs - A collection of network authorization rules.
func (NetworkACLs) MarshalJSON ¶
func (n NetworkACLs) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkACLs.
func (*NetworkACLs) UnmarshalJSON ¶
func (n *NetworkACLs) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkACLs.
type NotificationHubListResult ¶
type NotificationHubListResult struct { // READ-ONLY; Gets or sets link to the next set of results. NextLink *string // READ-ONLY; Gets or sets result of the List AuthorizationRules operation. Value []*NotificationHubResource }
NotificationHubListResult - The response of the List NotificationHub operation.
func (NotificationHubListResult) MarshalJSON ¶
func (n NotificationHubListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationHubListResult.
func (*NotificationHubListResult) UnmarshalJSON ¶
func (n *NotificationHubListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationHubListResult.
type NotificationHubPatchParameters ¶
type NotificationHubPatchParameters struct { // NotificationHub properties. Properties *NotificationHubProperties // The Sku description for a namespace SKU *SKU // Dictionary of Tags map[string]*string }
NotificationHubPatchParameters - Patch parameter for NamespaceResource.
func (NotificationHubPatchParameters) MarshalJSON ¶
func (n NotificationHubPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationHubPatchParameters.
func (*NotificationHubPatchParameters) UnmarshalJSON ¶
func (n *NotificationHubPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationHubPatchParameters.
type NotificationHubProperties ¶
type NotificationHubProperties struct { // Description of a NotificationHub AdmCredential. AdmCredential *AdmCredential // Description of a NotificationHub ApnsCredential. ApnsCredential *ApnsCredential // Description of a NotificationHub BaiduCredential. BaiduCredential *BaiduCredential // Description of a NotificationHub BrowserCredential. BrowserCredential *BrowserCredential // Description of a NotificationHub FcmV1Credential. FcmV1Credential *FcmV1Credential // Description of a NotificationHub GcmCredential. GCMCredential *GCMCredential // Description of a NotificationHub MpnsCredential. MpnsCredential *MpnsCredential // Gets or sets the NotificationHub name. Name *string // Gets or sets the RegistrationTtl of the created NotificationHub RegistrationTTL *string // Description of a NotificationHub WnsCredential. WnsCredential *WnsCredential // Description of a NotificationHub XiaomiCredential. XiaomiCredential *XiaomiCredential // READ-ONLY; Gets or sets the AuthorizationRules of the created NotificationHub AuthorizationRules []*SharedAccessAuthorizationRuleProperties // READ-ONLY DailyMaxActiveDevices *int64 }
NotificationHubProperties - NotificationHub properties.
func (NotificationHubProperties) MarshalJSON ¶
func (n NotificationHubProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationHubProperties.
func (*NotificationHubProperties) UnmarshalJSON ¶
func (n *NotificationHubProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationHubProperties.
type NotificationHubResource ¶
type NotificationHubResource struct { // REQUIRED; The geo-location where the resource lives Location *string // NotificationHub properties. Properties *NotificationHubProperties // The Sku description for a namespace SKU *SKU // 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 }
NotificationHubResource - Notification Hub Resource.
func (NotificationHubResource) MarshalJSON ¶
func (n NotificationHubResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationHubResource.
func (*NotificationHubResource) UnmarshalJSON ¶
func (n *NotificationHubResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationHubResource.
type Operation ¶
type Operation struct { // The object that represents the operation. Display *OperationDisplay // Optional operation properties. Properties *OperationProperties // READ-ONLY; Gets or sets IsDataAction property. It is used to differentiate management and data plane operations. IsDataAction *bool // READ-ONLY; Gets operation name: {provider}/{resource}/{operation} Name *string }
Operation - A NotificationHubs REST API operation
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; Human-friendly operation description. Description *string // READ-ONLY; Gets operation type: Read, write, delete, etc. Operation *string // READ-ONLY; Gets service provider: Microsoft.NotificationHubs Provider *string // READ-ONLY; Gets resource on which the operation is performed: Invoice, etc. Resource *string }
OperationDisplay - The object that represents the 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; Gets URL to get the next set of operation list results if there are any. NextLink *string // READ-ONLY; Gets list of NotificationHubs operations supported by the Microsoft.NotificationHubs resource provider. Value []*Operation }
OperationListResult - Result of the request to list NotificationHubs operations. It contains a list of operations and a 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 OperationProperties ¶
type OperationProperties struct { // Optional service specification used in Operations API. ServiceSpecification *ServiceSpecification }
OperationProperties - Optional operation properties.
func (OperationProperties) MarshalJSON ¶
func (o OperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationProperties.
func (*OperationProperties) UnmarshalJSON ¶
func (o *OperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationProperties.
type OperationProvisioningState ¶
type OperationProvisioningState string
OperationProvisioningState - Defines values for OperationProvisioningState.
const ( OperationProvisioningStateCanceled OperationProvisioningState = "Canceled" OperationProvisioningStateDisabled OperationProvisioningState = "Disabled" OperationProvisioningStateFailed OperationProvisioningState = "Failed" OperationProvisioningStateInProgress OperationProvisioningState = "InProgress" OperationProvisioningStatePending OperationProvisioningState = "Pending" OperationProvisioningStateSucceeded OperationProvisioningState = "Succeeded" OperationProvisioningStateUnknown OperationProvisioningState = "Unknown" )
func PossibleOperationProvisioningStateValues ¶
func PossibleOperationProvisioningStateValues() []OperationProvisioningState
PossibleOperationProvisioningStateValues returns the possible values for the OperationProvisioningState const type.
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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all available Notification Hubs operations.
Generated from API version 2023-10-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/NHOperationsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.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 = armnotificationhubs.OperationListResult{ // Value: []*armnotificationhubs.Operation{ // { // Name: to.Ptr("Microsoft.NotificationHubs/register/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Registers the subscription for the NotifciationHubs resource provider and enables the creation of Namespaces and NotificationHubs"), // Operation: to.Ptr("Registers the NotificationHubs Provider"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Microsoft Azure Notification Hub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/unregister/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Unregisters the subscription for the NotifciationHubs resource provider and enables the creation of Namespaces and NotificationHubs"), // Operation: to.Ptr("Unregisters the NotificationHubs Provider"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Microsoft Azure Notification Hub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/operations/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Returns a list of supported operations for Notification Hubs provider"), // Operation: to.Ptr("Notification Hubs provider operations"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Microsoft Azure Notification Hub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/operationResults/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Returns operation results for Notification Hubs provider"), // Operation: to.Ptr("Operation results for Notification Hubs provider"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Microsoft Azure Notification Hub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/providers/Microsoft.Insights/diagnosticSettings/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get Namespace diagnostic settings"), // Operation: to.Ptr("Read diagnostics setting"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/providers/Microsoft.Insights/diagnosticSettings/write"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Create or Update Namespace diagnostic settings"), // Operation: to.Ptr("Write diagnostic settings"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/providers/Microsoft.Insights/logDefinitions/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Gets the available logs for Namespace"), // Operation: to.Ptr("Read Namespace log definitions"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("The log definition of Namespace"), // }, // Properties: &armnotificationhubs.OperationProperties{ // ServiceSpecification: &armnotificationhubs.ServiceSpecification{ // LogSpecifications: []*armnotificationhubs.LogSpecification{ // { // Name: to.Ptr("OperationalLogs"), // BlobDuration: to.Ptr("PT1H"), // DisplayName: to.Ptr("Operational Logs"), // }}, // }, // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/CheckNamespaceAvailability/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Checks whether or not a given Namespace resource name is available within the NotificationHub service."), // Operation: to.Ptr("Check Namespace name availability."), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/write"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Create a Namespace Resource and Update its properties. Tags and Capacity of the Namespace are the properties which can be updated."), // Operation: to.Ptr("Create Or Update Namespace"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get the list of Namespace Resource Description"), // Operation: to.Ptr("Get Namespace Resource"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/delete"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Delete Namespace Resource"), // Operation: to.Ptr("Delete Namespace"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/authorizationRules/write"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Create a Namespace level Authorization Rules and update its properties. The Authorization Rules Access Rights, the Primary and Secondary Keys can be updated."), // Operation: to.Ptr("Create or Update Namespace Authorization Rules"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/authorizationRules/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get the list of Namespaces Authorization Rules description."), // Operation: to.Ptr("Get Namespace Authorization Rules"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/authorizationRules/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get the list of Namespaces Authorization Rules description."), // Operation: to.Ptr("Get Namespace Authorization Rules"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/authorizationRules/delete"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Delete Namespace Authorization Rule. The Default Namespace Authorization Rule cannot be deleted."), // Operation: to.Ptr("Delete Namespace Authorization Rule"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/authorizationRules/listkeys/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get the Connection String to the Namespace"), // Operation: to.Ptr("Get Namespace Listkeys"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/authorizationRules/regenerateKeys/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Namespace Authorization Rule Regenerate Primary/SecondaryKey, Specify the Key that needs to be regenerated"), // Operation: to.Ptr("Namespace Authorization Rule Regenerate Keys"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/CheckNotificationHubAvailability/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Checks whether or not a given NotificationHub name is available inside a Namespace."), // Operation: to.Ptr("Check NotificationHub name availability."), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/write"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Create a Notification Hub and Update its properties. Its properties mainly include PNS Credentials. Authorization Rules and TTL"), // Operation: to.Ptr("Create or Update Notification Hub"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/vapidkeys/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get new pair of VAPID keys for a Notification Hub"), // Operation: to.Ptr("Get VAPID keys for a Notification Hub"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get list of Notification Hub Resource Descriptions"), // Operation: to.Ptr("Get Notification Hub"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/delete"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Delete Notification Hub Resource"), // Operation: to.Ptr("Delete Notification Hub"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/write"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Create Notification Hub Authorization Rules and Update its properties. The Authorization Rules Access Rights, the Primary and Secondary Keys can be updated."), // Operation: to.Ptr("Create or Update Notification hub Authorization Rule"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get the list of Notification Hub Authorization Rules"), // Operation: to.Ptr("Get Notification Hub Authorization Rules"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get the list of Notification Hub Authorization Rules"), // Operation: to.Ptr("Get Notification Hub Authorization Rules"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/delete"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Delete Notification Hub Authorization Rules"), // Operation: to.Ptr("Delete Notification Hub Authorization Rules"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/listkeys/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get the Connection String to the Notification Hub"), // Operation: to.Ptr("Get Notification Hub Listkeys"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/authorizationRules/regenerateKeys/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Notification Hub Authorization Rule Regenerate Primary/SecondaryKey, Specify the Key that needs to be regenerated"), // Operation: to.Ptr("Notification Hub Authorization Rule Regenerate Keys"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/pnsCredentials/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get All Notification Hub PNS Credentials. This includes, WNS, MPNS, APNS, GCM, Baidu and FcmV1 credentials"), // Operation: to.Ptr("Get Notification Hub PNS Credentials"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub PnsCredential"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/debugSend/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Send a test push notification to 10 matched devices."), // Operation: to.Ptr("Send a test push notification."), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("NotificationHub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/metricDefinitions/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get list of Namespace metrics Resource Descriptions"), // Operation: to.Ptr("Get Namespace metrics"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace metrics"), // }, // Properties: &armnotificationhubs.OperationProperties{ // ServiceSpecification: &armnotificationhubs.ServiceSpecification{ // MetricSpecifications: []*armnotificationhubs.MetricSpecification{ // { // Name: to.Ptr("registration.all"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful registration operations (creations updates queries and deletions). "), // DisplayName: to.Ptr("Registration Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("registration.create"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful registration creations."), // DisplayName: to.Ptr("Registration Create Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("registration.update"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful registration updates."), // DisplayName: to.Ptr("Registration Update Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("registration.get"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful registration queries."), // DisplayName: to.Ptr("Registration Read Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("registration.delete"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful registration deletions."), // DisplayName: to.Ptr("Registration Delete Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("incoming"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful send API calls. "), // DisplayName: to.Ptr("Incoming Messages"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("incoming.scheduled"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Scheduled Push Notifications Sent"), // DisplayName: to.Ptr("Scheduled Push Notifications Sent"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("incoming.scheduled.cancel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Scheduled Push Notifications Cancelled"), // DisplayName: to.Ptr("Scheduled Push Notifications Cancelled"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("scheduled.pending"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Pending Scheduled Notifications"), // DisplayName: to.Ptr("Pending Scheduled Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("installation.all"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Installation Management Operations"), // DisplayName: to.Ptr("Installation Management Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("installation.get"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Get Installation Operations"), // DisplayName: to.Ptr("Get Installation Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("installation.upsert"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Create or Update Installation Operations"), // DisplayName: to.Ptr("Create or Update Installation Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("installation.patch"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Patch Installation Operations"), // DisplayName: to.Ptr("Patch Installation Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("installation.delete"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Delete Installation Operations"), // DisplayName: to.Ptr("Delete Installation Operations"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.allpns.success"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful notifications."), // DisplayName: to.Ptr("Successful notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.allpns.invalidpayload"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the PNS returned a bad payload error."), // DisplayName: to.Ptr("Payload Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.allpns.pnserror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because there was a problem communicating with the PNS (excludes authentication problems)."), // DisplayName: to.Ptr("External Notification System Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.allpns.channelerror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the channel was invalid not associated with the correct app throttled or expired."), // DisplayName: to.Ptr("Channel Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.allpns.badorexpiredchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the channel/token/registrationId in the registration was expired or invalid."), // DisplayName: to.Ptr("Bad or Expired Channel Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.success"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful notifications."), // DisplayName: to.Ptr("WNS Successful Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.invalidcredentials"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the PNS did not accept the provided credentials or the credentials are blocked. (Windows Live does not recognize the credentials)."), // DisplayName: to.Ptr("WNS Authorization Errors (Invalid Credentials)"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.badchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the ChannelURI in the registration was not recognized (WNS status: 404 not found)."), // DisplayName: to.Ptr("WNS Bad Channel Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.expiredchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the ChannelURI is expired (WNS status: 410 Gone)."), // DisplayName: to.Ptr("WNS Expired Channel Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.throttled"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because WNS is throttling this app (WNS status: 406 Not Acceptable)."), // DisplayName: to.Ptr("WNS Throttled Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.tokenproviderunreachable"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Windows Live is not reachable."), // DisplayName: to.Ptr("WNS Authorization Errors (Unreachable)"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.invalidtoken"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The token provided to WNS is not valid (WNS status: 401 Unauthorized)."), // DisplayName: to.Ptr("WNS Authorization Errors (Invalid Token)"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.wrongtoken"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The token provided to WNS is valid but for another application (WNS status: 403 Forbidden). This can happen if the ChannelURI in the registration is associated with another app. Check that the client app is associated with the same app whose credentials are in the notification hub."), // DisplayName: to.Ptr("WNS Authorization Errors (Wrong Token)"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.invalidnotificationformat"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The format of the notification is invalid (WNS status: 400). Note that WNS does not reject all invalid payloads."), // DisplayName: to.Ptr("WNS Invalid Notification Format"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.invalidnotificationsize"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The notification payload is too large (WNS status: 413)."), // DisplayName: to.Ptr("WNS Invalid Notification Size Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.channelthrottled"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The notification was dropped because the ChannelURI in the registration is throttled (WNS response header: X-WNS-NotificationStatus:channelThrottled)."), // DisplayName: to.Ptr("WNS Channel Throttled"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.channeldisconnected"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The notification was dropped because the ChannelURI in the registration is throttled (WNS response header: X-WNS-DeviceConnectionStatus: disconnected)."), // DisplayName: to.Ptr("WNS Channel Disconnected"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.dropped"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The notification was dropped because the ChannelURI in the registration is throttled (X-WNS-NotificationStatus: dropped but not X-WNS-DeviceConnectionStatus: disconnected)."), // DisplayName: to.Ptr("WNS Dropped Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.pnserror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Notification not delivered because of errors communicating with WNS."), // DisplayName: to.Ptr("WNS Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.wns.authenticationerror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Notification not delivered because of errors communicating with Windows Live invalid credentials or wrong token."), // DisplayName: to.Ptr("WNS Authentication Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.apns.success"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful notifications."), // DisplayName: to.Ptr("APNS Successful Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.apns.invalidcredentials"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the PNS did not accept the provided credentials or the credentials are blocked."), // DisplayName: to.Ptr("APNS Authorization Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.apns.badchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the token is invalid (APNS status code: 8)."), // DisplayName: to.Ptr("APNS Bad Channel Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.apns.expiredchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of token that were invalidated by the APNS feedback channel."), // DisplayName: to.Ptr("APNS Expired Channel Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.apns.invalidnotificationsize"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the payload was too large (APNS status code: 7)."), // DisplayName: to.Ptr("APNS Invalid Notification Size Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.apns.pnserror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because of errors communicating with APNS."), // DisplayName: to.Ptr("APNS Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.success"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful notifications."), // DisplayName: to.Ptr("GCM Successful Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.invalidcredentials"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the PNS did not accept the provided credentials or the credentials are blocked."), // DisplayName: to.Ptr("GCM Authorization Errors (Invalid Credentials)"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.badchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the registrationId in the registration was not recognized (GCM result: Invalid Registration)."), // DisplayName: to.Ptr("GCM Bad Channel Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.expiredchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the registrationId in the registration was expired (GCM result: NotRegistered)."), // DisplayName: to.Ptr("GCM Expired Channel Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.throttled"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because GCM throttled this app (GCM status code: 501-599 or result:Unavailable)."), // DisplayName: to.Ptr("GCM Throttled Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.invalidnotificationformat"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the payload was not formatted correctly (GCM result: InvalidDataKey or InvalidTtl)."), // DisplayName: to.Ptr("GCM Invalid Notification Format"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.invalidnotificationsize"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the payload was too large (GCM result: MessageTooBig)."), // DisplayName: to.Ptr("GCM Invalid Notification Size Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.wrongchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the registrationId in the registration is not associated to the current app (GCM result: InvalidPackageName)."), // DisplayName: to.Ptr("GCM Wrong Channel Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.pnserror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because of errors communicating with GCM."), // DisplayName: to.Ptr("GCM Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.gcm.authenticationerror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the PNS did not accept the provided credentials the credentials are blocked or the SenderId is not correctly configured in the app (GCM result: MismatchedSenderId)."), // DisplayName: to.Ptr("GCM Authentication Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.success"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of all successful notifications."), // DisplayName: to.Ptr("MPNS Successful Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.invalidcredentials"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the PNS did not accept the provided credentials or the credentials are blocked."), // DisplayName: to.Ptr("MPNS Invalid Credentials"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.badchannel"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the ChannelURI in the registration was not recognized (MPNS status: 404 not found)."), // DisplayName: to.Ptr("MPNS Bad Channel Error"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.throttled"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because MPNS is throttling this app (WNS MPNS: 406 Not Acceptable)."), // DisplayName: to.Ptr("MPNS Throttled Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.invalidnotificationformat"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the payload of the notification was too large."), // DisplayName: to.Ptr("MPNS Invalid Notification Format"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.channeldisconnected"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the ChannelURI in the registration was disconnected (MPNS status: 412 not found)."), // DisplayName: to.Ptr("MPNS Channel Disconnected"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.dropped"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that were dropped by MPNS (MPNS response header: X-NotificationStatus: QueueFull or Suppressed)."), // DisplayName: to.Ptr("MPNS Dropped Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.pnserror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because of errors communicating with MPNS."), // DisplayName: to.Ptr("MPNS Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("outgoing.mpns.authenticationerror"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("The count of pushes that failed because the PNS did not accept the provided credentials or the credentials are blocked."), // DisplayName: to.Ptr("MPNS Authentication Errors"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("notificationhub.pushes"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("All outgoing notifications of the notification hub"), // DisplayName: to.Ptr("All Outgoing Notifications"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("incoming.all.requests"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Total incoming requests for a notification hub"), // DisplayName: to.Ptr("All Incoming Requests"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }, // { // Name: to.Ptr("incoming.all.failedrequests"), // AggregationType: to.Ptr("Total"), // Availabilities: []*armnotificationhubs.Availability{ // { // BlobDuration: to.Ptr("P30D"), // TimeGrain: to.Ptr("PT1M"), // }}, // DisplayDescription: to.Ptr("Total incoming failed requests for a notification hub"), // DisplayName: to.Ptr("All Incoming Failed Requests"), // FillGapWithZero: to.Ptr(true), // Unit: to.Ptr("Count"), // }}, // }, // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnectionsApproval/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Approve Private Endpoint Connection"), // Operation: to.Ptr("Approve Private Endpoint Connection"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnectionProxies/validate/action"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Validate Private Endpoint Connection Proxy"), // Operation: to.Ptr("Validate Private Endpoint Connection Proxy"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection Proxy"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnectionProxies/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get Private Endpoint Connection Proxy"), // Operation: to.Ptr("Get Private Endpoint Connection Proxy"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection Proxy"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnectionProxies/write"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Create Private Endpoint Connection Proxy"), // Operation: to.Ptr("Create Private Endpoint Connection Proxy"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection Proxy"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnectionProxies/delete"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Delete Private Endpoint Connection Proxy"), // Operation: to.Ptr("Delete Private Endpoint Connection Proxy"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection Proxy"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnectionProxies/operationstatus/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get the status of an asynchronous private endpoint operation"), // Operation: to.Ptr("Private endpoint operation status"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection Proxy"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnections/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Get Private Endpoint Connection"), // Operation: to.Ptr("Get Private Endpoint Connection"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnections/write"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Create or Update Private Endpoint Connection"), // Operation: to.Ptr("Create or Update Private Endpoint Connection"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnections/delete"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Removes Private Endpoint Connection"), // Operation: to.Ptr("Removes Private Endpoint Connection"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnections/operationstatus/read"), // Display: &armnotificationhubs.OperationDisplay{ // Description: to.Ptr("Removes Private Endpoint Connection"), // Operation: to.Ptr("Removes Private Endpoint Connection"), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Private Endpoint Connection"), // }, // }}, // } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // Result of the request to list NotificationHubs operations. It contains // a list of operations and a URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PnsCredentials ¶
type PnsCredentials struct { // Description of a NotificationHub AdmCredential. AdmCredential *AdmCredential // Description of a NotificationHub ApnsCredential. ApnsCredential *ApnsCredential // Description of a NotificationHub BaiduCredential. BaiduCredential *BaiduCredential // Description of a NotificationHub BrowserCredential. BrowserCredential *BrowserCredential // Description of a NotificationHub FcmV1Credential. FcmV1Credential *FcmV1Credential // Description of a NotificationHub GcmCredential. GCMCredential *GCMCredential // Description of a NotificationHub MpnsCredential. MpnsCredential *MpnsCredential // Description of a NotificationHub WnsCredential. WnsCredential *WnsCredential // Description of a NotificationHub XiaomiCredential. XiaomiCredential *XiaomiCredential }
PnsCredentials - Collection of Notification Hub or Notification Hub Namespace PNS credentials.
func (PnsCredentials) MarshalJSON ¶
func (p PnsCredentials) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PnsCredentials.
func (*PnsCredentials) UnmarshalJSON ¶
func (p *PnsCredentials) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PnsCredentials.
type PnsCredentialsResource ¶
type PnsCredentialsResource struct { // Deprecated - only for compatibility. Location *string // Collection of Notification Hub or Notification Hub Namespace PNS credentials. Properties *PnsCredentials // Deprecated - only for compatibility. 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 }
PnsCredentialsResource - Description of a NotificationHub PNS Credentials. This is a response of the POST requests that return namespace or hubs PNS credentials.
func (PnsCredentialsResource) MarshalJSON ¶
func (p PnsCredentialsResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PnsCredentialsResource.
func (*PnsCredentialsResource) UnmarshalJSON ¶
func (p *PnsCredentialsResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PnsCredentialsResource.
type PolicyKeyResource ¶
type PolicyKeyResource struct { // REQUIRED; Type of Shared Access Policy Key (primary or secondary). PolicyKey *PolicyKeyType }
PolicyKeyResource - Namespace / NotificationHub Regenerate Keys request.
func (PolicyKeyResource) MarshalJSON ¶
func (p PolicyKeyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicyKeyResource.
func (*PolicyKeyResource) UnmarshalJSON ¶
func (p *PolicyKeyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicyKeyResource.
type PolicyKeyType ¶
type PolicyKeyType string
PolicyKeyType - Type of Shared Access Policy Key (primary or secondary).
const ( PolicyKeyTypePrimaryKey PolicyKeyType = "PrimaryKey" PolicyKeyTypeSecondaryKey PolicyKeyType = "SecondaryKey" )
func PossiblePolicyKeyTypeValues ¶
func PossiblePolicyKeyTypeValues() []PolicyKeyType
PossiblePolicyKeyTypeValues returns the possible values for the PolicyKeyType const type.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // Represents a Private Endpoint that is connected to Notification Hubs namespace using Private Endpoint Connection. PrivateEndpoint *RemotePrivateEndpointConnection // State of the Private Link Service connection. PrivateLinkServiceConnectionState *RemotePrivateLinkServiceConnectionState // State of Private Endpoint Connection. ProvisioningState *PrivateEndpointConnectionProvisioningState // READ-ONLY; List of group ids. For Notification Hubs, it always contains a single "namespace" element. GroupIDs []*string }
PrivateEndpointConnectionProperties - Private Endpoint Connection properties.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionProvisioningState ¶
type PrivateEndpointConnectionProvisioningState string
PrivateEndpointConnectionProvisioningState - State of Private Endpoint Connection.
const ( PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" PrivateEndpointConnectionProvisioningStateDeleted PrivateEndpointConnectionProvisioningState = "Deleted" PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" PrivateEndpointConnectionProvisioningStateDeletingByProxy PrivateEndpointConnectionProvisioningState = "DeletingByProxy" PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" PrivateEndpointConnectionProvisioningStateUnknown PrivateEndpointConnectionProvisioningState = "Unknown" PrivateEndpointConnectionProvisioningStateUpdating PrivateEndpointConnectionProvisioningState = "Updating" PrivateEndpointConnectionProvisioningStateUpdatingByProxy PrivateEndpointConnectionProvisioningState = "UpdatingByProxy" )
func PossiblePrivateEndpointConnectionProvisioningStateValues ¶
func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState
PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type.
type PrivateEndpointConnectionResource ¶
type PrivateEndpointConnectionResource struct { // Private Endpoint Connection properties. Properties *PrivateEndpointConnectionProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateEndpointConnectionResource - Represents a Private Endpoint Connection ARM resource - a sub-resource of Notification Hubs namespace.
func (PrivateEndpointConnectionResource) MarshalJSON ¶
func (p PrivateEndpointConnectionResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionResource.
func (*PrivateEndpointConnectionResource) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionResource.
type PrivateEndpointConnectionResourceListResult ¶
type PrivateEndpointConnectionResourceListResult struct { // READ-ONLY; Gets or sets link to the next set of results. NextLink *string // READ-ONLY; Gets or sets result of the List AuthorizationRules operation. Value []*PrivateEndpointConnectionResource }
PrivateEndpointConnectionResourceListResult - The response of the List Private Endpoint Connections operation.
func (PrivateEndpointConnectionResourceListResult) MarshalJSON ¶
func (p PrivateEndpointConnectionResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionResourceListResult.
func (*PrivateEndpointConnectionResourceListResult) UnmarshalJSON ¶
func (p *PrivateEndpointConnectionResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionResourceListResult.
type PrivateEndpointConnectionsClient ¶
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes the Private Endpoint Connection. This is a public API that can be called directly by Notification Hubs users. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- privateEndpointConnectionName - Private Endpoint Connection Name
- options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/PrivateEndpointConnectionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-ns.1fa229cd-bf3f-47f0-8c49-afb36723997e", 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 (*PrivateEndpointConnectionsClient) BeginUpdate ¶
func (client *PrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnectionResource, options *PrivateEndpointConnectionsClientBeginUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientUpdateResponse], error)
BeginUpdate - Approves or rejects Private Endpoint Connection. This is a public API that can be called directly by Notification Hubs users. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- privateEndpointConnectionName - Private Endpoint Connection Name
- parameters - Description of the Private Endpoint Connection resource.
- options - PrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/PrivateEndpointConnectionUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginUpdate(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-ns.1fa229cd-bf3f-47f0-8c49-afb36723997e", armnotificationhubs.PrivateEndpointConnectionResource{ Properties: &armnotificationhubs.PrivateEndpointConnectionProperties{ PrivateEndpoint: &armnotificationhubs.RemotePrivateEndpointConnection{}, PrivateLinkServiceConnectionState: &armnotificationhubs.RemotePrivateLinkServiceConnectionState{ Status: to.Ptr(armnotificationhubs.PrivateLinkConnectionStatusApproved), }, }, }, 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.PrivateEndpointConnectionResource = armnotificationhubs.PrivateEndpointConnectionResource{ // Name: to.Ptr("nh-sdk-ns.1fa229cd-bf3f-47f0-8c49-afb36723997e"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourcegroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/privateEndpointConnections/nh-sdk-ns.1fa229cd-bf3f-47f0-8c49-afb36723997e"), // Properties: &armnotificationhubs.PrivateEndpointConnectionProperties{ // GroupIDs: []*string{ // to.Ptr("namespace")}, // PrivateEndpoint: &armnotificationhubs.RemotePrivateEndpointConnection{ // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourcegroups/5ktrial/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint"), // }, // PrivateLinkServiceConnectionState: &armnotificationhubs.RemotePrivateLinkServiceConnectionState{ // ActionsRequired: to.Ptr("None"), // Status: to.Ptr(armnotificationhubs.PrivateLinkConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armnotificationhubs.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }
Output:
func (*PrivateEndpointConnectionsClient) Get ¶
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Returns a Private Endpoint Connection with a given name. This is a public API that can be called directly by Notification Hubs users. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- privateEndpointConnectionName - Private Endpoint Connection Name
- options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/PrivateEndpointConnectionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-ns.1fa229cd-bf3f-47f0-8c49-afb36723997e", 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.PrivateEndpointConnectionResource = armnotificationhubs.PrivateEndpointConnectionResource{ // Name: to.Ptr("nh-sdk-ns.4fdb3a25-664d-42f1-bde2-f8c2f8e0b3a1"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/privateEndpointConnections/nh-sdk-ns.4fdb3a25-664d-42f1-bde2-f8c2f8e0b3a1"), // Properties: &armnotificationhubs.PrivateEndpointConnectionProperties{ // GroupIDs: []*string{ // to.Ptr("namespace")}, // PrivateEndpoint: &armnotificationhubs.RemotePrivateEndpointConnection{ // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.Network/privateEndpoints/demo-private-endpoint"), // }, // PrivateLinkServiceConnectionState: &armnotificationhubs.RemotePrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // Status: to.Ptr(armnotificationhubs.PrivateLinkConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armnotificationhubs.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }
Output:
func (*PrivateEndpointConnectionsClient) GetGroupID ¶
func (client *PrivateEndpointConnectionsClient) GetGroupID(ctx context.Context, resourceGroupName string, namespaceName string, subResourceName string, options *PrivateEndpointConnectionsClientGetGroupIDOptions) (PrivateEndpointConnectionsClientGetGroupIDResponse, error)
GetGroupID - Even though this namespace requires subscription id, resource group and namespace name, it returns a constant payload (for a given namespacE) every time it's called. That's why we don't send it to the sibling RP, but process it directly in the scale unit that received the request. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- subResourceName - Name of the Private Link sub-resource. The only supported sub-resource is "namespace"
- options - PrivateEndpointConnectionsClientGetGroupIDOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetGroupID method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/PrivateLinkResourceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().GetGroupID(ctx, "5ktrial", "nh-sdk-ns", "namespace", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateLinkResource = armnotificationhubs.PrivateLinkResource{ // Name: to.Ptr("namespace"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/privateLinkResources"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/privateLinkResources/namespace"), // Properties: &armnotificationhubs.PrivateLinkResourceProperties{ // GroupID: to.Ptr("namespace"), // RequiredMembers: []*string{ // to.Ptr("namespace")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.servicebus.windows.net"), // to.Ptr("privatelink.notificationhub.windows.net")}, // }, // }
Output:
func (*PrivateEndpointConnectionsClient) NewListGroupIDsPager ¶
func (client *PrivateEndpointConnectionsClient) NewListGroupIDsPager(resourceGroupName string, namespaceName string, options *PrivateEndpointConnectionsClientListGroupIDsOptions) *runtime.Pager[PrivateEndpointConnectionsClientListGroupIDsResponse]
NewListGroupIDsPager - Even though this namespace requires subscription id, resource group and namespace name, it returns a constant payload (for a given namespacE) every time it's called. That's why we don't send it to the sibling RP, but process it directly in the scale unit that received the request.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- options - PrivateEndpointConnectionsClientListGroupIDsOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListGroupIDsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/PrivateLinkResourceList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListGroupIDsPager("5ktrial", "nh-sdk-ns", 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.PrivateLinkResourceListResult = armnotificationhubs.PrivateLinkResourceListResult{ // Value: []*armnotificationhubs.PrivateLinkResource{ // { // Name: to.Ptr("namespace"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/privateLinkResources"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/privateLinkResources/namespace"), // Properties: &armnotificationhubs.PrivateLinkResourceProperties{ // GroupID: to.Ptr("namespace"), // RequiredMembers: []*string{ // to.Ptr("namespace")}, // RequiredZoneNames: []*string{ // to.Ptr("privatelink.servicebus.windows.net"), // to.Ptr("privatelink.notificationhub.windows.net")}, // }, // }}, // } }
Output:
func (*PrivateEndpointConnectionsClient) NewListPager ¶
func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, namespaceName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse]
NewListPager - Returns all Private Endpoint Connections that belong to the given Notification Hubs namespace. This is a public API that can be called directly by Notification Hubs users.
Generated from API version 2023-10-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- namespaceName - Namespace name
- options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/85cfba195a19120f309bd292c4261aa53a586adb/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/preview/2023-10-01-preview/examples/Namespaces/PrivateEndpointConnectionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armnotificationhubs.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListPager("5ktrial", "nh-sdk-ns", 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.PrivateEndpointConnectionResourceListResult = armnotificationhubs.PrivateEndpointConnectionResourceListResult{ // Value: []*armnotificationhubs.PrivateEndpointConnectionResource{ // { // Name: to.Ptr("nh-sdk-ns.4fdb3a25-664d-42f1-bde2-f8c2f8e0b3a1"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces/PrivateEndpointConnections"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/privateEndpointConnections/nh-sdk-ns.4fdb3a25-664d-42f1-bde2-f8c2f8e0b3a1"), // Properties: &armnotificationhubs.PrivateEndpointConnectionProperties{ // GroupIDs: []*string{ // to.Ptr("namespace")}, // PrivateEndpoint: &armnotificationhubs.RemotePrivateEndpointConnection{ // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/5ktrial/providers/Microsoft.Network/privateEndpoints/demo-private-endpoint"), // }, // PrivateLinkServiceConnectionState: &armnotificationhubs.RemotePrivateLinkServiceConnectionState{ // Description: to.Ptr("Auto-Approved"), // Status: to.Ptr(armnotificationhubs.PrivateLinkConnectionStatusApproved), // }, // ProvisioningState: to.Ptr(armnotificationhubs.PrivateEndpointConnectionProvisioningStateSucceeded), // }, // }}, // } }
Output:
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientBeginUpdateOptions ¶
type PrivateEndpointConnectionsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginUpdate method.
type PrivateEndpointConnectionsClientDeleteResponse ¶
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
type PrivateEndpointConnectionsClientGetGroupIDOptions ¶
type PrivateEndpointConnectionsClientGetGroupIDOptions struct { }
PrivateEndpointConnectionsClientGetGroupIDOptions contains the optional parameters for the PrivateEndpointConnectionsClient.GetGroupID method.
type PrivateEndpointConnectionsClientGetGroupIDResponse ¶
type PrivateEndpointConnectionsClientGetGroupIDResponse struct { // A Private Link Arm Resource. PrivateLinkResource }
PrivateEndpointConnectionsClientGetGroupIDResponse contains the response from method PrivateEndpointConnectionsClient.GetGroupID.
type PrivateEndpointConnectionsClientGetOptions ¶
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶
type PrivateEndpointConnectionsClientGetResponse struct { // Represents a Private Endpoint Connection ARM resource - a sub-resource of Notification Hubs namespace. PrivateEndpointConnectionResource }
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListGroupIDsOptions ¶
type PrivateEndpointConnectionsClientListGroupIDsOptions struct { }
PrivateEndpointConnectionsClientListGroupIDsOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListGroupIDsPager method.
type PrivateEndpointConnectionsClientListGroupIDsResponse ¶
type PrivateEndpointConnectionsClientListGroupIDsResponse struct { // The response of the List Private Link Resources operation. PrivateLinkResourceListResult }
PrivateEndpointConnectionsClientListGroupIDsResponse contains the response from method PrivateEndpointConnectionsClient.NewListGroupIDsPager.
type PrivateEndpointConnectionsClientListOptions ¶
type PrivateEndpointConnectionsClientListOptions struct { }
PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager method.
type PrivateEndpointConnectionsClientListResponse ¶
type PrivateEndpointConnectionsClientListResponse struct { // The response of the List Private Endpoint Connections operation. PrivateEndpointConnectionResourceListResult }
PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager.
type PrivateEndpointConnectionsClientUpdateResponse ¶
type PrivateEndpointConnectionsClientUpdateResponse struct { // Represents a Private Endpoint Connection ARM resource - a sub-resource of Notification Hubs namespace. PrivateEndpointConnectionResource }
PrivateEndpointConnectionsClientUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginUpdate.
type PrivateLinkConnectionStatus ¶
type PrivateLinkConnectionStatus string
PrivateLinkConnectionStatus - State of Private Link Connection.
const ( PrivateLinkConnectionStatusApproved PrivateLinkConnectionStatus = "Approved" PrivateLinkConnectionStatusDisconnected PrivateLinkConnectionStatus = "Disconnected" PrivateLinkConnectionStatusPending PrivateLinkConnectionStatus = "Pending" PrivateLinkConnectionStatusRejected PrivateLinkConnectionStatus = "Rejected" )
func PossiblePrivateLinkConnectionStatusValues ¶
func PossiblePrivateLinkConnectionStatusValues() []PrivateLinkConnectionStatus
PossiblePrivateLinkConnectionStatusValues returns the possible values for the PrivateLinkConnectionStatus const type.
type PrivateLinkResource ¶
type PrivateLinkResource struct { // Represents properties of Private Link Resource. Properties *PrivateLinkResourceProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PrivateLinkResource - A Private Link Arm Resource.
func (PrivateLinkResource) MarshalJSON ¶
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // READ-ONLY; Gets or sets link to the next set of results. NextLink *string // READ-ONLY; Gets or sets result of the List AuthorizationRules operation. Value []*PrivateLinkResource }
PrivateLinkResourceListResult - The response of the List Private Link Resources operation.
func (PrivateLinkResourceListResult) MarshalJSON ¶
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // READ-ONLY; A Group Id for Private Link. For Notification Hubs, it is always set to "namespace". GroupID *string // READ-ONLY; Required members. For Notification Hubs, it's always a collection with a single "namespace" item. RequiredMembers []*string // READ-ONLY; Required DNS zone names. For Notification Hubs, it contains two CNames for Service Bus and Notification Hubs // zones. RequiredZoneNames []*string }
PrivateLinkResourceProperties - Represents properties of Private Link Resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkServiceConnection ¶
type PrivateLinkServiceConnection struct { // List of group ids. Always contains a single element - "namespace" - for Notification Hub Namespace. GroupIDs []*string // Name of the Private Link Service connection. Name *string // Request message provided by the user that created the connection. This is usually used when the connection requires manual // approval. RequestMessage *string }
PrivateLinkServiceConnection - A customer-visible sub-resource of Private Endpoint, which describe the connection between Private Endpoint and Notification Hubs namespace.
func (PrivateLinkServiceConnection) MarshalJSON ¶
func (p PrivateLinkServiceConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnection.
func (*PrivateLinkServiceConnection) UnmarshalJSON ¶
func (p *PrivateLinkServiceConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnection.
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 PublicInternetAuthorizationRule ¶
type PublicInternetAuthorizationRule struct { // REQUIRED; List of access rights. Rights []*AccessRights }
PublicInternetAuthorizationRule - A default (public Internet) network authorization rule, which contains rights if no other network rule matches.
func (PublicInternetAuthorizationRule) MarshalJSON ¶
func (p PublicInternetAuthorizationRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PublicInternetAuthorizationRule.
func (*PublicInternetAuthorizationRule) UnmarshalJSON ¶
func (p *PublicInternetAuthorizationRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PublicInternetAuthorizationRule.
type PublicNetworkAccess ¶
type PublicNetworkAccess string
PublicNetworkAccess - Type of public network access.
const ( PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" )
func PossiblePublicNetworkAccessValues ¶
func PossiblePublicNetworkAccessValues() []PublicNetworkAccess
PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type.
type RegistrationResult ¶
type RegistrationResult struct { // READ-ONLY; PNS type. ApplicationPlatform *string // READ-ONLY; Notification outcome. Outcome *string // READ-ONLY; PNS handle. PnsHandle *string // READ-ONLY; Registration id. RegistrationID *string }
RegistrationResult - Notification result for a single registration.
func (RegistrationResult) MarshalJSON ¶
func (r RegistrationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RegistrationResult.
func (*RegistrationResult) UnmarshalJSON ¶
func (r *RegistrationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RegistrationResult.
type RemotePrivateEndpointConnection ¶
type RemotePrivateEndpointConnection struct { // READ-ONLY; ARM resource ID of the Private Endpoint. This may belong to different subscription and resource group than a // Notification Hubs namespace. ID *string }
RemotePrivateEndpointConnection - Represents a Private Endpoint that is connected to Notification Hubs namespace using Private Endpoint Connection.
func (RemotePrivateEndpointConnection) MarshalJSON ¶
func (r RemotePrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RemotePrivateEndpointConnection.
func (*RemotePrivateEndpointConnection) UnmarshalJSON ¶
func (r *RemotePrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateEndpointConnection.
type RemotePrivateLinkServiceConnectionState ¶
type RemotePrivateLinkServiceConnectionState struct { // State of Private Link Connection. Status *PrivateLinkConnectionStatus // READ-ONLY; Human-friendly description of required actions. ActionsRequired *string // READ-ONLY; Human-friendly description. Description *string }
RemotePrivateLinkServiceConnectionState - State of the Private Link Service connection.
func (RemotePrivateLinkServiceConnectionState) MarshalJSON ¶
func (r RemotePrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RemotePrivateLinkServiceConnectionState.
func (*RemotePrivateLinkServiceConnectionState) UnmarshalJSON ¶
func (r *RemotePrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RemotePrivateLinkServiceConnectionState.
type ReplicationRegion ¶
type ReplicationRegion string
ReplicationRegion - Allowed replication region
const ( ReplicationRegionAustraliaEast ReplicationRegion = "AustraliaEast" ReplicationRegionBrazilSouth ReplicationRegion = "BrazilSouth" ReplicationRegionDefault ReplicationRegion = "Default" ReplicationRegionNone ReplicationRegion = "None" ReplicationRegionNorthEurope ReplicationRegion = "NorthEurope" ReplicationRegionSouthAfricaNorth ReplicationRegion = "SouthAfricaNorth" ReplicationRegionSouthEastAsia ReplicationRegion = "SouthEastAsia" ReplicationRegionWestUs2 ReplicationRegion = "WestUs2" )
func PossibleReplicationRegionValues ¶
func PossibleReplicationRegionValues() []ReplicationRegion
PossibleReplicationRegionValues returns the possible values for the ReplicationRegion const type.
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 ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceListKeys ¶
type ResourceListKeys struct { // READ-ONLY; Gets or sets keyName of the created AuthorizationRule KeyName *string // READ-ONLY; Gets or sets primaryConnectionString of the AuthorizationRule. PrimaryConnectionString *string // READ-ONLY; Gets or sets primaryKey of the created AuthorizationRule. PrimaryKey *string // READ-ONLY; Gets or sets secondaryConnectionString of the created AuthorizationRule SecondaryConnectionString *string // READ-ONLY; Gets or sets secondaryKey of the created AuthorizationRule SecondaryKey *string }
ResourceListKeys - Response for the POST request that returns Namespace or NotificationHub access keys (connection strings).
func (ResourceListKeys) MarshalJSON ¶
func (r ResourceListKeys) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceListKeys.
func (*ResourceListKeys) UnmarshalJSON ¶
func (r *ResourceListKeys) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceListKeys.
type SKU ¶
type SKU struct { // REQUIRED; Namespace SKU name. Name *SKUName // Gets or sets the capacity of the resource Capacity *int32 // Gets or sets the Sku Family Family *string // Gets or sets the Sku size Size *string // Gets or sets the tier of particular sku Tier *string }
SKU - The Sku description for a namespace
func (SKU) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUName ¶
type SKUName string
SKUName - Namespace SKU name.
func PossibleSKUNameValues ¶
func PossibleSKUNameValues() []SKUName
PossibleSKUNameValues returns the possible values for the SKUName const type.
type ServiceSpecification ¶
type ServiceSpecification struct { // READ-ONLY; Log specifications. LogSpecifications []*LogSpecification // READ-ONLY; Metric specification. MetricSpecifications []*MetricSpecification }
ServiceSpecification - Optional service specification used in Operations API.
func (ServiceSpecification) MarshalJSON ¶
func (s ServiceSpecification) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceSpecification.
func (*ServiceSpecification) UnmarshalJSON ¶
func (s *ServiceSpecification) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceSpecification.
type SharedAccessAuthorizationRuleListResult ¶
type SharedAccessAuthorizationRuleListResult struct { string Value []*SharedAccessAuthorizationRuleResource }NextLink *
SharedAccessAuthorizationRuleListResult - The response of the List Namespace operation.
func (SharedAccessAuthorizationRuleListResult) MarshalJSON ¶
func (s SharedAccessAuthorizationRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedAccessAuthorizationRuleListResult.
func (*SharedAccessAuthorizationRuleListResult) UnmarshalJSON ¶
func (s *SharedAccessAuthorizationRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessAuthorizationRuleListResult.
type SharedAccessAuthorizationRuleProperties ¶
type SharedAccessAuthorizationRuleProperties struct { AccessRights PrimaryKey *string SecondaryKey *string ClaimType *string ClaimValue *string CreatedTime *time.Time KeyName *string ModifiedTime *time.Time Revision *int32 }Rights []*
SharedAccessAuthorizationRuleProperties - SharedAccessAuthorizationRule properties.
func (SharedAccessAuthorizationRuleProperties) MarshalJSON ¶
func (s SharedAccessAuthorizationRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedAccessAuthorizationRuleProperties.
func (*SharedAccessAuthorizationRuleProperties) UnmarshalJSON ¶
func (s *SharedAccessAuthorizationRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessAuthorizationRuleProperties.
type SharedAccessAuthorizationRuleResource ¶
type SharedAccessAuthorizationRuleResource struct { string Properties *SharedAccessAuthorizationRuleProperties Tags map[string]*string ID *string Name *string SystemData *SystemData Type *string }Location *
SharedAccessAuthorizationRuleResource - Response for POST requests that return single SharedAccessAuthorizationRule.
func (SharedAccessAuthorizationRuleResource) MarshalJSON ¶
func (s SharedAccessAuthorizationRuleResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedAccessAuthorizationRuleResource.
func (*SharedAccessAuthorizationRuleResource) UnmarshalJSON ¶
func (s *SharedAccessAuthorizationRuleResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessAuthorizationRuleResource.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type WnsCredential ¶
type WnsCredential struct { // REQUIRED; Description of a NotificationHub WnsCredential. Properties *WnsCredentialProperties }
WnsCredential - Description of a NotificationHub WnsCredential.
func (WnsCredential) MarshalJSON ¶
func (w WnsCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WnsCredential.
func (*WnsCredential) UnmarshalJSON ¶
func (w *WnsCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WnsCredential.
type WnsCredentialProperties ¶
type WnsCredentialProperties struct { // Ges or sets the WNS Certificate Key. CertificateKey *string // Gets or sets the package ID for this credential. PackageSid *string // Gets or sets the secret key. SecretKey *string // Gets or sets the Windows Live endpoint. WindowsLiveEndpoint *string // Gets or sets the WNS Certificate. WnsCertificate *string }
WnsCredentialProperties - Description of a NotificationHub WnsCredential.
func (WnsCredentialProperties) MarshalJSON ¶
func (w WnsCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WnsCredentialProperties.
func (*WnsCredentialProperties) UnmarshalJSON ¶
func (w *WnsCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WnsCredentialProperties.
type XiaomiCredential ¶
type XiaomiCredential struct { // REQUIRED; Description of a NotificationHub XiaomiCredentialProperties. Properties *XiaomiCredentialProperties }
XiaomiCredential - Description of a NotificationHub XiaomiCredential.
func (XiaomiCredential) MarshalJSON ¶
func (x XiaomiCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type XiaomiCredential.
func (*XiaomiCredential) UnmarshalJSON ¶
func (x *XiaomiCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type XiaomiCredential.
type XiaomiCredentialProperties ¶
type XiaomiCredentialProperties struct { // Gets or sets app secret. AppSecret *string // Gets or sets xiaomi service endpoint. Endpoint *string }
XiaomiCredentialProperties - Description of a NotificationHub XiaomiCredentialProperties.
func (XiaomiCredentialProperties) MarshalJSON ¶
func (x XiaomiCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type XiaomiCredentialProperties.
func (*XiaomiCredentialProperties) UnmarshalJSON ¶
func (x *XiaomiCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type XiaomiCredentialProperties.
type ZoneRedundancyPreference ¶
type ZoneRedundancyPreference string
ZoneRedundancyPreference - Namespace SKU name.
const ( ZoneRedundancyPreferenceDisabled ZoneRedundancyPreference = "Disabled" ZoneRedundancyPreferenceEnabled ZoneRedundancyPreference = "Enabled" )
func PossibleZoneRedundancyPreferenceValues ¶
func PossibleZoneRedundancyPreferenceValues() []ZoneRedundancyPreference
PossibleZoneRedundancyPreferenceValues returns the possible values for the ZoneRedundancyPreference const type.