
com.pulumi.azurenative.keyvault.Key Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.keyvault;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.keyvault.KeyArgs;
import com.pulumi.azurenative.keyvault.outputs.KeyAttributesResponse;
import com.pulumi.azurenative.keyvault.outputs.KeyReleasePolicyResponse;
import com.pulumi.azurenative.keyvault.outputs.RotationPolicyResponse;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* The key resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2019-09-01.
*
* Other available API versions: 2023-07-01, 2024-04-01-preview.
*
* ## Example Usage
* ### Create a key
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.keyvault.Key;
* import com.pulumi.azurenative.keyvault.KeyArgs;
* import com.pulumi.azurenative.keyvault.inputs.KeyPropertiesArgs;
* 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 key = new Key("key", KeyArgs.builder()
* .keyName("sample-key-name")
* .properties(KeyPropertiesArgs.builder()
* .kty("RSA")
* .build())
* .resourceGroupName("sample-group")
* .vaultName("sample-vault-name")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:keyvault:Key sample-key-name /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}
* ```
*
*/
@ResourceType(type="azure-native:keyvault:Key")
public class Key extends com.pulumi.resources.CustomResource {
/**
* The attributes of the key.
*
*/
@Export(name="attributes", refs={KeyAttributesResponse.class}, tree="[0]")
private Output* @Nullable */ KeyAttributesResponse> attributes;
/**
* @return The attributes of the key.
*
*/
public Output> attributes() {
return Codegen.optional(this.attributes);
}
/**
* The elliptic curve name. For valid values, see JsonWebKeyCurveName.
*
*/
@Export(name="curveName", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> curveName;
/**
* @return The elliptic curve name. For valid values, see JsonWebKeyCurveName.
*
*/
public Output> curveName() {
return Codegen.optional(this.curveName);
}
@Export(name="keyOps", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> keyOps;
public Output>> keyOps() {
return Codegen.optional(this.keyOps);
}
/**
* The key size in bits. For example: 2048, 3072, or 4096 for RSA.
*
*/
@Export(name="keySize", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> keySize;
/**
* @return The key size in bits. For example: 2048, 3072, or 4096 for RSA.
*
*/
public Output> keySize() {
return Codegen.optional(this.keySize);
}
/**
* The URI to retrieve the current version of the key.
*
*/
@Export(name="keyUri", refs={String.class}, tree="[0]")
private Output keyUri;
/**
* @return The URI to retrieve the current version of the key.
*
*/
public Output keyUri() {
return this.keyUri;
}
/**
* The URI to retrieve the specific version of the key.
*
*/
@Export(name="keyUriWithVersion", refs={String.class}, tree="[0]")
private Output keyUriWithVersion;
/**
* @return The URI to retrieve the specific version of the key.
*
*/
public Output keyUriWithVersion() {
return this.keyUriWithVersion;
}
/**
* The type of the key. For valid values, see JsonWebKeyType.
*
*/
@Export(name="kty", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> kty;
/**
* @return The type of the key. For valid values, see JsonWebKeyType.
*
*/
public Output> kty() {
return Codegen.optional(this.kty);
}
/**
* Azure location of the key vault resource.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Azure location of the key vault resource.
*
*/
public Output location() {
return this.location;
}
/**
* Name of the key vault resource.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Name of the key vault resource.
*
*/
public Output name() {
return this.name;
}
/**
* Key release policy in response. It will be used for both output and input. Omitted if empty
*
*/
@Export(name="releasePolicy", refs={KeyReleasePolicyResponse.class}, tree="[0]")
private Output* @Nullable */ KeyReleasePolicyResponse> releasePolicy;
/**
* @return Key release policy in response. It will be used for both output and input. Omitted if empty
*
*/
public Output> releasePolicy() {
return Codegen.optional(this.releasePolicy);
}
/**
* Key rotation policy in response. It will be used for both output and input. Omitted if empty
*
*/
@Export(name="rotationPolicy", refs={RotationPolicyResponse.class}, tree="[0]")
private Output* @Nullable */ RotationPolicyResponse> rotationPolicy;
/**
* @return Key rotation policy in response. It will be used for both output and input. Omitted if empty
*
*/
public Output> rotationPolicy() {
return Codegen.optional(this.rotationPolicy);
}
/**
* Tags assigned to the key vault resource.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy