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

com.pulumi.azurenative.apimanagement.WorkspaceNamedValue 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.apimanagement;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.apimanagement.WorkspaceNamedValueArgs;
import com.pulumi.azurenative.apimanagement.outputs.KeyVaultContractPropertiesResponse;
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;

/**
 * NamedValue details.
 * Azure REST API version: 2022-09-01-preview.
 * 
 * Other available API versions: 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
 * 
 * ## Example Usage
 * ### ApiManagementCreateWorkspaceNamedValue
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.apimanagement.WorkspaceNamedValue;
 * import com.pulumi.azurenative.apimanagement.WorkspaceNamedValueArgs;
 * 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 workspaceNamedValue = new WorkspaceNamedValue("workspaceNamedValue", WorkspaceNamedValueArgs.builder()
 *             .displayName("prop3name")
 *             .namedValueId("testprop2")
 *             .resourceGroupName("rg1")
 *             .secret(false)
 *             .serviceName("apimService1")
 *             .tags(            
 *                 "foo",
 *                 "bar")
 *             .value("propValue")
 *             .workspaceId("wks1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### ApiManagementCreateWorkspaceNamedValueWithKeyVault * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.apimanagement.WorkspaceNamedValue;
 * import com.pulumi.azurenative.apimanagement.WorkspaceNamedValueArgs;
 * import com.pulumi.azurenative.apimanagement.inputs.KeyVaultContractCreatePropertiesArgs;
 * 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 workspaceNamedValue = new WorkspaceNamedValue("workspaceNamedValue", WorkspaceNamedValueArgs.builder()
 *             .displayName("prop6namekv")
 *             .keyVault(KeyVaultContractCreatePropertiesArgs.builder()
 *                 .identityClientId("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0")
 *                 .secretIdentifier("https://contoso.vault.azure.net/secrets/aadSecret")
 *                 .build())
 *             .namedValueId("testprop6")
 *             .resourceGroupName("rg1")
 *             .secret(true)
 *             .serviceName("apimService1")
 *             .tags(            
 *                 "foo",
 *                 "bar")
 *             .workspaceId("wks1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:apimanagement:WorkspaceNamedValue testprop6 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/namedValues/{namedValueId} * ``` * */ @ResourceType(type="azure-native:apimanagement:WorkspaceNamedValue") public class WorkspaceNamedValue extends com.pulumi.resources.CustomResource { /** * Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. * */ public Output displayName() { return this.displayName; } /** * KeyVault location details of the namedValue. * */ @Export(name="keyVault", refs={KeyVaultContractPropertiesResponse.class}, tree="[0]") private Output keyVault; /** * @return KeyVault location details of the namedValue. * */ public Output> keyVault() { return Codegen.optional(this.keyVault); } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * Determines whether the value is a secret and should be encrypted or not. Default value is false. * */ @Export(name="secret", refs={Boolean.class}, tree="[0]") private Output secret; /** * @return Determines whether the value is a secret and should be encrypted or not. Default value is false. * */ public Output> secret() { return Codegen.optional(this.secret); } /** * Optional tags that when provided can be used to filter the NamedValue list. * */ @Export(name="tags", refs={List.class,String.class}, tree="[0,1]") private Output> tags; /** * @return Optional tags that when provided can be used to filter the NamedValue list. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. * */ @Export(name="value", refs={String.class}, tree="[0]") private Output value; /** * @return Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. * */ public Output> value() { return Codegen.optional(this.value); } /** * * @param name The _unique_ name of the resulting resource. */ public WorkspaceNamedValue(java.lang.String name) { this(name, WorkspaceNamedValueArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public WorkspaceNamedValue(java.lang.String name, WorkspaceNamedValueArgs 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 WorkspaceNamedValue(java.lang.String name, WorkspaceNamedValueArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:apimanagement:WorkspaceNamedValue", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private WorkspaceNamedValue(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:apimanagement:WorkspaceNamedValue", name, null, makeResourceOptions(options, id), false); } private static WorkspaceNamedValueArgs makeArgs(WorkspaceNamedValueArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? WorkspaceNamedValueArgs.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:apimanagement/v20220901preview:WorkspaceNamedValue").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20230301preview:WorkspaceNamedValue").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20230501preview:WorkspaceNamedValue").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20230901preview:WorkspaceNamedValue").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20240501:WorkspaceNamedValue").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 WorkspaceNamedValue get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new WorkspaceNamedValue(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy