1. Registry
  2. Packages
  3. Google Cloud Native
  4. API Docs
  5. storage
  6. storage/v1
  7. Notification

This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

Viewing docs for Google Cloud Native v0.32.0
published on Wednesday, Nov 29, 2023 by Pulumi
google-native logo Google Cloud Native

This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

Viewing docs for Google Cloud Native v0.32.0
published on Wednesday, Nov 29, 2023 by Pulumi

    Creates a notification subscription for a given bucket. Auto-naming is currently not supported for this resource.

    Create Notification Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Notification(name: string, args: NotificationArgs, opts?: CustomResourceOptions);
    @overload
    def Notification(resource_name: str,
                     args: NotificationArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Notification(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     bucket: Optional[str] = None,
                     custom_attributes: Optional[Mapping[str, str]] = None,
                     etag: Optional[str] = None,
                     event_types: Optional[Sequence[str]] = None,
                     id: Optional[str] = None,
                     kind: Optional[str] = None,
                     object_name_prefix: Optional[str] = None,
                     payload_format: Optional[str] = None,
                     self_link: Optional[str] = None,
                     topic: Optional[str] = None,
                     user_project: Optional[str] = None)
    func NewNotification(ctx *Context, name string, args NotificationArgs, opts ...ResourceOption) (*Notification, error)
    public Notification(string name, NotificationArgs args, CustomResourceOptions? opts = null)
    public Notification(String name, NotificationArgs args)
    public Notification(String name, NotificationArgs args, CustomResourceOptions options)
    
    type: google-native:storage/v1:Notification
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "google-native_storage_v1_notification" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args NotificationArgs
    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 NotificationArgs
    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 NotificationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NotificationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NotificationArgs
    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 notificationResource = new GoogleNative.Storage.V1.Notification("notificationResource", new()
    {
        Bucket = "string",
        CustomAttributes = 
        {
            { "string", "string" },
        },
        Etag = "string",
        EventTypes = new[]
        {
            "string",
        },
        Id = "string",
        Kind = "string",
        ObjectNamePrefix = "string",
        PayloadFormat = "string",
        SelfLink = "string",
        Topic = "string",
        UserProject = "string",
    });
    
    example, err := storage.NewNotification(ctx, "notificationResource", &storage.NotificationArgs{
    	Bucket: pulumi.String("string"),
    	CustomAttributes: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Etag: pulumi.String("string"),
    	EventTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Id:               pulumi.String("string"),
    	Kind:             pulumi.String("string"),
    	ObjectNamePrefix: pulumi.String("string"),
    	PayloadFormat:    pulumi.String("string"),
    	SelfLink:         pulumi.String("string"),
    	Topic:            pulumi.String("string"),
    	UserProject:      pulumi.String("string"),
    })
    
    resource "google-native_storage_v1_notification" "notificationResource" {
      lifecycle {
        create_before_destroy = true
      }
      bucket = "string"
      custom_attributes = {
        "string" = "string"
      }
      etag               = "string"
      event_types        = ["string"]
      id                 = "string"
      kind               = "string"
      object_name_prefix = "string"
      payload_format     = "string"
      self_link          = "string"
      topic              = "string"
      user_project       = "string"
    }
    
    var notificationResource = new Notification("notificationResource", NotificationArgs.builder()
        .bucket("string")
        .customAttributes(Map.of("string", "string"))
        .etag("string")
        .eventTypes("string")
        .id("string")
        .kind("string")
        .objectNamePrefix("string")
        .payloadFormat("string")
        .selfLink("string")
        .topic("string")
        .userProject("string")
        .build());
    
    notification_resource = google_native.storage.v1.Notification("notificationResource",
        bucket="string",
        custom_attributes={
            "string": "string",
        },
        etag="string",
        event_types=["string"],
        id="string",
        kind="string",
        object_name_prefix="string",
        payload_format="string",
        self_link="string",
        topic="string",
        user_project="string")
    
    const notificationResource = new google_native.storage.v1.Notification("notificationResource", {
        bucket: "string",
        customAttributes: {
            string: "string",
        },
        etag: "string",
        eventTypes: ["string"],
        id: "string",
        kind: "string",
        objectNamePrefix: "string",
        payloadFormat: "string",
        selfLink: "string",
        topic: "string",
        userProject: "string",
    });
    
    type: google-native:storage/v1:Notification
    properties:
        bucket: string
        customAttributes:
            string: string
        etag: string
        eventTypes:
            - string
        id: string
        kind: string
        objectNamePrefix: string
        payloadFormat: string
        selfLink: string
        topic: string
        userProject: string
    

    Notification 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 Notification resource accepts the following input properties:

    Bucket string
    CustomAttributes Dictionary<string, string>
    An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
    Etag string
    HTTP 1.1 Entity tag for this subscription notification.
    EventTypes List<string>
    If present, only send notifications about listed event types. If empty, sent notifications for all event types.
    Id string
    The ID of the notification.
    Kind string
    The kind of item this is. For notifications, this is always storage#notification.
    ObjectNamePrefix string
    If present, only apply this notification configuration to object names that begin with this prefix.
    PayloadFormat string
    The desired content of the Payload.
    SelfLink string
    The canonical URL of this notification.
    Topic string
    The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
    UserProject string
    The project to be billed for this request. Required for Requester Pays buckets.
    Bucket string
    CustomAttributes map[string]string
    An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
    Etag string
    HTTP 1.1 Entity tag for this subscription notification.
    EventTypes []string
    If present, only send notifications about listed event types. If empty, sent notifications for all event types.
    Id string
    The ID of the notification.
    Kind string
    The kind of item this is. For notifications, this is always storage#notification.
    ObjectNamePrefix string
    If present, only apply this notification configuration to object names that begin with this prefix.
    PayloadFormat string
    The desired content of the Payload.
    SelfLink string
    The canonical URL of this notification.
    Topic string
    The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
    UserProject string
    The project to be billed for this request. Required for Requester Pays buckets.
    bucket string
    custom_attributes map(string)
    An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
    etag string
    HTTP 1.1 Entity tag for this subscription notification.
    event_types list(string)
    If present, only send notifications about listed event types. If empty, sent notifications for all event types.
    id string
    The ID of the notification.
    kind string
    The kind of item this is. For notifications, this is always storage#notification.
    object_name_prefix string
    If present, only apply this notification configuration to object names that begin with this prefix.
    payload_format string
    The desired content of the Payload.
    self_link string
    The canonical URL of this notification.
    topic string
    The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
    user_project string
    The project to be billed for this request. Required for Requester Pays buckets.
    bucket String
    customAttributes Map<String,String>
    An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
    etag String
    HTTP 1.1 Entity tag for this subscription notification.
    eventTypes List<String>
    If present, only send notifications about listed event types. If empty, sent notifications for all event types.
    id String
    The ID of the notification.
    kind String
    The kind of item this is. For notifications, this is always storage#notification.
    objectNamePrefix String
    If present, only apply this notification configuration to object names that begin with this prefix.
    payloadFormat String
    The desired content of the Payload.
    selfLink String
    The canonical URL of this notification.
    topic String
    The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
    userProject String
    The project to be billed for this request. Required for Requester Pays buckets.
    bucket string
    customAttributes {[key: string]: string}
    An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
    etag string
    HTTP 1.1 Entity tag for this subscription notification.
    eventTypes string[]
    If present, only send notifications about listed event types. If empty, sent notifications for all event types.
    id string
    The ID of the notification.
    kind string
    The kind of item this is. For notifications, this is always storage#notification.
    objectNamePrefix string
    If present, only apply this notification configuration to object names that begin with this prefix.
    payloadFormat string
    The desired content of the Payload.
    selfLink string
    The canonical URL of this notification.
    topic string
    The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
    userProject string
    The project to be billed for this request. Required for Requester Pays buckets.
    bucket str
    custom_attributes Mapping[str, str]
    An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
    etag str
    HTTP 1.1 Entity tag for this subscription notification.
    event_types Sequence[str]
    If present, only send notifications about listed event types. If empty, sent notifications for all event types.
    id str
    The ID of the notification.
    kind str
    The kind of item this is. For notifications, this is always storage#notification.
    object_name_prefix str
    If present, only apply this notification configuration to object names that begin with this prefix.
    payload_format str
    The desired content of the Payload.
    self_link str
    The canonical URL of this notification.
    topic str
    The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
    user_project str
    The project to be billed for this request. Required for Requester Pays buckets.
    bucket String
    customAttributes Map<String>
    An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.
    etag String
    HTTP 1.1 Entity tag for this subscription notification.
    eventTypes List<String>
    If present, only send notifications about listed event types. If empty, sent notifications for all event types.
    id String
    The ID of the notification.
    kind String
    The kind of item this is. For notifications, this is always storage#notification.
    objectNamePrefix String
    If present, only apply this notification configuration to object names that begin with this prefix.
    payloadFormat String
    The desired content of the Payload.
    selfLink String
    The canonical URL of this notification.
    topic String
    The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
    userProject String
    The project to be billed for this request. Required for Requester Pays buckets.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Notification resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Notification Resource

    Get an existing Notification resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, opts?: CustomResourceOptions): Notification
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> Notification
    func GetNotification(ctx *Context, name string, id IDInput, state *NotificationState, opts ...ResourceOption) (*Notification, error)
    public static Notification Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static Notification get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingNotification:    type: google-native:storage/v1:Notification    get:      id: ${id}
    import {
      to = google-native_storage_v1_notification.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state NotificationState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Package Details

    Repository
    Google Cloud Native pulumi/pulumi-google-native
    License
    Apache-2.0
    google-native logo Google Cloud Native

    This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

    Viewing docs for Google Cloud Native v0.32.0
    published on Wednesday, Nov 29, 2023 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial