All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.eventgrid.TopicEventSubscription Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.eventgrid;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.eventgrid.TopicEventSubscriptionArgs;
import com.pulumi.azurenative.eventgrid.outputs.AzureFunctionEventSubscriptionDestinationResponse;
import com.pulumi.azurenative.eventgrid.outputs.DeadLetterWithResourceIdentityResponse;
import com.pulumi.azurenative.eventgrid.outputs.DeliveryWithResourceIdentityResponse;
import com.pulumi.azurenative.eventgrid.outputs.EventHubEventSubscriptionDestinationResponse;
import com.pulumi.azurenative.eventgrid.outputs.EventSubscriptionFilterResponse;
import com.pulumi.azurenative.eventgrid.outputs.HybridConnectionEventSubscriptionDestinationResponse;
import com.pulumi.azurenative.eventgrid.outputs.RetryPolicyResponse;
import com.pulumi.azurenative.eventgrid.outputs.ServiceBusQueueEventSubscriptionDestinationResponse;
import com.pulumi.azurenative.eventgrid.outputs.ServiceBusTopicEventSubscriptionDestinationResponse;
import com.pulumi.azurenative.eventgrid.outputs.StorageBlobDeadLetterDestinationResponse;
import com.pulumi.azurenative.eventgrid.outputs.StorageQueueEventSubscriptionDestinationResponse;
import com.pulumi.azurenative.eventgrid.outputs.SystemDataResponse;
import com.pulumi.azurenative.eventgrid.outputs.WebHookEventSubscriptionDestinationResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Event Subscription
 * Azure REST API version: 2022-06-15. Prior API version in Azure Native 1.x: 2021-10-15-preview.
 * 
 * Other available API versions: 2023-06-01-preview, 2023-12-15-preview, 2024-06-01-preview.
 * 
 * ## Example Usage
 * ### TopicEventSubscriptions_CreateOrUpdate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.eventgrid.TopicEventSubscription;
 * import com.pulumi.azurenative.eventgrid.TopicEventSubscriptionArgs;
 * import com.pulumi.azurenative.eventgrid.inputs.EventSubscriptionFilterArgs;
 * 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 topicEventSubscription = new TopicEventSubscription("topicEventSubscription", TopicEventSubscriptionArgs.builder()
 *             .destination(WebHookEventSubscriptionDestinationArgs.builder()
 *                 .endpointType("WebHook")
 *                 .endpointUrl("https://requestb.in/15ksip71")
 *                 .build())
 *             .eventSubscriptionName("exampleEventSubscriptionName1")
 *             .filter(EventSubscriptionFilterArgs.builder()
 *                 .isSubjectCaseSensitive(false)
 *                 .subjectBeginsWith("ExamplePrefix")
 *                 .subjectEndsWith("ExampleSuffix")
 *                 .build())
 *             .resourceGroupName("examplerg")
 *             .topicName("exampleTopic1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:eventgrid:TopicEventSubscription exampleEventSubscriptionName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}/eventSubscriptions/{eventSubscriptionName} * ``` * */ @ResourceType(type="azure-native:eventgrid:TopicEventSubscription") public class TopicEventSubscription extends com.pulumi.resources.CustomResource { /** * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering. * */ @Export(name="deadLetterDestination", refs={StorageBlobDeadLetterDestinationResponse.class}, tree="[0]") private Output deadLetterDestination; /** * @return The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering. * */ public Output> deadLetterDestination() { return Codegen.optional(this.deadLetterDestination); } /** * The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering. * */ @Export(name="deadLetterWithResourceIdentity", refs={DeadLetterWithResourceIdentityResponse.class}, tree="[0]") private Output deadLetterWithResourceIdentity; /** * @return The dead letter destination of the event subscription. Any event that cannot be delivered to its' destination is sent to the dead letter destination. * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering. * */ public Output> deadLetterWithResourceIdentity() { return Codegen.optional(this.deadLetterWithResourceIdentity); } /** * Information about the destination where events have to be delivered for the event subscription. * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering. * */ @Export(name="deliveryWithResourceIdentity", refs={DeliveryWithResourceIdentityResponse.class}, tree="[0]") private Output deliveryWithResourceIdentity; /** * @return Information about the destination where events have to be delivered for the event subscription. * Uses the managed identity setup on the parent resource (namely, topic or domain) to acquire the authentication tokens being used during delivery / dead-lettering. * */ public Output> deliveryWithResourceIdentity() { return Codegen.optional(this.deliveryWithResourceIdentity); } /** * Information about the destination where events have to be delivered for the event subscription. * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering. * */ @Export(name="destination", refs={Object.class}, tree="[0]") private Output destination; /** * @return Information about the destination where events have to be delivered for the event subscription. * Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering. * */ public Output> destination() { return Codegen.optional(this.destination); } /** * The event delivery schema for the event subscription. * */ @Export(name="eventDeliverySchema", refs={String.class}, tree="[0]") private Output eventDeliverySchema; /** * @return The event delivery schema for the event subscription. * */ public Output> eventDeliverySchema() { return Codegen.optional(this.eventDeliverySchema); } /** * Expiration time of the event subscription. * */ @Export(name="expirationTimeUtc", refs={String.class}, tree="[0]") private Output expirationTimeUtc; /** * @return Expiration time of the event subscription. * */ public Output> expirationTimeUtc() { return Codegen.optional(this.expirationTimeUtc); } /** * Information about the filter for the event subscription. * */ @Export(name="filter", refs={EventSubscriptionFilterResponse.class}, tree="[0]") private Output filter; /** * @return Information about the filter for the event subscription. * */ public Output> filter() { return Codegen.optional(this.filter); } /** * List of user defined labels. * */ @Export(name="labels", refs={List.class,String.class}, tree="[0,1]") private Output> labels; /** * @return List of user defined labels. * */ public Output>> labels() { return Codegen.optional(this.labels); } /** * Name of the resource. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Name of the resource. * */ public Output name() { return this.name; } /** * Provisioning state of the event subscription. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Provisioning state of the event subscription. * */ public Output provisioningState() { return this.provisioningState; } /** * The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. * */ @Export(name="retryPolicy", refs={RetryPolicyResponse.class}, tree="[0]") private Output retryPolicy; /** * @return The retry policy for events. This can be used to configure maximum number of delivery attempts and time to live for events. * */ public Output> retryPolicy() { return Codegen.optional(this.retryPolicy); } /** * The system metadata relating to Event Subscription resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return The system metadata relating to Event Subscription resource. * */ public Output systemData() { return this.systemData; } /** * Name of the topic of the event subscription. * */ @Export(name="topic", refs={String.class}, tree="[0]") private Output topic; /** * @return Name of the topic of the event subscription. * */ public Output topic() { return this.topic; } /** * Type of the resource. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Type of the resource. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public TopicEventSubscription(java.lang.String name) { this(name, TopicEventSubscriptionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public TopicEventSubscription(java.lang.String name, TopicEventSubscriptionArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public TopicEventSubscription(java.lang.String name, TopicEventSubscriptionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:eventgrid:TopicEventSubscription", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private TopicEventSubscription(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:eventgrid:TopicEventSubscription", name, null, makeResourceOptions(options, id), false); } private static TopicEventSubscriptionArgs makeArgs(TopicEventSubscriptionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? TopicEventSubscriptionArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:eventgrid/v20211015preview:TopicEventSubscription").build()), Output.of(Alias.builder().type("azure-native:eventgrid/v20220615:TopicEventSubscription").build()), Output.of(Alias.builder().type("azure-native:eventgrid/v20230601preview:TopicEventSubscription").build()), Output.of(Alias.builder().type("azure-native:eventgrid/v20231215preview:TopicEventSubscription").build()), Output.of(Alias.builder().type("azure-native:eventgrid/v20240601preview:TopicEventSubscription").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static TopicEventSubscription get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new TopicEventSubscription(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy