azure-native.providerhub.NotificationRegistration
Explore with Pulumi AI
The notification registration definition. API Version: 2020-11-20.
Example Usage
NotificationRegistrations_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var notificationRegistration = new AzureNative.ProviderHub.NotificationRegistration("notificationRegistration", new()
{
NotificationRegistrationName = "fooNotificationRegistration",
Properties = new AzureNative.ProviderHub.Inputs.NotificationRegistrationPropertiesArgs
{
IncludedEvents = new[]
{
"*/write",
"Microsoft.Contoso/employees/delete",
},
MessageScope = "RegisteredSubscriptions",
NotificationEndpoints = new[]
{
new AzureNative.ProviderHub.Inputs.NotificationEndpointArgs
{
Locations = new[]
{
"",
"East US",
},
NotificationDestination = "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications",
},
new AzureNative.ProviderHub.Inputs.NotificationEndpointArgs
{
Locations = new[]
{
"North Europe",
},
NotificationDestination = "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications",
},
},
NotificationMode = "EventHub",
},
ProviderNamespace = "Microsoft.Contoso",
});
});
package main
import (
providerhub "github.com/pulumi/pulumi-azure-native-sdk/providerhub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := providerhub.NewNotificationRegistration(ctx, "notificationRegistration", &providerhub.NotificationRegistrationArgs{
NotificationRegistrationName: pulumi.String("fooNotificationRegistration"),
Properties: providerhub.NotificationRegistrationResponseProperties{
IncludedEvents: pulumi.StringArray{
pulumi.String("*/write"),
pulumi.String("Microsoft.Contoso/employees/delete"),
},
MessageScope: pulumi.String("RegisteredSubscriptions"),
NotificationEndpoints: providerhub.NotificationEndpointArray{
&providerhub.NotificationEndpointArgs{
Locations: pulumi.StringArray{
pulumi.String(""),
pulumi.String("East US"),
},
NotificationDestination: pulumi.String("/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications"),
},
&providerhub.NotificationEndpointArgs{
Locations: pulumi.StringArray{
pulumi.String("North Europe"),
},
NotificationDestination: pulumi.String("/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications"),
},
},
NotificationMode: pulumi.String("EventHub"),
},
ProviderNamespace: pulumi.String("Microsoft.Contoso"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.providerhub.NotificationRegistration;
import com.pulumi.azurenative.providerhub.NotificationRegistrationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var notificationRegistration = new NotificationRegistration("notificationRegistration", NotificationRegistrationArgs.builder()
.notificationRegistrationName("fooNotificationRegistration")
.properties(Map.ofEntries(
Map.entry("includedEvents",
"*/write",
"Microsoft.Contoso/employees/delete"),
Map.entry("messageScope", "RegisteredSubscriptions"),
Map.entry("notificationEndpoints",
Map.ofEntries(
Map.entry("locations",
"",
"East US"),
Map.entry("notificationDestination", "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications")
),
Map.ofEntries(
Map.entry("locations", "North Europe"),
Map.entry("notificationDestination", "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications")
)),
Map.entry("notificationMode", "EventHub")
))
.providerNamespace("Microsoft.Contoso")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
notification_registration = azure_native.providerhub.NotificationRegistration("notificationRegistration",
notification_registration_name="fooNotificationRegistration",
properties=azure_native.providerhub.NotificationRegistrationResponsePropertiesArgs(
included_events=[
"*/write",
"Microsoft.Contoso/employees/delete",
],
message_scope="RegisteredSubscriptions",
notification_endpoints=[
azure_native.providerhub.NotificationEndpointArgs(
locations=[
"",
"East US",
],
notification_destination="/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications",
),
azure_native.providerhub.NotificationEndpointArgs(
locations=["North Europe"],
notification_destination="/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications",
),
],
notification_mode="EventHub",
),
provider_namespace="Microsoft.Contoso")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const notificationRegistration = new azure_native.providerhub.NotificationRegistration("notificationRegistration", {
notificationRegistrationName: "fooNotificationRegistration",
properties: {
includedEvents: [
"*/write",
"Microsoft.Contoso/employees/delete",
],
messageScope: "RegisteredSubscriptions",
notificationEndpoints: [
{
locations: [
"",
"East US",
],
notificationDestination: "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications",
},
{
locations: ["North Europe"],
notificationDestination: "/subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications",
},
],
notificationMode: "EventHub",
},
providerNamespace: "Microsoft.Contoso",
});
resources:
notificationRegistration:
type: azure-native:providerhub:NotificationRegistration
properties:
notificationRegistrationName: fooNotificationRegistration
properties:
includedEvents:
- '*/write'
- Microsoft.Contoso/employees/delete
messageScope: RegisteredSubscriptions
notificationEndpoints:
- locations:
-
- East US
notificationDestination: /subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-eastus/providers/Microsoft.EventHub/namespaces/unitedstates-mgmtexpint/eventhubs/armlinkednotifications
- locations:
- North Europe
notificationDestination: /subscriptions/ac6bcfb5-3dc1-491f-95a6-646b89bf3e88/resourceGroups/mgmtexp-northeurope/providers/Microsoft.EventHub/namespaces/europe-mgmtexpint/eventhubs/armlinkednotifications
notificationMode: EventHub
providerNamespace: Microsoft.Contoso
Create NotificationRegistration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationRegistration(name: string, args: NotificationRegistrationArgs, opts?: CustomResourceOptions);
@overload
def NotificationRegistration(resource_name: str,
args: NotificationRegistrationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationRegistration(resource_name: str,
opts: Optional[ResourceOptions] = None,
provider_namespace: Optional[str] = None,
notification_registration_name: Optional[str] = None,
properties: Optional[NotificationRegistrationPropertiesArgs] = None)
func NewNotificationRegistration(ctx *Context, name string, args NotificationRegistrationArgs, opts ...ResourceOption) (*NotificationRegistration, error)
public NotificationRegistration(string name, NotificationRegistrationArgs args, CustomResourceOptions? opts = null)
public NotificationRegistration(String name, NotificationRegistrationArgs args)
public NotificationRegistration(String name, NotificationRegistrationArgs args, CustomResourceOptions options)
type: azure-native:providerhub:NotificationRegistration
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args NotificationRegistrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args NotificationRegistrationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotificationRegistrationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationRegistrationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationRegistrationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var notificationRegistrationResource = new AzureNative.Providerhub.NotificationRegistration("notificationRegistrationResource", new()
{
ProviderNamespace = "string",
NotificationRegistrationName = "string",
Properties =
{
{ "includedEvents", new[]
{
"string",
} },
{ "messageScope", "string" },
{ "notificationEndpoints", new[]
{
{
{ "locations", new[]
{
"string",
} },
{ "notificationDestination", "string" },
},
} },
{ "notificationMode", "string" },
{ "provisioningState", "string" },
},
});
example, err := providerhub.NewNotificationRegistration(ctx, "notificationRegistrationResource", &providerhub.NotificationRegistrationArgs{
ProviderNamespace: "string",
NotificationRegistrationName: "string",
Properties: map[string]interface{}{
"includedEvents": []string{
"string",
},
"messageScope": "string",
"notificationEndpoints": []map[string]interface{}{
map[string]interface{}{
"locations": []string{
"string",
},
"notificationDestination": "string",
},
},
"notificationMode": "string",
"provisioningState": "string",
},
})
var notificationRegistrationResource = new NotificationRegistration("notificationRegistrationResource", NotificationRegistrationArgs.builder()
.providerNamespace("string")
.notificationRegistrationName("string")
.properties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build());
notification_registration_resource = azure_native.providerhub.NotificationRegistration("notificationRegistrationResource",
provider_namespace=string,
notification_registration_name=string,
properties={
includedEvents: [string],
messageScope: string,
notificationEndpoints: [{
locations: [string],
notificationDestination: string,
}],
notificationMode: string,
provisioningState: string,
})
const notificationRegistrationResource = new azure_native.providerhub.NotificationRegistration("notificationRegistrationResource", {
providerNamespace: "string",
notificationRegistrationName: "string",
properties: {
includedEvents: ["string"],
messageScope: "string",
notificationEndpoints: [{
locations: ["string"],
notificationDestination: "string",
}],
notificationMode: "string",
provisioningState: "string",
},
});
type: azure-native:providerhub:NotificationRegistration
properties:
notificationRegistrationName: string
properties:
includedEvents:
- string
messageScope: string
notificationEndpoints:
- locations:
- string
notificationDestination: string
notificationMode: string
provisioningState: string
providerNamespace: string
NotificationRegistration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NotificationRegistration resource accepts the following input properties:
- Provider
Namespace string - The name of the resource provider hosted within ProviderHub.
- Notification
Registration stringName - The notification registration.
- Properties
Pulumi.
Azure Native. Provider Hub. Inputs. Notification Registration Properties
- Provider
Namespace string - The name of the resource provider hosted within ProviderHub.
- Notification
Registration stringName - The notification registration.
- Properties
Notification
Registration Properties Args
- provider
Namespace String - The name of the resource provider hosted within ProviderHub.
- notification
Registration StringName - The notification registration.
- properties
Notification
Registration Properties
- provider
Namespace string - The name of the resource provider hosted within ProviderHub.
- notification
Registration stringName - The notification registration.
- properties
Notification
Registration Properties
- provider_
namespace str - The name of the resource provider hosted within ProviderHub.
- notification_
registration_ strname - The notification registration.
- properties
Notification
Registration Properties Args
- provider
Namespace String - The name of the resource provider hosted within ProviderHub.
- notification
Registration StringName - The notification registration.
- properties Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationRegistration resource produces the following output properties:
Supporting Types
MessageScope, MessageScopeArgs
- Not
Specified - NotSpecified
- Registered
Subscriptions - RegisteredSubscriptions
- Message
Scope Not Specified - NotSpecified
- Message
Scope Registered Subscriptions - RegisteredSubscriptions
- Not
Specified - NotSpecified
- Registered
Subscriptions - RegisteredSubscriptions
- Not
Specified - NotSpecified
- Registered
Subscriptions - RegisteredSubscriptions
- NOT_SPECIFIED
- NotSpecified
- REGISTERED_SUBSCRIPTIONS
- RegisteredSubscriptions
- "Not
Specified" - NotSpecified
- "Registered
Subscriptions" - RegisteredSubscriptions
NotificationEndpoint, NotificationEndpointArgs
- Locations List<string>
- Notification
Destination string
- Locations []string
- Notification
Destination string
- locations List<String>
- notification
Destination String
- locations string[]
- notification
Destination string
- locations Sequence[str]
- notification_
destination str
- locations List<String>
- notification
Destination String
NotificationEndpointResponse, NotificationEndpointResponseArgs
- Locations List<string>
- Notification
Destination string
- Locations []string
- Notification
Destination string
- locations List<String>
- notification
Destination String
- locations string[]
- notification
Destination string
- locations Sequence[str]
- notification_
destination str
- locations List<String>
- notification
Destination String
NotificationMode, NotificationModeArgs
- Not
Specified - NotSpecified
- Event
Hub - EventHub
- Web
Hook - WebHook
- Notification
Mode Not Specified - NotSpecified
- Notification
Mode Event Hub - EventHub
- Notification
Mode Web Hook - WebHook
- Not
Specified - NotSpecified
- Event
Hub - EventHub
- Web
Hook - WebHook
- Not
Specified - NotSpecified
- Event
Hub - EventHub
- Web
Hook - WebHook
- NOT_SPECIFIED
- NotSpecified
- EVENT_HUB
- EventHub
- WEB_HOOK
- WebHook
- "Not
Specified" - NotSpecified
- "Event
Hub" - EventHub
- "Web
Hook" - WebHook
NotificationRegistrationProperties, NotificationRegistrationPropertiesArgs
- Included
Events List<string> - Message
Scope string | Pulumi.Azure Native. Provider Hub. Message Scope - Notification
Endpoints List<Pulumi.Azure Native. Provider Hub. Inputs. Notification Endpoint> - Notification
Mode string | Pulumi.Azure Native. Provider Hub. Notification Mode - Provisioning
State string | Pulumi.Azure Native. Provider Hub. Provisioning State
- Included
Events []string - Message
Scope string | MessageScope - Notification
Endpoints []NotificationEndpoint - Notification
Mode string | NotificationMode - Provisioning
State string | ProvisioningState
- included
Events List<String> - message
Scope String | MessageScope - notification
Endpoints List<NotificationEndpoint> - notification
Mode String | NotificationMode - provisioning
State String | ProvisioningState
- included
Events string[] - message
Scope string | MessageScope - notification
Endpoints NotificationEndpoint[] - notification
Mode string | NotificationMode - provisioning
State string | ProvisioningState
- included
Events List<String> - message
Scope String | "NotSpecified" | "Registered Subscriptions" - notification
Endpoints List<Property Map> - notification
Mode String | "NotSpecified" | "Event Hub" | "Web Hook" - provisioning
State String | "NotSpecified" | "Accepted" | "Running" | "Creating" | "Created" | "Deleting" | "Deleted" | "Canceled" | "Failed" | "Succeeded" | "Moving Resources" | "Transient Failure" | "Rollout In Progress"
NotificationRegistrationResponseProperties, NotificationRegistrationResponsePropertiesArgs
- Included
Events []string - Message
Scope string - Notification
Endpoints []NotificationEndpoint Response - Notification
Mode string - Provisioning
State string
- included
Events List<String> - message
Scope String - notification
Endpoints List<NotificationEndpoint Response> - notification
Mode String - provisioning
State String
- included
Events string[] - message
Scope string - notification
Endpoints NotificationEndpoint Response[] - notification
Mode string - provisioning
State string
- included
Events List<String> - message
Scope String - notification
Endpoints List<Property Map> - notification
Mode String - provisioning
State String
ProvisioningState, ProvisioningStateArgs
- Not
Specified - NotSpecified
- Accepted
- Accepted
- Running
- Running
- Creating
- Creating
- Created
- Created
- Deleting
- Deleting
- Deleted
- Deleted
- Canceled
- Canceled
- Failed
- Failed
- Succeeded
- Succeeded
- Moving
Resources - MovingResources
- Transient
Failure - TransientFailure
- Rollout
In Progress - RolloutInProgress
- Provisioning
State Not Specified - NotSpecified
- Provisioning
State Accepted - Accepted
- Provisioning
State Running - Running
- Provisioning
State Creating - Creating
- Provisioning
State Created - Created
- Provisioning
State Deleting - Deleting
- Provisioning
State Deleted - Deleted
- Provisioning
State Canceled - Canceled
- Provisioning
State Failed - Failed
- Provisioning
State Succeeded - Succeeded
- Provisioning
State Moving Resources - MovingResources
- Provisioning
State Transient Failure - TransientFailure
- Provisioning
State Rollout In Progress - RolloutInProgress
- Not
Specified - NotSpecified
- Accepted
- Accepted
- Running
- Running
- Creating
- Creating
- Created
- Created
- Deleting
- Deleting
- Deleted
- Deleted
- Canceled
- Canceled
- Failed
- Failed
- Succeeded
- Succeeded
- Moving
Resources - MovingResources
- Transient
Failure - TransientFailure
- Rollout
In Progress - RolloutInProgress
- Not
Specified - NotSpecified
- Accepted
- Accepted
- Running
- Running
- Creating
- Creating
- Created
- Created
- Deleting
- Deleting
- Deleted
- Deleted
- Canceled
- Canceled
- Failed
- Failed
- Succeeded
- Succeeded
- Moving
Resources - MovingResources
- Transient
Failure - TransientFailure
- Rollout
In Progress - RolloutInProgress
- NOT_SPECIFIED
- NotSpecified
- ACCEPTED
- Accepted
- RUNNING
- Running
- CREATING
- Creating
- CREATED
- Created
- DELETING
- Deleting
- DELETED
- Deleted
- CANCELED
- Canceled
- FAILED
- Failed
- SUCCEEDED
- Succeeded
- MOVING_RESOURCES
- MovingResources
- TRANSIENT_FAILURE
- TransientFailure
- ROLLOUT_IN_PROGRESS
- RolloutInProgress
- "Not
Specified" - NotSpecified
- "Accepted"
- Accepted
- "Running"
- Running
- "Creating"
- Creating
- "Created"
- Created
- "Deleting"
- Deleting
- "Deleted"
- Deleted
- "Canceled"
- Canceled
- "Failed"
- Failed
- "Succeeded"
- Succeeded
- "Moving
Resources" - MovingResources
- "Transient
Failure" - TransientFailure
- "Rollout
In Progress" - RolloutInProgress
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:providerhub:NotificationRegistration fooNotificationRegistration /subscriptions/ab7a8701-f7ef-471a-a2f4-d0ebbf494f77providers/Microsoft.ProviderHub/providerRegistrations/Microsoft.Contoso/notificationregistrations/fooNotificationRegistration
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0