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

com.pulumi.azure.servicebus.TopicAuthorizationRule Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.servicebus;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.servicebus.TopicAuthorizationRuleArgs;
import com.pulumi.azure.servicebus.inputs.TopicAuthorizationRuleState;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a ServiceBus Topic authorization Rule within a ServiceBus Topic.
 * 
 * ## 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.servicebus.Namespace;
 * import com.pulumi.azure.servicebus.NamespaceArgs;
 * import com.pulumi.azure.servicebus.Topic;
 * import com.pulumi.azure.servicebus.TopicArgs;
 * import com.pulumi.azure.servicebus.TopicAuthorizationRule;
 * import com.pulumi.azure.servicebus.TopicAuthorizationRuleArgs;
 * 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("tfex-servicebus")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
 *             .name("tfex-servicebus-namespace")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard")
 *             .tags(Map.of("source", "example"))
 *             .build());
 * 
 *         var exampleTopic = new Topic("exampleTopic", TopicArgs.builder()
 *             .name("tfex_servicebus_topic")
 *             .namespaceId(exampleNamespace.id())
 *             .build());
 * 
 *         var exampleTopicAuthorizationRule = new TopicAuthorizationRule("exampleTopicAuthorizationRule", TopicAuthorizationRuleArgs.builder()
 *             .name("tfex_servicebus_topic_sasPolicy")
 *             .topicId(exampleTopic.id())
 *             .listen(true)
 *             .send(false)
 *             .manage(false)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * ServiceBus Topic authorization rules can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/topics/topic1/authorizationRules/rule1 * ``` * */ @ResourceType(type="azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule") public class TopicAuthorizationRule extends com.pulumi.resources.CustomResource { /** * Grants listen access to this this Authorization Rule. Defaults to `false`. * */ @Export(name="listen", refs={Boolean.class}, tree="[0]") private Output listen; /** * @return Grants listen access to this this Authorization Rule. Defaults to `false`. * */ public Output> listen() { return Codegen.optional(this.listen); } /** * Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`. * */ @Export(name="manage", refs={Boolean.class}, tree="[0]") private Output manage; /** * @return Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`. * */ public Output> manage() { return Codegen.optional(this.manage); } /** * Specifies the name of the ServiceBus Topic Authorization Rule 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 ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * The Primary Connection String for the ServiceBus Topic authorization Rule. * */ @Export(name="primaryConnectionString", refs={String.class}, tree="[0]") private Output primaryConnectionString; /** * @return The Primary Connection String for the ServiceBus Topic authorization Rule. * */ public Output primaryConnectionString() { return this.primaryConnectionString; } /** * The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired. * */ @Export(name="primaryConnectionStringAlias", refs={String.class}, tree="[0]") private Output primaryConnectionStringAlias; /** * @return The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired. * */ public Output primaryConnectionStringAlias() { return this.primaryConnectionStringAlias; } /** * The Primary Key for the ServiceBus Topic authorization Rule. * */ @Export(name="primaryKey", refs={String.class}, tree="[0]") private Output primaryKey; /** * @return The Primary Key for the ServiceBus Topic authorization Rule. * */ public Output primaryKey() { return this.primaryKey; } /** * The Secondary Connection String for the ServiceBus Topic authorization Rule. * */ @Export(name="secondaryConnectionString", refs={String.class}, tree="[0]") private Output secondaryConnectionString; /** * @return The Secondary Connection String for the ServiceBus Topic authorization Rule. * */ public Output secondaryConnectionString() { return this.secondaryConnectionString; } /** * The alias Secondary Connection String for the ServiceBus Namespace * */ @Export(name="secondaryConnectionStringAlias", refs={String.class}, tree="[0]") private Output secondaryConnectionStringAlias; /** * @return The alias Secondary Connection String for the ServiceBus Namespace * */ public Output secondaryConnectionStringAlias() { return this.secondaryConnectionStringAlias; } /** * The Secondary Key for the ServiceBus Topic authorization Rule. * */ @Export(name="secondaryKey", refs={String.class}, tree="[0]") private Output secondaryKey; /** * @return The Secondary Key for the ServiceBus Topic authorization Rule. * */ public Output secondaryKey() { return this.secondaryKey; } /** * Grants send access to this this Authorization Rule. Defaults to `false`. * */ @Export(name="send", refs={Boolean.class}, tree="[0]") private Output send; /** * @return Grants send access to this this Authorization Rule. Defaults to `false`. * */ public Output> send() { return Codegen.optional(this.send); } /** * Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created. * * > **NOTE** At least one of the 3 permissions below needs to be set. * */ @Export(name="topicId", refs={String.class}, tree="[0]") private Output topicId; /** * @return Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created. * * > **NOTE** At least one of the 3 permissions below needs to be set. * */ public Output topicId() { return this.topicId; } /** * * @param name The _unique_ name of the resulting resource. */ public TopicAuthorizationRule(java.lang.String name) { this(name, TopicAuthorizationRuleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public TopicAuthorizationRule(java.lang.String name, TopicAuthorizationRuleArgs 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 TopicAuthorizationRule(java.lang.String name, TopicAuthorizationRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private TopicAuthorizationRule(java.lang.String name, Output id, @Nullable TopicAuthorizationRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule", name, state, makeResourceOptions(options, id), false); } private static TopicAuthorizationRuleArgs makeArgs(TopicAuthorizationRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? TopicAuthorizationRuleArgs.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:eventhub/topicAuthorizationRule:TopicAuthorizationRule").build()) )) .additionalSecretOutputs(List.of( "primaryConnectionString", "primaryConnectionStringAlias", "primaryKey", "secondaryConnectionString", "secondaryConnectionStringAlias", "secondaryKey" )) .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 TopicAuthorizationRule get(java.lang.String name, Output id, @Nullable TopicAuthorizationRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new TopicAuthorizationRule(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy