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

com.pulumi.azure.lighthouse.Definition Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 6.10.0-alpha.1731737215
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.azure.lighthouse;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.lighthouse.DefinitionArgs;
import com.pulumi.azure.lighthouse.inputs.DefinitionState;
import com.pulumi.azure.lighthouse.outputs.DefinitionAuthorization;
import com.pulumi.azure.lighthouse.outputs.DefinitionEligibleAuthorization;
import com.pulumi.azure.lighthouse.outputs.DefinitionPlan;
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.Optional;
import javax.annotation.Nullable;

/**
 * Manages a [Lighthouse](https://docs.microsoft.com/azure/lighthouse) Definition.
 * 
 * ## 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.authorization.AuthorizationFunctions;
 * import com.pulumi.azure.authorization.inputs.GetRoleDefinitionArgs;
 * import com.pulumi.azure.lighthouse.Definition;
 * import com.pulumi.azure.lighthouse.DefinitionArgs;
 * import com.pulumi.azure.lighthouse.inputs.DefinitionAuthorizationArgs;
 * 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) {
 *         final var contributor = AuthorizationFunctions.getRoleDefinition(GetRoleDefinitionArgs.builder()
 *             .roleDefinitionId("b24988ac-6180-42a0-ab88-20f7382dd24c")
 *             .build());
 * 
 *         var example = new Definition("example", DefinitionArgs.builder()
 *             .name("Sample definition")
 *             .description("This is a lighthouse definition created IaC")
 *             .managingTenantId("00000000-0000-0000-0000-000000000000")
 *             .scope("/subscriptions/00000000-0000-0000-0000-000000000000")
 *             .authorizations(DefinitionAuthorizationArgs.builder()
 *                 .principalId("00000000-0000-0000-0000-000000000000")
 *                 .roleDefinitionId(contributor.applyValue(getRoleDefinitionResult -> getRoleDefinitionResult.roleDefinitionId()))
 *                 .principalDisplayName("Tier 1 Support")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Lighthouse Definitions can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:lighthouse/definition:Definition example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/00000000-0000-0000-0000-000000000000 * ``` * */ @ResourceType(type="azure:lighthouse/definition:Definition") public class Definition extends com.pulumi.resources.CustomResource { /** * An `authorization` block as defined below. * */ @Export(name="authorizations", refs={List.class,DefinitionAuthorization.class}, tree="[0,1]") private Output> authorizations; /** * @return An `authorization` block as defined below. * */ public Output> authorizations() { return this.authorizations; } /** * A description of the Lighthouse Definition. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return A description of the Lighthouse Definition. * */ public Output> description() { return Codegen.optional(this.description); } /** * An `eligible_authorization` block as defined below. * */ @Export(name="eligibleAuthorizations", refs={List.class,DefinitionEligibleAuthorization.class}, tree="[0,1]") private Output> eligibleAuthorizations; /** * @return An `eligible_authorization` block as defined below. * */ public Output>> eligibleAuthorizations() { return Codegen.optional(this.eligibleAuthorizations); } /** * A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created. * */ @Export(name="lighthouseDefinitionId", refs={String.class}, tree="[0]") private Output lighthouseDefinitionId; /** * @return A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created. * */ public Output lighthouseDefinitionId() { return this.lighthouseDefinitionId; } /** * The ID of the managing tenant. Changing this forces a new resource to be created. * */ @Export(name="managingTenantId", refs={String.class}, tree="[0]") private Output managingTenantId; /** * @return The ID of the managing tenant. Changing this forces a new resource to be created. * */ public Output managingTenantId() { return this.managingTenantId; } /** * The name of the Lighthouse Definition. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the Lighthouse Definition. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * A `plan` block as defined below. * */ @Export(name="plan", refs={DefinitionPlan.class}, tree="[0]") private Output plan; /** * @return A `plan` block as defined below. * */ public Output> plan() { return Codegen.optional(this.plan); } /** * The ID of the managed subscription. Changing this forces a new resource to be created. * */ @Export(name="scope", refs={String.class}, tree="[0]") private Output scope; /** * @return The ID of the managed subscription. Changing this forces a new resource to be created. * */ public Output scope() { return this.scope; } /** * * @param name The _unique_ name of the resulting resource. */ public Definition(java.lang.String name) { this(name, DefinitionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Definition(java.lang.String name, DefinitionArgs 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 Definition(java.lang.String name, DefinitionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:lighthouse/definition:Definition", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Definition(java.lang.String name, Output id, @Nullable DefinitionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:lighthouse/definition:Definition", name, state, makeResourceOptions(options, id), false); } private static DefinitionArgs makeArgs(DefinitionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DefinitionArgs.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 Definition get(java.lang.String name, Output id, @Nullable DefinitionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Definition(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy