Documentation ¶
Index ¶
- type AccessRights
- type AdmCredential
- type AdmCredentialProperties
- type ApnsCredential
- type ApnsCredentialProperties
- type BaiduCredential
- type BaiduCredentialProperties
- 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) Patch(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientPatchResponse, error)
- func (client *Client) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, ...) (ClientRegenerateKeysResponse, 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 ClientPatchOptions
- type ClientPatchResponse
- type ClientRegenerateKeysOptions
- type ClientRegenerateKeysResponse
- type DebugSendResponse
- type DebugSendResult
- type ErrorResponse
- type GCMCredential
- type GCMCredentialProperties
- type MpnsCredential
- type MpnsCredentialProperties
- type NamespaceCreateOrUpdateParameters
- type NamespaceListResult
- type NamespacePatchParameters
- type NamespaceProperties
- type NamespaceResource
- type NamespaceType
- type NamespacesClient
- func (client *NamespacesClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, ...) (*runtime.Poller[NamespacesClientDeleteResponse], error)
- func (client *NamespacesClient) CheckAvailability(ctx context.Context, parameters CheckAvailabilityParameters, ...) (NamespacesClientCheckAvailabilityResponse, error)
- func (client *NamespacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientCreateOrUpdateResponse, error)
- func (client *NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientCreateOrUpdateAuthorizationRuleResponse, 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) 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) Patch(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientPatchResponse, error)
- func (client *NamespacesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, ...) (NamespacesClientRegenerateKeysResponse, error)
- type NamespacesClientBeginDeleteOptions
- type NamespacesClientCheckAvailabilityOptions
- type NamespacesClientCheckAvailabilityResponse
- type NamespacesClientCreateOrUpdateAuthorizationRuleOptions
- type NamespacesClientCreateOrUpdateAuthorizationRuleResponse
- type NamespacesClientCreateOrUpdateOptions
- type NamespacesClientCreateOrUpdateResponse
- type NamespacesClientDeleteAuthorizationRuleOptions
- type NamespacesClientDeleteAuthorizationRuleResponse
- type NamespacesClientDeleteResponse
- type NamespacesClientGetAuthorizationRuleOptions
- type NamespacesClientGetAuthorizationRuleResponse
- type NamespacesClientGetOptions
- type NamespacesClientGetResponse
- type NamespacesClientListAllOptions
- type NamespacesClientListAllResponse
- type NamespacesClientListAuthorizationRulesOptions
- type NamespacesClientListAuthorizationRulesResponse
- type NamespacesClientListKeysOptions
- type NamespacesClientListKeysResponse
- type NamespacesClientListOptions
- type NamespacesClientListResponse
- type NamespacesClientPatchOptions
- type NamespacesClientPatchResponse
- type NamespacesClientRegenerateKeysOptions
- type NamespacesClientRegenerateKeysResponse
- type NotificationHubCreateOrUpdateParameters
- type NotificationHubListResult
- type NotificationHubPatchParameters
- type NotificationHubProperties
- type NotificationHubResource
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PnsCredentialsProperties
- type PnsCredentialsResource
- type PolicykeyResource
- type Resource
- type ResourceListKeys
- type SKU
- type SKUName
- type SharedAccessAuthorizationRuleCreateOrUpdateParameters
- type SharedAccessAuthorizationRuleListResult
- type SharedAccessAuthorizationRuleProperties
- type SharedAccessAuthorizationRuleResource
- type SubResource
- type WnsCredential
- type WnsCredentialProperties
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.Patch
- Client.RegenerateKeys
- NamespacesClient.BeginDelete
- NamespacesClient.CheckAvailability
- NamespacesClient.CreateOrUpdate
- NamespacesClient.CreateOrUpdateAuthorizationRule
- NamespacesClient.DeleteAuthorizationRule
- NamespacesClient.Get
- NamespacesClient.GetAuthorizationRule
- NamespacesClient.ListKeys
- NamespacesClient.NewListAllPager
- NamespacesClient.NewListAuthorizationRulesPager
- NamespacesClient.NewListPager
- NamespacesClient.Patch
- NamespacesClient.RegenerateKeys
- OperationsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRights ¶
type AccessRights string
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 { // Properties of NotificationHub AdmCredential. Properties *AdmCredentialProperties }
AdmCredential - Description of a NotificationHub AdmCredential.
func (AdmCredential) MarshalJSON ¶ added in v1.1.0
func (a AdmCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdmCredential.
func (*AdmCredential) UnmarshalJSON ¶ added in v1.1.0
func (a *AdmCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdmCredential.
type AdmCredentialProperties ¶
type AdmCredentialProperties struct { // The URL of the authorization token. AuthTokenURL *string // The client identifier. ClientID *string // The credential secret access key. ClientSecret *string }
AdmCredentialProperties - Description of a NotificationHub AdmCredential.
func (AdmCredentialProperties) MarshalJSON ¶ added in v1.1.0
func (a AdmCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdmCredentialProperties.
func (*AdmCredentialProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *AdmCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdmCredentialProperties.
type ApnsCredential ¶
type ApnsCredential struct { // Properties of NotificationHub ApnsCredential. Properties *ApnsCredentialProperties }
ApnsCredential - Description of a NotificationHub ApnsCredential.
func (ApnsCredential) MarshalJSON ¶ added in v1.1.0
func (a ApnsCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApnsCredential.
func (*ApnsCredential) UnmarshalJSON ¶ added in v1.1.0
func (a *ApnsCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApnsCredential.
type ApnsCredentialProperties ¶
type ApnsCredentialProperties struct { // The APNS certificate. Specify if using Certificate Authentication Mode. ApnsCertificate *string // The issuer (iss) registered claim key. The value is a 10-character TeamId, obtained from your developer account. Specify // if using Token Authentication Mode. AppID *string // The name of the application or BundleId. Specify if using Token Authentication Mode. AppName *string // The APNS certificate password if it exists. CertificateKey *string // The APNS endpoint of this credential. If using Certificate Authentication Mode and Sandbox specify 'gateway.sandbox.push.apple.com'. // If using Certificate Authentication Mode and Production specify // 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox specify 'https://api.development.push.apple.com:443/3/device'. // If using Token Authentication Mode and Production specify // 'https://api.push.apple.com:443/3/device'. Endpoint *string // A 10-character key identifier (kid) key, obtained from your developer account. Specify if using Token Authentication Mode. KeyID *string // The APNS certificate thumbprint. Specify if using Certificate Authentication Mode. Thumbprint *string // Provider Authentication Token, obtained through your developer account. Specify if using Token Authentication Mode. Token *string }
ApnsCredentialProperties - Description of a NotificationHub ApnsCredential. Note that there is no explicit switch between Certificate and Token Authentication Modes. The mode is determined based on the properties passed in.
func (ApnsCredentialProperties) MarshalJSON ¶ added in v1.1.0
func (a ApnsCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ApnsCredentialProperties.
func (*ApnsCredentialProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *ApnsCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ApnsCredentialProperties.
type BaiduCredential ¶
type BaiduCredential struct { // Properties of NotificationHub BaiduCredential. Properties *BaiduCredentialProperties }
BaiduCredential - Description of a NotificationHub BaiduCredential.
func (BaiduCredential) MarshalJSON ¶ added in v1.1.0
func (b BaiduCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BaiduCredential.
func (*BaiduCredential) UnmarshalJSON ¶ added in v1.1.0
func (b *BaiduCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BaiduCredential.
type BaiduCredentialProperties ¶
type BaiduCredentialProperties struct { // Baidu Api Key. BaiduAPIKey *string // Baidu Endpoint. BaiduEndPoint *string // Baidu Secret Key BaiduSecretKey *string }
BaiduCredentialProperties - Description of a NotificationHub BaiduCredential.
func (BaiduCredentialProperties) MarshalJSON ¶ added in v1.1.0
func (b BaiduCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BaiduCredentialProperties.
func (*BaiduCredentialProperties) UnmarshalJSON ¶ added in v1.1.0
func (b *BaiduCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BaiduCredentialProperties.
type CheckAvailabilityParameters ¶
type CheckAvailabilityParameters struct { // REQUIRED; Resource name Name *string // True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. IsAvailiable *bool // Resource location Location *string // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; 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 ¶ added in v1.1.0
func (c *CheckAvailabilityParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckAvailabilityParameters.
type CheckAvailabilityResult ¶
type CheckAvailabilityResult struct { // True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. IsAvailiable *bool // Resource location Location *string // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type 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 ¶ added in v1.1.0
func (c *CheckAvailabilityResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckAvailabilityResult.
type Client ¶ added in v0.3.0
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 ¶ added in v0.3.0
func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)
NewClient creates a new instance of Client with the specified values.
- subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*Client) CheckNotificationHubAvailability ¶ added in v0.3.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- parameters - The notificationHub name.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubCheckNameAvailability.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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/notificationHubs/checkNotificationHubAvailability"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourcegroups/5ktrial/providers/Microsoft.NotificationHubs/namespaces/locp-newns/CheckNotificationHubAvailability"), // Location: to.Ptr("West Europe"), // IsAvailiable: to.Ptr(true), // } }
Output:
func (*Client) CreateOrUpdate ¶ added in v0.3.0
func (client *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, parameters NotificationHubCreateOrUpdateParameters, 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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The notification hub name.
- parameters - Parameters supplied to the create/update a NotificationHub Resource.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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.NotificationHubCreateOrUpdateParameters{ 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("nh-sdk-hub"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/sdkresourceGroup/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub"), // Location: to.Ptr("eastus"), // Properties: &armnotificationhubs.NotificationHubProperties{ // AuthorizationRules: []*armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // }, // RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), // }, // } }
Output:
func (*Client) CreateOrUpdateAuthorizationRule ¶ added in v0.3.0
func (client *Client) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters, 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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The notification hub name.
- authorizationRuleName - Authorization Rule Name.
- parameters - The shared access authorization rule.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubAuthorizationRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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", "DefaultListenSharedAccessSignature", armnotificationhubs.SharedAccessAuthorizationRuleCreateOrUpdateParameters{ 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("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/nh-sdk-hub/AuthorizationRules/DefaultListenSharedAccessSignature"), // Location: to.Ptr("West Europe"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // ClaimType: to.Ptr("SharedAccessKey"), // ClaimValue: to.Ptr("None"), // CreatedTime: to.Ptr("2018-05-02T00:45:22.0150024Z"), // KeyName: to.Ptr("DefaultListenSharedAccessSignature"), // ModifiedTime: to.Ptr("2018-05-02T00:45:22.0150024Z"), // PrimaryKey: to.Ptr("#################################"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // SecondaryKey: to.Ptr("#################################"), // }, // } }
Output:
func (*Client) DebugSend ¶ added in v0.3.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubDebugSend.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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().DebugSend(ctx, "5ktrial", "nh-sdk-ns", "nh-sdk-hub", &armnotificationhubs.ClientDebugSendOptions{Parameters: map[string]any{ "data": map[string]any{ "message": "Hello", }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*Client) Delete ¶ added in v0.3.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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 ¶ added in v0.3.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubAuthorizationRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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 ¶ added in v0.3.0
func (client *Client) Get(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *ClientGetOptions) (ClientGetResponse, error)
Get - Lists the notification hubs associated with a namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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("nh-sdk-hub"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/sdkresourceGroup/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub"), // Location: to.Ptr("South Central US"), // Properties: &armnotificationhubs.NotificationHubProperties{ // AuthorizationRules: []*armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // }, // RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), // }, // } }
Output:
func (*Client) GetAuthorizationRule ¶ added in v0.3.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name
- notificationHubName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubAuthorizationRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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/nh-sdk-hub/AuthorizationRules/DefaultListenSharedAccessSignature"), // Location: to.Ptr("West Europe"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // ClaimType: to.Ptr("SharedAccessKey"), // ClaimValue: to.Ptr("None"), // CreatedTime: to.Ptr("2018-05-02T00:45:22.0150024Z"), // KeyName: to.Ptr("DefaultListenSharedAccessSignature"), // ModifiedTime: to.Ptr("2018-05-02T00:45:22.0150024Z"), // PrimaryKey: to.Ptr("#################################"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // SecondaryKey: to.Ptr("#################################"), // }, // } }
Output:
func (*Client) GetPnsCredentials ¶ added in v0.3.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubPnsCredentials.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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("nh-sdk-hub"), // 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/nh-sdk-hub/pnsCredentials"), // Location: to.Ptr("West Europe"), // Properties: &armnotificationhubs.PnsCredentialsProperties{ // MpnsCredential: &armnotificationhubs.MpnsCredential{ // Properties: &armnotificationhubs.MpnsCredentialProperties{ // Thumbprint: to.Ptr("#################################"), // }, // }, // }, // } }
Output:
func (*Client) ListKeys ¶ added in v0.3.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The notification hub name.
- authorizationRuleName - The connection string of the NotificationHub for the specified authorizationRule.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubAuthorizationRuleListKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-notificationHubs-2317"), // PrimaryKey: to.Ptr("############################################"), // SecondaryConnectionString: to.Ptr("Endpoint=sb://sdk-namespace-7982.servicebus.windows-int.net/;SharedAccessKeyName=sdk-AuthRules-5800;SharedAccessKey=############################################;EntityPath=sdk-notificationHubs-2317"), // SecondaryKey: to.Ptr("############################################"), // } }
Output:
func (*Client) NewListAuthorizationRulesPager ¶ added in v0.5.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name
- notificationHubName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubAuthorizationRuleListAll.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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/nh-sdk-hub/AuthorizationRules/DefaultListenSharedAccessSignature"), // Location: to.Ptr("West Europe"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // ClaimType: to.Ptr("SharedAccessKey"), // ClaimValue: to.Ptr("None"), // CreatedTime: to.Ptr("2018-05-02T00:45:22.0150024Z"), // KeyName: to.Ptr("DefaultListenSharedAccessSignature"), // ModifiedTime: to.Ptr("2018-05-02T00:45:22.0150024Z"), // PrimaryKey: to.Ptr("#################################"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen)}, // SecondaryKey: to.Ptr("#################################"), // }, // }, // { // 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/nh-sdk-hub/AuthorizationRules/DefaultFullSharedAccessSignature"), // Location: to.Ptr("West Europe"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // ClaimType: to.Ptr("SharedAccessKey"), // ClaimValue: to.Ptr("None"), // CreatedTime: to.Ptr("2018-05-02T00:45:22.0150024Z"), // KeyName: to.Ptr("DefaultFullSharedAccessSignature"), // ModifiedTime: to.Ptr("2018-05-02T00:45:22.0150024Z"), // PrimaryKey: to.Ptr("#################################"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // SecondaryKey: to.Ptr("#################################"), // }, // }}, // } } }
Output:
func (*Client) NewListPager ¶ added in v0.5.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubListByNameSpace.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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", 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("nh-sdk-hub"), // 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/nh-sdk-hub"), // Location: to.Ptr("South Central US"), // Properties: &armnotificationhubs.NotificationHubProperties{ // AuthorizationRules: []*armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // }, // RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), // }, // }}, // } } }
Output:
func (*Client) Patch ¶ added in v0.3.0
func (client *Client) Patch(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, options *ClientPatchOptions) (ClientPatchResponse, error)
Patch - Patch a NotificationHub in a namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The notification hub name.
- options - ClientPatchOptions contains the optional parameters for the Client.Patch method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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().Patch(ctx, "sdkresourceGroup", "nh-sdk-ns", "sdk-notificationHubs-8708", &armnotificationhubs.ClientPatchOptions{Parameters: &armnotificationhubs.NotificationHubPatchParameters{}}) 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("nh-sdk-hub"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/sdkresourceGroup/providers/Microsoft.NotificationHubs/namespaces/nh-sdk-ns/notificationHubs/nh-sdk-hub"), // Location: to.Ptr("South Central US"), // Properties: &armnotificationhubs.NotificationHubProperties{ // AuthorizationRules: []*armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // }, // RegistrationTTL: to.Ptr("10675199.02:48:05.4775807"), // }, // } }
Output:
func (*Client) RegenerateKeys ¶ added in v0.3.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- notificationHubName - The notification hub name.
- authorizationRuleName - The connection string of the NotificationHub for the specified authorizationRule.
- parameters - Parameters supplied to regenerate the NotificationHub Authorization Rule Key.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NotificationHubs/NotificationHubAuthorizationRuleRegenrateKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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("PrimaryKey"), }, 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.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=#################################"), // PrimaryKey: to.Ptr("#################################"), // SecondaryConnectionString: to.Ptr("Endpoint=sb://nh-sdk-ns.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=#################################"), // SecondaryKey: to.Ptr("#################################"), // } }
Output:
type ClientCheckNotificationHubAvailabilityOptions ¶ added in v0.3.0
type ClientCheckNotificationHubAvailabilityOptions struct { }
ClientCheckNotificationHubAvailabilityOptions contains the optional parameters for the Client.CheckNotificationHubAvailability method.
type ClientCheckNotificationHubAvailabilityResponse ¶ added in v0.3.0
type ClientCheckNotificationHubAvailabilityResponse struct { // Description of a CheckAvailability resource. CheckAvailabilityResult }
ClientCheckNotificationHubAvailabilityResponse contains the response from method Client.CheckNotificationHubAvailability.
type ClientCreateOrUpdateAuthorizationRuleOptions ¶ added in v0.3.0
type ClientCreateOrUpdateAuthorizationRuleOptions struct { }
ClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the Client.CreateOrUpdateAuthorizationRule method.
type ClientCreateOrUpdateAuthorizationRuleResponse ¶ added in v0.3.0
type ClientCreateOrUpdateAuthorizationRuleResponse struct { SharedAccessAuthorizationRuleResource }
ClientCreateOrUpdateAuthorizationRuleResponse contains the response from method Client.CreateOrUpdateAuthorizationRule.
type ClientCreateOrUpdateOptions ¶ added in v0.3.0
type ClientCreateOrUpdateOptions struct { }
ClientCreateOrUpdateOptions contains the optional parameters for the Client.CreateOrUpdate method.
type ClientCreateOrUpdateResponse ¶ added in v0.3.0
type ClientCreateOrUpdateResponse struct { // Description of a NotificationHub Resource. NotificationHubResource }
ClientCreateOrUpdateResponse contains the response from method Client.CreateOrUpdate.
type ClientDebugSendOptions ¶ added in v0.3.0
type ClientDebugSendOptions struct { // Debug send parameters Parameters any }
ClientDebugSendOptions contains the optional parameters for the Client.DebugSend method.
type ClientDebugSendResponse ¶ added in v0.3.0
type ClientDebugSendResponse struct { // Description of a NotificationHub Resource. DebugSendResponse }
ClientDebugSendResponse contains the response from method Client.DebugSend.
type ClientDeleteAuthorizationRuleOptions ¶ added in v0.3.0
type ClientDeleteAuthorizationRuleOptions struct { }
ClientDeleteAuthorizationRuleOptions contains the optional parameters for the Client.DeleteAuthorizationRule method.
type ClientDeleteAuthorizationRuleResponse ¶ added in v0.3.0
type ClientDeleteAuthorizationRuleResponse struct { }
ClientDeleteAuthorizationRuleResponse contains the response from method Client.DeleteAuthorizationRule.
type ClientDeleteOptions ¶ added in v0.3.0
type ClientDeleteOptions struct { }
ClientDeleteOptions contains the optional parameters for the Client.Delete method.
type ClientDeleteResponse ¶ added in v0.3.0
type ClientDeleteResponse struct { }
ClientDeleteResponse contains the response from method Client.Delete.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewClient ¶ added in v1.1.0
func (c *ClientFactory) NewClient() *Client
NewClient creates a new instance of Client.
func (*ClientFactory) NewNamespacesClient ¶ added in v1.1.0
func (c *ClientFactory) NewNamespacesClient() *NamespacesClient
NewNamespacesClient creates a new instance of NamespacesClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
type ClientGetAuthorizationRuleOptions ¶ added in v0.3.0
type ClientGetAuthorizationRuleOptions struct { }
ClientGetAuthorizationRuleOptions contains the optional parameters for the Client.GetAuthorizationRule method.
type ClientGetAuthorizationRuleResponse ¶ added in v0.3.0
type ClientGetAuthorizationRuleResponse struct { SharedAccessAuthorizationRuleResource }
ClientGetAuthorizationRuleResponse contains the response from method Client.GetAuthorizationRule.
type ClientGetOptions ¶ added in v0.3.0
type ClientGetOptions struct { }
ClientGetOptions contains the optional parameters for the Client.Get method.
type ClientGetPnsCredentialsOptions ¶ added in v0.3.0
type ClientGetPnsCredentialsOptions struct { }
ClientGetPnsCredentialsOptions contains the optional parameters for the Client.GetPnsCredentials method.
type ClientGetPnsCredentialsResponse ¶ added in v0.3.0
type ClientGetPnsCredentialsResponse struct { // Description of a NotificationHub PNS Credentials. PnsCredentialsResource }
ClientGetPnsCredentialsResponse contains the response from method Client.GetPnsCredentials.
type ClientGetResponse ¶ added in v0.3.0
type ClientGetResponse struct { // Description of a NotificationHub Resource. NotificationHubResource }
ClientGetResponse contains the response from method Client.Get.
type ClientListAuthorizationRulesOptions ¶ added in v0.3.0
type ClientListAuthorizationRulesOptions struct { }
ClientListAuthorizationRulesOptions contains the optional parameters for the Client.NewListAuthorizationRulesPager method.
type ClientListAuthorizationRulesResponse ¶ added in v0.3.0
type ClientListAuthorizationRulesResponse struct { SharedAccessAuthorizationRuleListResult }
ClientListAuthorizationRulesResponse contains the response from method Client.NewListAuthorizationRulesPager.
type ClientListKeysOptions ¶ added in v0.3.0
type ClientListKeysOptions struct { }
ClientListKeysOptions contains the optional parameters for the Client.ListKeys method.
type ClientListKeysResponse ¶ added in v0.3.0
type ClientListKeysResponse struct { // Namespace/NotificationHub Connection String ResourceListKeys }
ClientListKeysResponse contains the response from method Client.ListKeys.
type ClientListOptions ¶ added in v0.3.0
type ClientListOptions struct { }
ClientListOptions contains the optional parameters for the Client.NewListPager method.
type ClientListResponse ¶ added in v0.3.0
type ClientListResponse struct { // The response of the List NotificationHub operation. NotificationHubListResult }
ClientListResponse contains the response from method Client.NewListPager.
type ClientPatchOptions ¶ added in v0.3.0
type ClientPatchOptions struct { // Parameters supplied to patch a NotificationHub Resource. Parameters *NotificationHubPatchParameters }
ClientPatchOptions contains the optional parameters for the Client.Patch method.
type ClientPatchResponse ¶ added in v0.3.0
type ClientPatchResponse struct { // Description of a NotificationHub Resource. NotificationHubResource }
ClientPatchResponse contains the response from method Client.Patch.
type ClientRegenerateKeysOptions ¶ added in v0.3.0
type ClientRegenerateKeysOptions struct { }
ClientRegenerateKeysOptions contains the optional parameters for the Client.RegenerateKeys method.
type ClientRegenerateKeysResponse ¶ added in v0.3.0
type ClientRegenerateKeysResponse struct { // Namespace/NotificationHub Connection String ResourceListKeys }
ClientRegenerateKeysResponse contains the response from method Client.RegenerateKeys.
type DebugSendResponse ¶
type DebugSendResponse struct { // Resource location Location *string // Properties of the NotificationHub. Properties *DebugSendResult // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type 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 ¶ added in v1.1.0
func (d *DebugSendResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DebugSendResponse.
type DebugSendResult ¶
type DebugSendResult struct { // send failure Failure *float32 // actual failure description Results any // successful send Success *float32 }
func (DebugSendResult) MarshalJSON ¶ added in v1.1.0
func (d DebugSendResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DebugSendResult.
func (*DebugSendResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DebugSendResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DebugSendResult.
type ErrorResponse ¶
type ErrorResponse struct { // Error code. Code *string // Error message indicating why the operation failed. Message *string }
ErrorResponse - Error response indicates NotificationHubs service is not able to process the incoming request. The reason is provided in the error message.
func (ErrorResponse) MarshalJSON ¶ added in v1.1.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v1.1.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type GCMCredential ¶
type GCMCredential struct { // Properties of NotificationHub GcmCredential. Properties *GCMCredentialProperties }
GCMCredential - Description of a NotificationHub GcmCredential.
func (GCMCredential) MarshalJSON ¶ added in v1.1.0
func (g GCMCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GCMCredential.
func (*GCMCredential) UnmarshalJSON ¶ added in v1.1.0
func (g *GCMCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GCMCredential.
type GCMCredentialProperties ¶
type GCMCredentialProperties struct { // The FCM legacy endpoint. Default value is 'https://fcm.googleapis.com/fcm/send' GCMEndpoint *string // The Google API key. GoogleAPIKey *string }
GCMCredentialProperties - Description of a NotificationHub GcmCredential.
func (GCMCredentialProperties) MarshalJSON ¶ added in v1.1.0
func (g GCMCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GCMCredentialProperties.
func (*GCMCredentialProperties) UnmarshalJSON ¶ added in v1.1.0
func (g *GCMCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GCMCredentialProperties.
type MpnsCredential ¶
type MpnsCredential struct { // Properties of NotificationHub MpnsCredential. Properties *MpnsCredentialProperties }
MpnsCredential - Description of a NotificationHub MpnsCredential.
func (MpnsCredential) MarshalJSON ¶ added in v1.1.0
func (m MpnsCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MpnsCredential.
func (*MpnsCredential) UnmarshalJSON ¶ added in v1.1.0
func (m *MpnsCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MpnsCredential.
type MpnsCredentialProperties ¶
type MpnsCredentialProperties struct { // The certificate key for this credential. CertificateKey *string // The MPNS certificate. MpnsCertificate *string // The MPNS certificate Thumbprint Thumbprint *string }
MpnsCredentialProperties - Description of a NotificationHub MpnsCredential.
func (MpnsCredentialProperties) MarshalJSON ¶ added in v1.1.0
func (m MpnsCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MpnsCredentialProperties.
func (*MpnsCredentialProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *MpnsCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MpnsCredentialProperties.
type NamespaceCreateOrUpdateParameters ¶
type NamespaceCreateOrUpdateParameters struct { // Resource location Location *string // Properties of the Namespace. Properties *NamespaceProperties // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type Type *string }
NamespaceCreateOrUpdateParameters - Parameters supplied to the CreateOrUpdate Namespace operation.
func (NamespaceCreateOrUpdateParameters) MarshalJSON ¶
func (n NamespaceCreateOrUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamespaceCreateOrUpdateParameters.
func (*NamespaceCreateOrUpdateParameters) UnmarshalJSON ¶ added in v1.1.0
func (n *NamespaceCreateOrUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceCreateOrUpdateParameters.
type NamespaceListResult ¶
type NamespaceListResult struct { // Link to the next set of results. Not empty if Value contains incomplete list of Namespaces NextLink *string // Result of the List Namespace 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 ¶ added in v1.1.0
func (n *NamespaceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceListResult.
type NamespacePatchParameters ¶
type NamespacePatchParameters struct { // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string }
NamespacePatchParameters - Parameters supplied to the Patch Namespace operation.
func (NamespacePatchParameters) MarshalJSON ¶
func (n NamespacePatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamespacePatchParameters.
func (*NamespacePatchParameters) UnmarshalJSON ¶ added in v1.1.0
func (n *NamespacePatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespacePatchParameters.
type NamespaceProperties ¶
type NamespaceProperties struct { // The time the namespace was created. CreatedAt *time.Time // Whether or not the namespace is set as Critical. Critical *bool // Data center for the namespace DataCenter *string // Whether or not the namespace is currently enabled. Enabled *bool // The name of the namespace. Name *string // The namespace type. NamespaceType *NamespaceType // Provisioning state of the Namespace. ProvisioningState *string // Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia // East, Australia Southeast, Central US, East US, East US 2, West US, North // Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe Region *string // ScaleUnit where the namespace gets created ScaleUnit *string // Endpoint you can use to perform NotificationHub operations. ServiceBusEndpoint *string // Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting Status *string // The Id of the Azure subscription associated with the namespace. SubscriptionID *string // The time the namespace was updated. UpdatedAt *time.Time // READ-ONLY; Identifier for Azure Insights metrics MetricID *string }
NamespaceProperties - 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 { // Resource location Location *string // Properties of the Namespace. Properties *NamespaceProperties // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type Type *string }
NamespaceResource - Description of a Namespace resource.
func (NamespaceResource) MarshalJSON ¶
func (n NamespaceResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NamespaceResource.
func (*NamespaceResource) UnmarshalJSON ¶ added in v1.1.0
func (n *NamespaceResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceResource.
type NamespaceType ¶
type NamespaceType string
NamespaceType - The namespace type.
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 - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*NamespacesClient) BeginDelete ¶
func (client *NamespacesClient) BeginDelete(ctx context.Context, resourceGroupName string, namespaceName string, options *NamespacesClientBeginDeleteOptions) (*runtime.Poller[NamespacesClientDeleteResponse], error)
BeginDelete - 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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- options - NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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().BeginDelete(ctx, "5ktrial", "nh-sdk-ns", 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 (*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 2017-04-01
- parameters - The namespace name.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceCheckNameAvailability.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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("mytestnamespace"), // Type: to.Ptr("Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/providers/Microsoft.NotificationHubs/CheckNamespaceAvailability"), // Location: to.Ptr("West Europe"), // IsAvailiable: to.Ptr(false), // } }
Output:
func (*NamespacesClient) CreateOrUpdate ¶
func (client *NamespacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters, options *NamespacesClientCreateOrUpdateOptions) (NamespacesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- parameters - Parameters supplied to create a Namespace Resource.
- options - NamespacesClientCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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().CreateOrUpdate(ctx, "5ktrial", "nh-sdk-ns", armnotificationhubs.NamespaceCreateOrUpdateParameters{ Location: to.Ptr("South Central US"), SKU: &armnotificationhubs.SKU{ Name: to.Ptr(armnotificationhubs.SKUNameStandard), Tier: to.Ptr("Standard"), }, Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, 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("sdk-Namespace-2924"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/ArunMonocle/providers/Microsoft.NotificationHubs/namespaces/sdk-Namespace-2924"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:sdk-namespace-2924"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()), // }, // } }
Output:
func (*NamespacesClient) CreateOrUpdateAuthorizationRule ¶
func (client *NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters, 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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- authorizationRuleName - Authorization Rule Name.
- parameters - The shared access authorization rule.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceAuthorizationRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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.SharedAccessAuthorizationRuleCreateOrUpdateParameters{ 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("sdk-AuthRules-1788"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces/AuthorizationRules"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/ArunMonocle/providers/Microsoft.NotificationHubs/namespaces/sdk-Namespace-6914/AuthorizationRules/sdk-AuthRules-1788"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // }, // } }
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceAuthorizationRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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 description for the specified namespace. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameBasic), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-02T00:44:56.580Z"); return t}()), // Critical: to.Ptr(false), // DataCenter: to.Ptr("SN1"), // Enabled: to.Ptr(true), // NamespaceType: to.Ptr(armnotificationhubs.NamespaceTypeNotificationHub), // ProvisioningState: to.Ptr("Succeeded"), // ScaleUnit: to.Ptr("SN1-001"), // ServiceBusEndpoint: to.Ptr("https://nh-sdk-ns.servicebus.windows.net:443/"), // Status: to.Ptr("Active"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-02T01:02:19.790Z"); return t}()), // }, // } }
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceAuthorizationRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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"), // Location: to.Ptr("South Central US"), // Properties: &armnotificationhubs.SharedAccessAuthorizationRuleProperties{ // ClaimType: to.Ptr("SharedAccessKey"), // ClaimValue: to.Ptr("None"), // CreatedTime: to.Ptr("2018-05-02T18:24:51.0690674Z"), // KeyName: to.Ptr("RootManageSharedAccessKey"), // ModifiedTime: to.Ptr("2018-05-02T18:24:51.0690674Z"), // PrimaryKey: to.Ptr("############################################"), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // SecondaryKey: 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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- authorizationRuleName - The connection string of the namespace for the specified authorizationRule.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceAuthorizationRuleListKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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 ¶ added in v0.5.0
func (client *NamespacesClient) NewListAllPager(options *NamespacesClientListAllOptions) *runtime.Pager[NamespacesClientListAllResponse]
NewListAllPager - Lists all the available namespaces within the subscription irrespective of the resourceGroups.
Generated from API version 2017-04-01
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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(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("NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:40:17.270Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-91f08e47-2b04-4943-b0cd-a5fb02b88f20"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-91f08e47-2b04-4943-b0cd-a5fb02b88f20.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T07:15:30.780Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-41dc63f4-0b08-4029-b3ef-535a131bfa65"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-41dc63f4-0b08-4029-b3ef-535a131bfa65"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:50:38.980Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-41dc63f4-0b08-4029-b3ef-535a131bfa65"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-41dc63f4-0b08-4029-b3ef-535a131bfa65.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:42:58.003Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-df52cf51-e831-4bf2-bd92-e9885f68a996"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-df52cf51-e831-4bf2-bd92-e9885f68a996"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:17:54.997Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-df52cf51-e831-4bf2-bd92-e9885f68a996"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-df52cf51-e831-4bf2-bd92-e9885f68a996.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:44:39.737Z"); return t}()), // }, // }, // { // Name: to.Ptr("rrama-ns2"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/sadfsadfsadf/providers/Microsoft.NotificationHubs/namespaces/rrama-ns2"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T04:14:00.013Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:rrama-ns2"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://rrama-ns2.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-03T22:53:32.927Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-20e57600-29d0-4035-ac85-74f4c54dcda1"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-20e57600-29d0-4035-ac85-74f4c54dcda1"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:30:49.160Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-20e57600-29d0-4035-ac85-74f4c54dcda1"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-20e57600-29d0-4035-ac85-74f4c54dcda1.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:17:58.483Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-3e538a1a-58fb-4315-b2ce-76f5c944114c"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-3e538a1a-58fb-4315-b2ce-76f5c944114c"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T18:07:30.050Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-3e538a1a-58fb-4315-b2ce-76f5c944114c"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-3e538a1a-58fb-4315-b2ce-76f5c944114c.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:42:57.747Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:01:58.730Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-4e1bfdf1-0cff-4e86-ae80-cdcac4873039"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-4e1bfdf1-0cff-4e86-ae80-cdcac4873039.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T03:02:59.800Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:22:45.327Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-6b90b7f3-7aa0-48c9-bc30-b299dcb66c03.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:08:01.207Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-c05e9df3-7737-44ee-a321-15f6e0545b97"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-c05e9df3-7737-44ee-a321-15f6e0545b97"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:29:19.750Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-c05e9df3-7737-44ee-a321-15f6e0545b97"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-c05e9df3-7737-44ee-a321-15f6e0545b97.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:10:35.527Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-dcb4152c-231b-4c16-a683-07cc6b38fa46"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-dcb4152c-231b-4c16-a683-07cc6b38fa46"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:34:35.363Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-dcb4152c-231b-4c16-a683-07cc6b38fa46"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-dcb4152c-231b-4c16-a683-07cc6b38fa46.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:33:00.957Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-f501f5e6-1f24-439b-8982-9af665156d40"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-f501f5e6-1f24-439b-8982-9af665156d40"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:25:55.707Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-f501f5e6-1f24-439b-8982-9af665156d40"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-f501f5e6-1f24-439b-8982-9af665156d40.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T07:42:59.687Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:32:08.227Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-fe2ed660-2cd6-46f2-a9c3-7e11551a1f30.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:32:57.770Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:54:05.103Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-8a5e3b4e-4e97-4d85-9083-cd33536c9d71"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-8a5e3b4e-4e97-4d85-9083-cd33536c9d71.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:43:50.313Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-6520cc09-01ac-40a3-bc09-c5c431116e92"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-6520cc09-01ac-40a3-bc09-c5c431116e92"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:49:59.243Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-6520cc09-01ac-40a3-bc09-c5c431116e92"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-6520cc09-01ac-40a3-bc09-c5c431116e92.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:15:36.950Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-bfba6d5c-a425-42d9-85db-0f4da770e29a"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-bfba6d5c-a425-42d9-85db-0f4da770e29a"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:23:32.083Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-bfba6d5c-a425-42d9-85db-0f4da770e29a"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-bfba6d5c-a425-42d9-85db-0f4da770e29a.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:02:57.433Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-43b136b4-8716-40b2-97c5-0d77cac0062c"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-43b136b4-8716-40b2-97c5-0d77cac0062c"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:14:50.577Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-43b136b4-8716-40b2-97c5-0d77cac0062c"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-43b136b4-8716-40b2-97c5-0d77cac0062c.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:23:01.067Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-7c0443de-5f88-450c-b574-83f60a097dd1"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-7c0443de-5f88-450c-b574-83f60a097dd1"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T04:07:15.397Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-7c0443de-5f88-450c-b574-83f60a097dd1"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-7c0443de-5f88-450c-b574-83f60a097dd1.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:03:03.097Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-62dd7753-a5f9-42fd-a354-ca38a4505d69"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-62dd7753-a5f9-42fd-a354-ca38a4505d69"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T01:33:50.450Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-62dd7753-a5f9-42fd-a354-ca38a4505d69"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-62dd7753-a5f9-42fd-a354-ca38a4505d69.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:35:33.053Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-ae18a18c-97ab-4089-965d-8acbf4794091"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-ae18a18c-97ab-4089-965d-8acbf4794091"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:43:36.517Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-ae18a18c-97ab-4089-965d-8acbf4794091"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-ae18a18c-97ab-4089-965d-8acbf4794091.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T12:40:30.587Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:46:03.773Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-8e3b56c1-0ee8-4e13-ae88-5cadf6e2ce11.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T04:43:54.560Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:59:12.100Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-7ffca4b4-4728-4fb0-b2d0-1e7c016e3a44.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:33:52.230Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-d9337efd-9b27-454c-b2a5-dcfea56920d9"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-d9337efd-9b27-454c-b2a5-dcfea56920d9"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:45:09.270Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-d9337efd-9b27-454c-b2a5-dcfea56920d9"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-d9337efd-9b27-454c-b2a5-dcfea56920d9.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:20:31.863Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T02:34:36.447Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-ad5ae732-abea-4e62-9de0-c90de0ddec0a"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-ad5ae732-abea-4e62-9de0-c90de0ddec0a.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:15:31.607Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-d447fb03-c7da-40fe-b5eb-14f36888837b"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-d447fb03-c7da-40fe-b5eb-14f36888837b"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:53:46.697Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-d447fb03-c7da-40fe-b5eb-14f36888837b"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-d447fb03-c7da-40fe-b5eb-14f36888837b.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T11:09:41.260Z"); return t}()), // }, // }, // { // Name: to.Ptr("ReproSB"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/RapscallionResources/providers/Microsoft.NotificationHubs/namespaces/ReproSB"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-27T19:29:34.523Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:reprosb"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://ReproSB.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-27T19:29:58.640Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-4c90097f-19a8-42e7-bb3c-4ac088994719"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-4c90097f-19a8-42e7-bb3c-4ac088994719"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:35:32.610Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-4c90097f-19a8-42e7-bb3c-4ac088994719"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-4c90097f-19a8-42e7-bb3c-4ac088994719.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T09:13:52.270Z"); return t}()), // }, // }, // { // Name: to.Ptr("rrama-1-23-17"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/rrama-1-23-17"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T22:54:40.907Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:rrama-1-23-17"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://rrama-1-23-17.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-04T00:53:28.777Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:43:25.710Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-5191e541-8e4e-4229-9fdc-b89f6c3e7f12"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-5191e541-8e4e-4229-9fdc-b89f6c3e7f12.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T11:05:31.890Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-be903820-3533-46e8-90e4-72c132411848"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-be903820-3533-46e8-90e4-72c132411848"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T03:24:01.923Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-be903820-3533-46e8-90e4-72c132411848"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-be903820-3533-46e8-90e4-72c132411848.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T10:09:42.513Z"); return t}()), // }, // }, // { // Name: to.Ptr("rrama-namespace1"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/rrama-namespace1"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:47:22.963Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:rrama-namespace1"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://rrama-namespace1.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T00:47:27.297Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T00:38:02.517Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-a3c38e9b-32a3-4c51-85d7-263150a8dda9"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-a3c38e9b-32a3-4c51-85d7-263150a8dda9.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T05:03:55.960Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-23T03:42:40.010Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-70d3fa25-6bbe-4a6b-a381-a52cf0d539e6.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T06:33:02.363Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T04:28:10.710Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-e6536f77-0d1b-4a6b-8f42-29cc15b2930a"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-e6536f77-0d1b-4a6b-8f42-29cc15b2930a.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:43:51.587Z"); return t}()), // }, // }, // { // Name: to.Ptr("sdk-Namespace-2924"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/ArunMonocle/providers/Microsoft.NotificationHubs/namespaces/sdk-Namespace-2924"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:sdk-namespace-2924"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:59.350Z"); return t}()), // }, // }, // { // Name: to.Ptr("rrama-sb1"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/rrama-sb1"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-01T21:47:34.903Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:rrama-sb1"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://rrama-sb1.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-02T02:10:03.083Z"); return t}()), // }, // }, // { // Name: to.Ptr("WhackWhack"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/RapscallionResources/providers/Microsoft.NotificationHubs/namespaces/WhackWhack"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-10T23:39:01.347Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:whackwhack"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://WhackWhack.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-04T00:56:32.687Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-16T17:51:27.730Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-66ed32d6-611e-4bb0-8e1a-a6d0fc65427c.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T08:19:43.383Z"); return t}()), // }, // }, // { // Name: to.Ptr("NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-08-05T01:14:25.613Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:ns-e0cab401-6df8-465d-8d4a-da9a9e55cf0e"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://NS-e0cab401-6df8-465d-8d4a-da9a9e55cf0e.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-11T12:33:01.727Z"); return t}()), // }, // }, // { // Name: to.Ptr("bn3-rrama-foo1"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/bn3-rrama-foo1"), // Location: to.Ptr("East US 2"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:54:26.927Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:bn3-rrama-foo1"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo1.servicebus.int7.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:54:26.927Z"); return t}()), // }, // }, // { // Name: to.Ptr("bn3-rrama-foo3"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/bn3-rrama-foo3"), // Location: to.Ptr("East US 2"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:24:09.907Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:bn3-rrama-foo3"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo3.servicebus.int7.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:24:33.233Z"); return t}()), // }, // }, // { // Name: to.Ptr("bn3-rrama-foo2"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/bn3-rrama-foo2"), // Location: to.Ptr("East US 2"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:57:40.820Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:bn3-rrama-foo2"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://bn3-rrama-foo2.servicebus.int7.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-28T23:57:40.820Z"); return t}()), // }, // }, // { // Name: to.Ptr("db3-rrama-foo2"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/Default-ServiceBus-SouthCentralUS/providers/Microsoft.NotificationHubs/namespaces/db3-rrama-foo2"), // Location: to.Ptr("North Europe"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:10:43.463Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:db3-rrama-foo2"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://db3-rrama-foo2.servicebus.int7.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-29T00:11:09.133Z"); return t}()), // }, // }}, // } } }
Output:
func (*NamespacesClient) NewListAuthorizationRulesPager ¶ added in v0.5.0
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceAuthorizationRuleListAll.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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{ // ClaimType: to.Ptr("SharedAccessKey"), // ClaimValue: to.Ptr("None"), // CreatedTime: to.Ptr("2018-05-02T18:24:51.0690674Z"), // KeyName: to.Ptr("RootManageSharedAccessKey"), // ModifiedTime: to.Ptr("2018-05-02T18:31:28.5201555Z"), // PrimaryKey: to.Ptr("<primaryKey>"), // Revision: to.Ptr[int32](1), // Rights: []*armnotificationhubs.AccessRights{ // to.Ptr(armnotificationhubs.AccessRightsListen), // to.Ptr(armnotificationhubs.AccessRightsManage), // to.Ptr(armnotificationhubs.AccessRightsSend)}, // SecondaryKey: to.Ptr("<secondaryKey>"), // }, // }}, // } } }
Output:
func (*NamespacesClient) NewListPager ¶ added in v0.5.0
func (client *NamespacesClient) NewListPager(resourceGroupName string, options *NamespacesClientListOptions) *runtime.Pager[NamespacesClientListResponse]
NewListPager - Lists the available namespaces within a resourceGroup.
Generated from API version 2017-04-01
- resourceGroupName - The name of the resource group. If resourceGroupName value is null the method lists all the namespaces within subscription
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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", 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("sdk-Namespace-2924"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/ArunMonocle/providers/Microsoft.NotificationHubs/namespaces/sdk-Namespace-2924"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:36.760Z"); return t}()), // MetricID: to.Ptr("29cfa613-cbbc-4512-b1d6-1b3a92c7fa40:sdk-namespace-2924"), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-2924.servicebus.windows-int.net:443/"), // UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T22:26:59.350Z"); return t}()), // }, // }}, // } } }
Output:
func (*NamespacesClient) Patch ¶
func (client *NamespacesClient) Patch(ctx context.Context, resourceGroupName string, namespaceName string, parameters NamespacePatchParameters, options *NamespacesClientPatchOptions) (NamespacesClientPatchResponse, error)
Patch - Patches the existing namespace If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- parameters - Parameters supplied to patch a Namespace Resource.
- options - NamespacesClientPatchOptions contains the optional parameters for the NamespacesClient.Patch method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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().Patch(ctx, "5ktrial", "nh-sdk-ns", armnotificationhubs.NamespacePatchParameters{ SKU: &armnotificationhubs.SKU{ Name: to.Ptr(armnotificationhubs.SKUNameStandard), Tier: to.Ptr("Standard"), }, Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, 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("sdk-Namespace-3285"), // Type: to.Ptr("Microsoft.NotificationHubs/Namespaces"), // ID: to.Ptr("/subscriptions/29cfa613-cbbc-4512-b1d6-1b3a92c7fa40/resourceGroups/ArunMonocle/providers/Microsoft.NotificationHubs/namespaces/sdk-Namespace-3285"), // Location: to.Ptr("South Central US"), // SKU: &armnotificationhubs.SKU{ // Name: to.Ptr(armnotificationhubs.SKUNameStandard), // Tier: to.Ptr("Standard"), // }, // Tags: map[string]*string{ // "tag3": to.Ptr("value3"), // "tag4": to.Ptr("value4"), // }, // Properties: &armnotificationhubs.NamespaceProperties{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-25T23:07:58.170Z"); return t}()), // ProvisioningState: to.Ptr("Succeeded"), // ServiceBusEndpoint: to.Ptr("https://sdk-Namespace-3285.servicebus.windows-int.net:443/"), // }, // } }
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 2017-04-01
- resourceGroupName - The name of the resource group.
- namespaceName - The namespace name.
- authorizationRuleName - The connection string of the namespace for the specified authorizationRule.
- parameters - Parameters supplied to regenerate the Namespace Authorization Rule Key.
- 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/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/Namespaces/NHNameSpaceAuthorizationRuleRegenrateKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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("PrimaryKey"), }, 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:
type NamespacesClientBeginDeleteOptions ¶ added in v0.3.0
type NamespacesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
NamespacesClientBeginDeleteOptions contains the optional parameters for the NamespacesClient.BeginDelete method.
type NamespacesClientCheckAvailabilityOptions ¶ added in v0.3.0
type NamespacesClientCheckAvailabilityOptions struct { }
NamespacesClientCheckAvailabilityOptions contains the optional parameters for the NamespacesClient.CheckAvailability method.
type NamespacesClientCheckAvailabilityResponse ¶ added in v0.3.0
type NamespacesClientCheckAvailabilityResponse struct { // Description of a CheckAvailability resource. CheckAvailabilityResult }
NamespacesClientCheckAvailabilityResponse contains the response from method NamespacesClient.CheckAvailability.
type NamespacesClientCreateOrUpdateAuthorizationRuleOptions ¶ added in v0.3.0
type NamespacesClientCreateOrUpdateAuthorizationRuleOptions struct { }
NamespacesClientCreateOrUpdateAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.CreateOrUpdateAuthorizationRule method.
type NamespacesClientCreateOrUpdateAuthorizationRuleResponse ¶ added in v0.3.0
type NamespacesClientCreateOrUpdateAuthorizationRuleResponse struct { SharedAccessAuthorizationRuleResource }
NamespacesClientCreateOrUpdateAuthorizationRuleResponse contains the response from method NamespacesClient.CreateOrUpdateAuthorizationRule.
type NamespacesClientCreateOrUpdateOptions ¶ added in v0.3.0
type NamespacesClientCreateOrUpdateOptions struct { }
NamespacesClientCreateOrUpdateOptions contains the optional parameters for the NamespacesClient.CreateOrUpdate method.
type NamespacesClientCreateOrUpdateResponse ¶ added in v0.3.0
type NamespacesClientCreateOrUpdateResponse struct { // Description of a Namespace resource. NamespaceResource }
NamespacesClientCreateOrUpdateResponse contains the response from method NamespacesClient.CreateOrUpdate.
type NamespacesClientDeleteAuthorizationRuleOptions ¶ added in v0.3.0
type NamespacesClientDeleteAuthorizationRuleOptions struct { }
NamespacesClientDeleteAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.DeleteAuthorizationRule method.
type NamespacesClientDeleteAuthorizationRuleResponse ¶ added in v0.3.0
type NamespacesClientDeleteAuthorizationRuleResponse struct { }
NamespacesClientDeleteAuthorizationRuleResponse contains the response from method NamespacesClient.DeleteAuthorizationRule.
type NamespacesClientDeleteResponse ¶ added in v0.3.0
type NamespacesClientDeleteResponse struct { }
NamespacesClientDeleteResponse contains the response from method NamespacesClient.BeginDelete.
type NamespacesClientGetAuthorizationRuleOptions ¶ added in v0.3.0
type NamespacesClientGetAuthorizationRuleOptions struct { }
NamespacesClientGetAuthorizationRuleOptions contains the optional parameters for the NamespacesClient.GetAuthorizationRule method.
type NamespacesClientGetAuthorizationRuleResponse ¶ added in v0.3.0
type NamespacesClientGetAuthorizationRuleResponse struct { SharedAccessAuthorizationRuleResource }
NamespacesClientGetAuthorizationRuleResponse contains the response from method NamespacesClient.GetAuthorizationRule.
type NamespacesClientGetOptions ¶ added in v0.3.0
type NamespacesClientGetOptions struct { }
NamespacesClientGetOptions contains the optional parameters for the NamespacesClient.Get method.
type NamespacesClientGetResponse ¶ added in v0.3.0
type NamespacesClientGetResponse struct { // Description of a Namespace resource. NamespaceResource }
NamespacesClientGetResponse contains the response from method NamespacesClient.Get.
type NamespacesClientListAllOptions ¶ added in v0.3.0
type NamespacesClientListAllOptions struct { }
NamespacesClientListAllOptions contains the optional parameters for the NamespacesClient.NewListAllPager method.
type NamespacesClientListAllResponse ¶ added in v0.3.0
type NamespacesClientListAllResponse struct { // The response of the List Namespace operation. NamespaceListResult }
NamespacesClientListAllResponse contains the response from method NamespacesClient.NewListAllPager.
type NamespacesClientListAuthorizationRulesOptions ¶ added in v0.3.0
type NamespacesClientListAuthorizationRulesOptions struct { }
NamespacesClientListAuthorizationRulesOptions contains the optional parameters for the NamespacesClient.NewListAuthorizationRulesPager method.
type NamespacesClientListAuthorizationRulesResponse ¶ added in v0.3.0
type NamespacesClientListAuthorizationRulesResponse struct { SharedAccessAuthorizationRuleListResult }
NamespacesClientListAuthorizationRulesResponse contains the response from method NamespacesClient.NewListAuthorizationRulesPager.
type NamespacesClientListKeysOptions ¶ added in v0.3.0
type NamespacesClientListKeysOptions struct { }
NamespacesClientListKeysOptions contains the optional parameters for the NamespacesClient.ListKeys method.
type NamespacesClientListKeysResponse ¶ added in v0.3.0
type NamespacesClientListKeysResponse struct { // Namespace/NotificationHub Connection String ResourceListKeys }
NamespacesClientListKeysResponse contains the response from method NamespacesClient.ListKeys.
type NamespacesClientListOptions ¶ added in v0.3.0
type NamespacesClientListOptions struct { }
NamespacesClientListOptions contains the optional parameters for the NamespacesClient.NewListPager method.
type NamespacesClientListResponse ¶ added in v0.3.0
type NamespacesClientListResponse struct { // The response of the List Namespace operation. NamespaceListResult }
NamespacesClientListResponse contains the response from method NamespacesClient.NewListPager.
type NamespacesClientPatchOptions ¶ added in v0.3.0
type NamespacesClientPatchOptions struct { }
NamespacesClientPatchOptions contains the optional parameters for the NamespacesClient.Patch method.
type NamespacesClientPatchResponse ¶ added in v0.3.0
type NamespacesClientPatchResponse struct { // Description of a Namespace resource. NamespaceResource }
NamespacesClientPatchResponse contains the response from method NamespacesClient.Patch.
type NamespacesClientRegenerateKeysOptions ¶ added in v0.3.0
type NamespacesClientRegenerateKeysOptions struct { }
NamespacesClientRegenerateKeysOptions contains the optional parameters for the NamespacesClient.RegenerateKeys method.
type NamespacesClientRegenerateKeysResponse ¶ added in v0.3.0
type NamespacesClientRegenerateKeysResponse struct { // Namespace/NotificationHub Connection String ResourceListKeys }
NamespacesClientRegenerateKeysResponse contains the response from method NamespacesClient.RegenerateKeys.
type NotificationHubCreateOrUpdateParameters ¶
type NotificationHubCreateOrUpdateParameters struct { // REQUIRED; Properties of the NotificationHub. Properties *NotificationHubProperties // Resource location Location *string // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type Type *string }
NotificationHubCreateOrUpdateParameters - Parameters supplied to the CreateOrUpdate NotificationHub operation.
func (NotificationHubCreateOrUpdateParameters) MarshalJSON ¶
func (n NotificationHubCreateOrUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationHubCreateOrUpdateParameters.
func (*NotificationHubCreateOrUpdateParameters) UnmarshalJSON ¶ added in v1.1.0
func (n *NotificationHubCreateOrUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationHubCreateOrUpdateParameters.
type NotificationHubListResult ¶
type NotificationHubListResult struct { // Link to the next set of results. Not empty if Value contains incomplete list of NotificationHub NextLink *string // Result of the List NotificationHub 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 ¶ added in v1.1.0
func (n *NotificationHubListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationHubListResult.
type NotificationHubPatchParameters ¶
type NotificationHubPatchParameters struct { // Resource location Location *string // Properties of the NotificationHub. Properties *NotificationHubProperties // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type Type *string }
NotificationHubPatchParameters - Parameters supplied to the patch NotificationHub operation.
func (NotificationHubPatchParameters) MarshalJSON ¶
func (n NotificationHubPatchParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationHubPatchParameters.
func (*NotificationHubPatchParameters) UnmarshalJSON ¶ added in v1.1.0
func (n *NotificationHubPatchParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationHubPatchParameters.
type NotificationHubProperties ¶
type NotificationHubProperties struct { // The AdmCredential of the created NotificationHub AdmCredential *AdmCredential // The ApnsCredential of the created NotificationHub ApnsCredential *ApnsCredential // The AuthorizationRules of the created NotificationHub AuthorizationRules []*SharedAccessAuthorizationRuleProperties // The BaiduCredential of the created NotificationHub BaiduCredential *BaiduCredential // The GcmCredential of the created NotificationHub GCMCredential *GCMCredential // The MpnsCredential of the created NotificationHub MpnsCredential *MpnsCredential // The NotificationHub name. Name *string // The RegistrationTtl of the created NotificationHub RegistrationTTL *string // The WnsCredential of the created NotificationHub WnsCredential *WnsCredential }
NotificationHubProperties - NotificationHub properties.
func (NotificationHubProperties) MarshalJSON ¶
func (n NotificationHubProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationHubProperties.
func (*NotificationHubProperties) UnmarshalJSON ¶ added in v1.1.0
func (n *NotificationHubProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NotificationHubProperties.
type NotificationHubResource ¶
type NotificationHubResource struct { // Resource location Location *string // Properties of the NotificationHub. Properties *NotificationHubProperties // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type Type *string }
NotificationHubResource - Description of a NotificationHub Resource.
func (NotificationHubResource) MarshalJSON ¶
func (n NotificationHubResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NotificationHubResource.
func (*NotificationHubResource) UnmarshalJSON ¶ added in v1.1.0
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 // READ-ONLY; Operation name: {provider}/{resource}/{operation} Name *string }
Operation - A NotificationHubs REST API operation
func (Operation) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; Operation type: Read, write, delete, etc. Operation *string // READ-ONLY; Service provider: Microsoft.NotificationHubs Provider *string // READ-ONLY; Resource on which the operation is performed: Invoice, etc. Resource *string }
OperationDisplay - The object that represents the operation.
func (OperationDisplay) MarshalJSON ¶ added in v1.1.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results if there are any. NextLink *string // READ-ONLY; List of 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 ¶ added in v1.1.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.5.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available NotificationHubs REST API operations.
Generated from API version 2017-04-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/notificationhubs/resource-manager/Microsoft.NotificationHubs/stable/2017-04-01/examples/NHOperationsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/notificationhubs/armnotificationhubs" ) func main() { 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{ // 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{ // 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/operationResults/read"), // Display: &armnotificationhubs.OperationDisplay{ // 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/CheckNamespaceAvailability/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Get namespace availability."), // Provider: to.Ptr("Microsoft Azure Notification Hub"), // Resource: to.Ptr("Microsoft Azure Notification Hub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/write"), // Display: &armnotificationhubs.OperationDisplay{ // 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{ // Operation: to.Ptr("Get Namespace Resource"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/Delete"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Delete Namespace"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("Namespace"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules/write"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Create or Update Namespace Authorization Rules"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Get Namespace Authorization Rules"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules/read"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Get Namespace Authorization Rules"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules/delete"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Delete Namespace Authorization Rule"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules/listkeys/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Get Namespace Listkeys"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/authorizationRules/regenerateKeys/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Resource Regeneratekeys"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/CheckNotificationHubAvailability/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("CheckNotificationHubAvailability"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/write"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Create or Update notification hub"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/read"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Get notification hub"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/Delete"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Delete notification hub"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules/write"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Create or Update NotificationHub Authorization Rule"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub Authorization Rule"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr(" Get NotificationHub Authorization Rules"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules/read"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr(" Get NotificationHub Authorization Rules"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules/delete"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Delete NotificationHub Authorization Rules"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules/listkeys/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("List NotificationHub keys"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/namespaces/notificationHubs/authorizationRules/regenerateKeys/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Resource Regeneratekeys"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub AuthorizationRules"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/pnsCredentials/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Resource Get Notification Hub PNS Credentials"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub PnsCredential"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/debugSend/action"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Send a test push notification"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub resource"), // }, // }, // { // Name: to.Ptr("Microsoft.NotificationHubs/Namespaces/NotificationHubs/metricDefinitions/read"), // Display: &armnotificationhubs.OperationDisplay{ // Operation: to.Ptr("Get NotificationHub metrics"), // Provider: to.Ptr("Microsoft Azure NotificationHubs"), // Resource: to.Ptr("NotificationHub metrics"), // }, // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct { // 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 PnsCredentialsProperties ¶
type PnsCredentialsProperties struct { // The AdmCredential of the created NotificationHub AdmCredential *AdmCredential // The ApnsCredential of the created NotificationHub ApnsCredential *ApnsCredential // The BaiduCredential of the created NotificationHub BaiduCredential *BaiduCredential // The GcmCredential of the created NotificationHub GCMCredential *GCMCredential // The MpnsCredential of the created NotificationHub MpnsCredential *MpnsCredential // The WnsCredential of the created NotificationHub WnsCredential *WnsCredential }
PnsCredentialsProperties - Description of a NotificationHub PNS Credentials.
func (PnsCredentialsProperties) MarshalJSON ¶ added in v1.1.0
func (p PnsCredentialsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PnsCredentialsProperties.
func (*PnsCredentialsProperties) UnmarshalJSON ¶ added in v1.1.0
func (p *PnsCredentialsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PnsCredentialsProperties.
type PnsCredentialsResource ¶
type PnsCredentialsResource struct { // Resource location Location *string // NotificationHub PNS Credentials. Properties *PnsCredentialsProperties // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type Type *string }
PnsCredentialsResource - Description of a NotificationHub PNS Credentials.
func (PnsCredentialsResource) MarshalJSON ¶
func (p PnsCredentialsResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PnsCredentialsResource.
func (*PnsCredentialsResource) UnmarshalJSON ¶ added in v1.1.0
func (p *PnsCredentialsResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PnsCredentialsResource.
type PolicykeyResource ¶
type PolicykeyResource struct { // Name of the key that has to be regenerated for the Namespace/Notification Hub Authorization Rule. The value can be Primary // Key/Secondary Key. PolicyKey *string }
PolicykeyResource - Namespace/NotificationHub Regenerate Keys
func (PolicykeyResource) MarshalJSON ¶ added in v1.1.0
func (p PolicykeyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PolicykeyResource.
func (*PolicykeyResource) UnmarshalJSON ¶ added in v1.1.0
func (p *PolicykeyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PolicykeyResource.
type Resource ¶
type Resource struct { // Resource location Location *string // The sku of the created namespace SKU *SKU // Resource tags Tags map[string]*string // READ-ONLY; Resource Id ID *string // READ-ONLY; Resource name Name *string // READ-ONLY; Resource type Type *string }
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceListKeys ¶
type ResourceListKeys struct { // KeyName of the created AuthorizationRule KeyName *string // PrimaryConnectionString of the AuthorizationRule. PrimaryConnectionString *string // PrimaryKey of the created AuthorizationRule. PrimaryKey *string // SecondaryConnectionString of the created AuthorizationRule SecondaryConnectionString *string // SecondaryKey of the created AuthorizationRule SecondaryKey *string }
ResourceListKeys - Namespace/NotificationHub Connection String
func (ResourceListKeys) MarshalJSON ¶ added in v1.1.0
func (r ResourceListKeys) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceListKeys.
func (*ResourceListKeys) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceListKeys) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceListKeys.
type SKU ¶
type SKU struct { // REQUIRED; Name of the notification hub sku Name *SKUName // The capacity of the resource Capacity *int32 // The Sku Family Family *string // The Sku size Size *string // The tier of particular sku Tier *string }
SKU - The Sku description for a namespace
func (SKU) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SKUName ¶
type SKUName string
SKUName - Name of the notification hub sku
func PossibleSKUNameValues ¶
func PossibleSKUNameValues() []SKUName
PossibleSKUNameValues returns the possible values for the SKUName const type.
type SharedAccessAuthorizationRuleCreateOrUpdateParameters ¶
type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct { SharedAccessAuthorizationRuleProperties }Properties *
SharedAccessAuthorizationRuleCreateOrUpdateParameters - Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules.
func (SharedAccessAuthorizationRuleCreateOrUpdateParameters) MarshalJSON ¶ added in v1.1.0
func (s SharedAccessAuthorizationRuleCreateOrUpdateParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedAccessAuthorizationRuleCreateOrUpdateParameters.
func (*SharedAccessAuthorizationRuleCreateOrUpdateParameters) UnmarshalJSON ¶ added in v1.1.0
func (s *SharedAccessAuthorizationRuleCreateOrUpdateParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessAuthorizationRuleCreateOrUpdateParameters.
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 ¶ added in v1.1.0
func (s *SharedAccessAuthorizationRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessAuthorizationRuleListResult.
type SharedAccessAuthorizationRuleProperties ¶
type SharedAccessAuthorizationRuleProperties struct { AccessRights ClaimType *string ClaimValue *string CreatedTime *string KeyName *string ModifiedTime *string PrimaryKey *string Revision *int32 SecondaryKey *string }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 ¶ added in v1.1.0
func (s *SharedAccessAuthorizationRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessAuthorizationRuleProperties.
type SharedAccessAuthorizationRuleResource ¶
type SharedAccessAuthorizationRuleResource struct { string Properties *SharedAccessAuthorizationRuleProperties SKU *SKU Tags map[string]*string ID *string Name *string Type *string }Location *
SharedAccessAuthorizationRuleResource - Description of a Namespace AuthorizationRules.
func (SharedAccessAuthorizationRuleResource) MarshalJSON ¶
func (s SharedAccessAuthorizationRuleResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SharedAccessAuthorizationRuleResource.
func (*SharedAccessAuthorizationRuleResource) UnmarshalJSON ¶ added in v1.1.0
func (s *SharedAccessAuthorizationRuleResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SharedAccessAuthorizationRuleResource.
type SubResource ¶
type SubResource struct { // Resource Id ID *string }
func (SubResource) MarshalJSON ¶ added in v1.1.0
func (s SubResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubResource.
func (*SubResource) UnmarshalJSON ¶ added in v1.1.0
func (s *SubResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubResource.
type WnsCredential ¶
type WnsCredential struct { // Properties of NotificationHub WnsCredential. Properties *WnsCredentialProperties }
WnsCredential - Description of a NotificationHub WnsCredential.
func (WnsCredential) MarshalJSON ¶ added in v1.1.0
func (w WnsCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WnsCredential.
func (*WnsCredential) UnmarshalJSON ¶ added in v1.1.0
func (w *WnsCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WnsCredential.
type WnsCredentialProperties ¶
type WnsCredentialProperties struct { // The package ID for this credential. PackageSid *string // The secret key. SecretKey *string // The Windows Live endpoint. WindowsLiveEndpoint *string }
WnsCredentialProperties - Description of a NotificationHub WnsCredential.
func (WnsCredentialProperties) MarshalJSON ¶ added in v1.1.0
func (w WnsCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WnsCredentialProperties.
func (*WnsCredentialProperties) UnmarshalJSON ¶ added in v1.1.0
func (w *WnsCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WnsCredentialProperties.