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

com.pulumi.azure.relay.NamespaceAuthorizationRule 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.relay;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.relay.NamespaceAuthorizationRuleArgs;
import com.pulumi.azure.relay.inputs.NamespaceAuthorizationRuleState;
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 an Azure Relay Namespace Authorization Rule.
 * 
 * ## 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.relay.Namespace;
 * import com.pulumi.azure.relay.NamespaceArgs;
 * import com.pulumi.azure.relay.NamespaceAuthorizationRule;
 * import com.pulumi.azure.relay.NamespaceAuthorizationRuleArgs;
 * 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 exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
 *             .name("example-relay")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("Standard")
 *             .tags(Map.of("source", "terraform"))
 *             .build());
 * 
 *         var exampleNamespaceAuthorizationRule = new NamespaceAuthorizationRule("exampleNamespaceAuthorizationRule", NamespaceAuthorizationRuleArgs.builder()
 *             .name("example")
 *             .resourceGroupName(example.name())
 *             .namespaceName(exampleNamespace.name())
 *             .listen(true)
 *             .send(true)
 *             .manage(false)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Azure Relay Namespace Authorization Rules can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:relay/namespaceAuthorizationRule:NamespaceAuthorizationRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Relay/namespaces/namespace1/authorizationRules/rule1 * ``` * */ @ResourceType(type="azure:relay/namespaceAuthorizationRule:NamespaceAuthorizationRule") public class NamespaceAuthorizationRule extends com.pulumi.resources.CustomResource { /** * Grants listen access to this Authorization Rule. Defaults to `false`. * */ @Export(name="listen", refs={Boolean.class}, tree="[0]") private Output listen; /** * @return Grants listen access to this Authorization Rule. Defaults to `false`. * */ public Output> listen() { return Codegen.optional(this.listen); } /** * Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be set to `true` too. Defaults to `false`. * */ @Export(name="manage", refs={Boolean.class}, tree="[0]") private Output manage; /** * @return Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be set to `true` too. Defaults to `false`. * */ public Output> manage() { return Codegen.optional(this.manage); } /** * The name which should be used for this Azure Relay Namespace Authorization Rule. Changing this forces a new Azure Relay Namespace Authorization Rule to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name which should be used for this Azure Relay Namespace Authorization Rule. Changing this forces a new Azure Relay Namespace Authorization Rule to be created. * */ public Output name() { return this.name; } /** * Name of the Azure Relay Namespace for which this Azure Relay Namespace Authorization Rule will be created. Changing this forces a new Azure Relay Namespace Authorization Rule to be created. * */ @Export(name="namespaceName", refs={String.class}, tree="[0]") private Output namespaceName; /** * @return Name of the Azure Relay Namespace for which this Azure Relay Namespace Authorization Rule will be created. Changing this forces a new Azure Relay Namespace Authorization Rule to be created. * */ public Output namespaceName() { return this.namespaceName; } /** * The Primary Connection String for the Azure Relay Namespace Authorization Rule. * */ @Export(name="primaryConnectionString", refs={String.class}, tree="[0]") private Output primaryConnectionString; /** * @return The Primary Connection String for the Azure Relay Namespace Authorization Rule. * */ public Output primaryConnectionString() { return this.primaryConnectionString; } /** * The Primary Key for the Azure Relay Namespace Authorization Rule. * */ @Export(name="primaryKey", refs={String.class}, tree="[0]") private Output primaryKey; /** * @return The Primary Key for the Azure Relay Namespace Authorization Rule. * */ public Output primaryKey() { return this.primaryKey; } /** * The name of the Resource Group where the Azure Relay Namespace Authorization Rule should exist. Changing this forces a new Azure Relay Namespace Authorization Rule to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return The name of the Resource Group where the Azure Relay Namespace Authorization Rule should exist. Changing this forces a new Azure Relay Namespace Authorization Rule to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * The Secondary Connection String for the Azure Relay Namespace Authorization Rule. * */ @Export(name="secondaryConnectionString", refs={String.class}, tree="[0]") private Output secondaryConnectionString; /** * @return The Secondary Connection String for the Azure Relay Namespace Authorization Rule. * */ public Output secondaryConnectionString() { return this.secondaryConnectionString; } /** * The Secondary Key for the Azure Relay Namespace Authorization Rule. * */ @Export(name="secondaryKey", refs={String.class}, tree="[0]") private Output secondaryKey; /** * @return The Secondary Key for the Azure Relay Namespace Authorization Rule. * */ public Output secondaryKey() { return this.secondaryKey; } /** * Grants send access to this Authorization Rule. Defaults to `false`. * */ @Export(name="send", refs={Boolean.class}, tree="[0]") private Output send; /** * @return Grants send access to this Authorization Rule. Defaults to `false`. * */ public Output> send() { return Codegen.optional(this.send); } /** * * @param name The _unique_ name of the resulting resource. */ public NamespaceAuthorizationRule(java.lang.String name) { this(name, NamespaceAuthorizationRuleArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public NamespaceAuthorizationRule(java.lang.String name, NamespaceAuthorizationRuleArgs 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 NamespaceAuthorizationRule(java.lang.String name, NamespaceAuthorizationRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:relay/namespaceAuthorizationRule:NamespaceAuthorizationRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private NamespaceAuthorizationRule(java.lang.String name, Output id, @Nullable NamespaceAuthorizationRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:relay/namespaceAuthorizationRule:NamespaceAuthorizationRule", name, state, makeResourceOptions(options, id), false); } private static NamespaceAuthorizationRuleArgs makeArgs(NamespaceAuthorizationRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? NamespaceAuthorizationRuleArgs.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( "primaryConnectionString", "primaryKey", "secondaryConnectionString", "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 NamespaceAuthorizationRule get(java.lang.String name, Output id, @Nullable NamespaceAuthorizationRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new NamespaceAuthorizationRule(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy