com.pulumi.azure.eventhub.EventGridTopic Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.azure.eventhub;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.eventhub.EventGridTopicArgs;
import com.pulumi.azure.eventhub.inputs.EventGridTopicState;
import com.pulumi.azure.eventhub.outputs.EventGridTopicIdentity;
import com.pulumi.azure.eventhub.outputs.EventGridTopicInboundIpRule;
import com.pulumi.azure.eventhub.outputs.EventGridTopicInputMappingDefaultValues;
import com.pulumi.azure.eventhub.outputs.EventGridTopicInputMappingFields;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages an EventGrid Topic
*
* > **Note:** at this time EventGrid Topic's are only available in a limited number of regions.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.eventgrid.Topic;
* import com.pulumi.azure.eventgrid.TopicArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
*
* var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()
* .name("my-eventgrid-topic")
* .location(example.location())
* .resourceGroupName(example.name())
* .tags(Map.of("environment", "Production"))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* EventGrid Topic's can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:eventhub/eventGridTopic:EventGridTopic topic1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/topics/topic1
* ```
*
* @deprecated
* azure.eventhub.EventGridTopic has been deprecated in favor of azure.eventgrid.Topic
*
*/
@Deprecated /* azure.eventhub.EventGridTopic has been deprecated in favor of azure.eventgrid.Topic */
@ResourceType(type="azure:eventhub/eventGridTopic:EventGridTopic")
public class EventGridTopic extends com.pulumi.resources.CustomResource {
/**
* The Endpoint associated with the EventGrid Topic.
*
*/
@Export(name="endpoint", refs={String.class}, tree="[0]")
private Output endpoint;
/**
* @return The Endpoint associated with the EventGrid Topic.
*
*/
public Output endpoint() {
return this.endpoint;
}
/**
* An `identity` block as defined below.
*
*/
@Export(name="identity", refs={EventGridTopicIdentity.class}, tree="[0]")
private Output* @Nullable */ EventGridTopicIdentity> identity;
/**
* @return An `identity` block as defined below.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* One or more `inbound_ip_rule` blocks as defined below.
*
*/
@Export(name="inboundIpRules", refs={List.class,EventGridTopicInboundIpRule.class}, tree="[0,1]")
private Output* @Nullable */ List> inboundIpRules;
/**
* @return One or more `inbound_ip_rule` blocks as defined below.
*
*/
public Output>> inboundIpRules() {
return Codegen.optional(this.inboundIpRules);
}
/**
* A `input_mapping_default_values` block as defined below. Changing this forces a new resource to be created.
*
*/
@Export(name="inputMappingDefaultValues", refs={EventGridTopicInputMappingDefaultValues.class}, tree="[0]")
private Output* @Nullable */ EventGridTopicInputMappingDefaultValues> inputMappingDefaultValues;
/**
* @return A `input_mapping_default_values` block as defined below. Changing this forces a new resource to be created.
*
*/
public Output> inputMappingDefaultValues() {
return Codegen.optional(this.inputMappingDefaultValues);
}
/**
* A `input_mapping_fields` block as defined below. Changing this forces a new resource to be created.
*
*/
@Export(name="inputMappingFields", refs={EventGridTopicInputMappingFields.class}, tree="[0]")
private Output* @Nullable */ EventGridTopicInputMappingFields> inputMappingFields;
/**
* @return A `input_mapping_fields` block as defined below. Changing this forces a new resource to be created.
*
*/
public Output> inputMappingFields() {
return Codegen.optional(this.inputMappingFields);
}
/**
* Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
*
*/
@Export(name="inputSchema", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> inputSchema;
/**
* @return Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
*
*/
public Output> inputSchema() {
return Codegen.optional(this.inputSchema);
}
/**
* Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
*
*/
@Export(name="localAuthEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> localAuthEnabled;
/**
* @return Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
*
*/
public Output> localAuthEnabled() {
return Codegen.optional(this.localAuthEnabled);
}
/**
* Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*
*/
public Output location() {
return this.location;
}
/**
* Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The Primary Shared Access Key associated with the EventGrid Topic.
*
*/
@Export(name="primaryAccessKey", refs={String.class}, tree="[0]")
private Output primaryAccessKey;
/**
* @return The Primary Shared Access Key associated with the EventGrid Topic.
*
*/
public Output primaryAccessKey() {
return this.primaryAccessKey;
}
/**
* Whether or not public network access is allowed for this server. Defaults to `true`.
*
*/
@Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> publicNetworkAccessEnabled;
/**
* @return Whether or not public network access is allowed for this server. Defaults to `true`.
*
*/
public Output> publicNetworkAccessEnabled() {
return Codegen.optional(this.publicNetworkAccessEnabled);
}
/**
* The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* The Secondary Shared Access Key associated with the EventGrid Topic.
*
*/
@Export(name="secondaryAccessKey", refs={String.class}, tree="[0]")
private Output secondaryAccessKey;
/**
* @return The Secondary Shared Access Key associated with the EventGrid Topic.
*
*/
public Output secondaryAccessKey() {
return this.secondaryAccessKey;
}
/**
* A mapping of tags to assign to the resource.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags to assign to the resource.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public EventGridTopic(java.lang.String name) {
this(name, EventGridTopicArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public EventGridTopic(java.lang.String name, EventGridTopicArgs 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 EventGridTopic(java.lang.String name, EventGridTopicArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:eventhub/eventGridTopic:EventGridTopic", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private EventGridTopic(java.lang.String name, Output id, @Nullable EventGridTopicState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:eventhub/eventGridTopic:EventGridTopic", name, state, makeResourceOptions(options, id), false);
}
private static EventGridTopicArgs makeArgs(EventGridTopicArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? EventGridTopicArgs.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())
.additionalSecretOutputs(List.of(
"primaryAccessKey",
"secondaryAccessKey"
))
.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 state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static EventGridTopic get(java.lang.String name, Output id, @Nullable EventGridTopicState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new EventGridTopic(name, id, state, options);
}
}