com.pulumi.azurenative.recoveryservices.Vault 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.recoveryservices;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.recoveryservices.VaultArgs;
import com.pulumi.azurenative.recoveryservices.outputs.IdentityDataResponse;
import com.pulumi.azurenative.recoveryservices.outputs.SkuResponse;
import com.pulumi.azurenative.recoveryservices.outputs.SystemDataResponse;
import com.pulumi.azurenative.recoveryservices.outputs.VaultPropertiesResponse;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Resource information, as returned by the resource provider.
* Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2021-01-01.
*
* Other available API versions: 2020-02-02, 2023-06-01, 2023-08-01, 2024-01-01, 2024-02-01, 2024-04-01, 2024-04-30-preview.
*
* ## Example Usage
* ### Create or Update Recovery Services vault
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.recoveryservices.Vault;
* import com.pulumi.azurenative.recoveryservices.VaultArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.IdentityDataArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.VaultPropertiesArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.SkuArgs;
* 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 vault = new Vault("vault", VaultArgs.builder()
* .identity(IdentityDataArgs.builder()
* .type("SystemAssigned")
* .build())
* .location("West US")
* .properties(VaultPropertiesArgs.builder()
* .publicNetworkAccess("Enabled")
* .build())
* .resourceGroupName("Default-RecoveryServices-ResourceGroup")
* .sku(SkuArgs.builder()
* .name("Standard")
* .build())
* .vaultName("swaggerExample")
* .build());
*
* }
* }
*
* }
*
* ### Create or Update Vault With Monitoring Setting
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.recoveryservices.Vault;
* import com.pulumi.azurenative.recoveryservices.VaultArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.IdentityDataArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.VaultPropertiesArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.MonitoringSettingsArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.AzureMonitorAlertSettingsArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.ClassicAlertSettingsArgs;
* import com.pulumi.azurenative.recoveryservices.inputs.SkuArgs;
* 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 vault = new Vault("vault", VaultArgs.builder()
* .identity(IdentityDataArgs.builder()
* .type("SystemAssigned")
* .build())
* .location("West US")
* .properties(VaultPropertiesArgs.builder()
* .monitoringSettings(MonitoringSettingsArgs.builder()
* .azureMonitorAlertSettings(AzureMonitorAlertSettingsArgs.builder()
* .alertsForAllJobFailures("Enabled")
* .build())
* .classicAlertSettings(ClassicAlertSettingsArgs.builder()
* .alertsForCriticalOperations("Disabled")
* .build())
* .build())
* .publicNetworkAccess("Enabled")
* .build())
* .resourceGroupName("Default-RecoveryServices-ResourceGroup")
* .sku(SkuArgs.builder()
* .name("Standard")
* .build())
* .vaultName("swaggerExample")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:recoveryservices:Vault swaggerExample /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}
* ```
*
*/
@ResourceType(type="azure-native:recoveryservices:Vault")
public class Vault extends com.pulumi.resources.CustomResource {
/**
* Optional ETag.
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> etag;
/**
* @return Optional ETag.
*
*/
public Output> etag() {
return Codegen.optional(this.etag);
}
/**
* Identity for the resource.
*
*/
@Export(name="identity", refs={IdentityDataResponse.class}, tree="[0]")
private Output* @Nullable */ IdentityDataResponse> identity;
/**
* @return Identity for the resource.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* Resource location.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Resource location.
*
*/
public Output location() {
return this.location;
}
/**
* Resource name associated with the resource.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name associated with the resource.
*
*/
public Output name() {
return this.name;
}
/**
* Properties of the vault.
*
*/
@Export(name="properties", refs={VaultPropertiesResponse.class}, tree="[0]")
private Output properties;
/**
* @return Properties of the vault.
*
*/
public Output properties() {
return this.properties;
}
/**
* Identifies the unique system identifier for each Azure resource.
*
*/
@Export(name="sku", refs={SkuResponse.class}, tree="[0]")
private Output* @Nullable */ SkuResponse> sku;
/**
* @return Identifies the unique system identifier for each Azure resource.
*
*/
public Output> sku() {
return Codegen.optional(this.sku);
}
/**
* Metadata pertaining to creation and last modification of the resource.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Metadata pertaining to creation and last modification of the resource.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Resource tags.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Vault(java.lang.String name) {
this(name, VaultArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Vault(java.lang.String name, VaultArgs 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 Vault(java.lang.String name, VaultArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:recoveryservices:Vault", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Vault(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:recoveryservices:Vault", name, null, makeResourceOptions(options, id), false);
}
private static VaultArgs makeArgs(VaultArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? VaultArgs.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:recoveryservices/v20160601:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20200202:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20201001:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20210101:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20210210:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20210301:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20210401:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20210601:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20210701:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20210801:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20211101preview:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20211201:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220101:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220131preview:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220201:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220301:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220401:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220501:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220801:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220910:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20220930preview:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20221001:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20230101:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20230201:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20230401:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20230601:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20230801:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20240101:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20240201:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20240401:Vault").build()),
Output.of(Alias.builder().type("azure-native:recoveryservices/v20240430preview:Vault").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 Vault get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Vault(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy