com.pulumi.azure.appplatform.SpringCloudStorage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
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.
// *** 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.appplatform;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.appplatform.SpringCloudStorageArgs;
import com.pulumi.azure.appplatform.inputs.SpringCloudStorageState;
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 javax.annotation.Nullable;
/**
* Manages a Spring Cloud Storage.
*
* ## 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.storage.Account;
* import com.pulumi.azure.storage.AccountArgs;
* import com.pulumi.azure.appplatform.SpringCloudService;
* import com.pulumi.azure.appplatform.SpringCloudServiceArgs;
* import com.pulumi.azure.appplatform.SpringCloudStorage;
* import com.pulumi.azure.appplatform.SpringCloudStorageArgs;
* 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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("example")
* .resourceGroupName(example.name())
* .location(example.location())
* .accountTier("Standard")
* .accountReplicationType("GRS")
* .build());
*
* var exampleSpringCloudService = new SpringCloudService("exampleSpringCloudService", SpringCloudServiceArgs.builder()
* .name("example")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
*
* var exampleSpringCloudStorage = new SpringCloudStorage("exampleSpringCloudStorage", SpringCloudStorageArgs.builder()
* .name("example")
* .springCloudServiceId(exampleSpringCloudService.id())
* .storageAccountName(exampleAccount.name())
* .storageAccountKey(exampleAccount.primaryAccessKey())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Spring Cloud Storages can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:appplatform/springCloudStorage:SpringCloudStorage example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.AppPlatform/spring/service1/storages/storage1
* ```
*
*/
@ResourceType(type="azure:appplatform/springCloudStorage:SpringCloudStorage")
public class SpringCloudStorage extends com.pulumi.resources.CustomResource {
/**
* The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this Spring Cloud Storage. Changing this forces a new Spring Cloud Storage to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The ID of the Spring Cloud Service where the Spring Cloud Storage should exist. Changing this forces a new Spring Cloud Storage to be created.
*
*/
@Export(name="springCloudServiceId", refs={String.class}, tree="[0]")
private Output springCloudServiceId;
/**
* @return The ID of the Spring Cloud Service where the Spring Cloud Storage should exist. Changing this forces a new Spring Cloud Storage to be created.
*
*/
public Output springCloudServiceId() {
return this.springCloudServiceId;
}
/**
* The access key of the Azure Storage Account.
*
*/
@Export(name="storageAccountKey", refs={String.class}, tree="[0]")
private Output storageAccountKey;
/**
* @return The access key of the Azure Storage Account.
*
*/
public Output storageAccountKey() {
return this.storageAccountKey;
}
/**
* The account name of the Azure Storage Account.
*
*/
@Export(name="storageAccountName", refs={String.class}, tree="[0]")
private Output storageAccountName;
/**
* @return The account name of the Azure Storage Account.
*
*/
public Output storageAccountName() {
return this.storageAccountName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public SpringCloudStorage(java.lang.String name) {
this(name, SpringCloudStorageArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public SpringCloudStorage(java.lang.String name, SpringCloudStorageArgs 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 SpringCloudStorage(java.lang.String name, SpringCloudStorageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:appplatform/springCloudStorage:SpringCloudStorage", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private SpringCloudStorage(java.lang.String name, Output id, @Nullable SpringCloudStorageState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:appplatform/springCloudStorage:SpringCloudStorage", name, state, makeResourceOptions(options, id), false);
}
private static SpringCloudStorageArgs makeArgs(SpringCloudStorageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SpringCloudStorageArgs.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())
.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 SpringCloudStorage get(java.lang.String name, Output id, @Nullable SpringCloudStorageState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new SpringCloudStorage(name, id, state, options);
}
}