Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.resources.Resource Maven / Gradle / Ivy
// *** 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.resources;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.resources.ResourceArgs;
import com.pulumi.azurenative.resources.outputs.ExtendedLocationResponse;
import com.pulumi.azurenative.resources.outputs.IdentityResponse;
import com.pulumi.azurenative.resources.outputs.PlanResponse;
import com.pulumi.azurenative.resources.outputs.SkuResponse;
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.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Resource information.
* Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2019-05-01.
*
* Other available API versions: 2015-11-01, 2023-07-01, 2024-03-01, 2024-07-01.
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:resources:Resource myresource1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}
* ```
*
*/
@ResourceType(type="azure-native:resources:Resource")
public class Resource extends com.pulumi.resources.CustomResource {
/**
* Resource extended location.
*
*/
@Export(name="extendedLocation", refs={ExtendedLocationResponse.class}, tree="[0]")
private Output* @Nullable */ ExtendedLocationResponse> extendedLocation;
/**
* @return Resource extended location.
*
*/
public Output> extendedLocation() {
return Codegen.optional(this.extendedLocation);
}
/**
* The identity of the resource.
*
*/
@Export(name="identity", refs={IdentityResponse.class}, tree="[0]")
private Output* @Nullable */ IdentityResponse> identity;
/**
* @return The identity of the resource.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* The kind of the resource.
*
*/
@Export(name="kind", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> kind;
/**
* @return The kind of the resource.
*
*/
public Output> kind() {
return Codegen.optional(this.kind);
}
/**
* Resource location
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> location;
/**
* @return Resource location
*
*/
public Output> location() {
return Codegen.optional(this.location);
}
/**
* ID of the resource that manages this resource.
*
*/
@Export(name="managedBy", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> managedBy;
/**
* @return ID of the resource that manages this resource.
*
*/
public Output> managedBy() {
return Codegen.optional(this.managedBy);
}
/**
* Resource name
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name
*
*/
public Output name() {
return this.name;
}
/**
* The plan of the resource.
*
*/
@Export(name="plan", refs={PlanResponse.class}, tree="[0]")
private Output* @Nullable */ PlanResponse> plan;
/**
* @return The plan of the resource.
*
*/
public Output> plan() {
return Codegen.optional(this.plan);
}
/**
* The resource properties.
*
*/
@Export(name="properties", refs={Object.class}, tree="[0]")
private Output properties;
/**
* @return The resource properties.
*
*/
public Output properties() {
return this.properties;
}
/**
* The SKU of the resource.
*
*/
@Export(name="sku", refs={SkuResponse.class}, tree="[0]")
private Output* @Nullable */ SkuResponse> sku;
/**
* @return The SKU of the resource.
*
*/
public Output> sku() {
return Codegen.optional(this.sku);
}
/**
* 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
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Resource(java.lang.String name) {
this(name, ResourceArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Resource(java.lang.String name, ResourceArgs 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 Resource(java.lang.String name, ResourceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:resources:Resource", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Resource(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:resources:Resource", name, null, makeResourceOptions(options, id), false);
}
private static ResourceArgs makeArgs(ResourceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ResourceArgs.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:resources/v20151101:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20160201:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20160701:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20160901:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20170510:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20180201:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20180501:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20190301:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20190501:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20190510:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20190701:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20190801:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20191001:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20200601:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20200801:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20201001:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20210101:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20210401:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20220901:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20230701:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20240301:Resource").build()),
Output.of(Alias.builder().type("azure-native:resources/v20240701:Resource").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 Resource get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Resource(name, id, options);
}
}