com.pulumi.azure.lighthouse.kotlin.DefinitionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.lighthouse.kotlin
import com.pulumi.azure.lighthouse.DefinitionArgs.builder
import com.pulumi.azure.lighthouse.kotlin.inputs.DefinitionAuthorizationArgs
import com.pulumi.azure.lighthouse.kotlin.inputs.DefinitionAuthorizationArgsBuilder
import com.pulumi.azure.lighthouse.kotlin.inputs.DefinitionEligibleAuthorizationArgs
import com.pulumi.azure.lighthouse.kotlin.inputs.DefinitionEligibleAuthorizationArgsBuilder
import com.pulumi.azure.lighthouse.kotlin.inputs.DefinitionPlanArgs
import com.pulumi.azure.lighthouse.kotlin.inputs.DefinitionPlanArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Manages a [Lighthouse](https://docs.microsoft.com/azure/lighthouse) Definition.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const contributor = azure.authorization.getRoleDefinition({
* roleDefinitionId: "b24988ac-6180-42a0-ab88-20f7382dd24c",
* });
* const example = new azure.lighthouse.Definition("example", {
* 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: [{
* principalId: "00000000-0000-0000-0000-000000000000",
* roleDefinitionId: contributor.then(contributor => contributor.roleDefinitionId),
* principalDisplayName: "Tier 1 Support",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* contributor = azure.authorization.get_role_definition(role_definition_id="b24988ac-6180-42a0-ab88-20f7382dd24c")
* example = azure.lighthouse.Definition("example",
* name="Sample definition",
* description="This is a lighthouse definition created IaC",
* managing_tenant_id="00000000-0000-0000-0000-000000000000",
* scope="/subscriptions/00000000-0000-0000-0000-000000000000",
* authorizations=[azure.lighthouse.DefinitionAuthorizationArgs(
* principal_id="00000000-0000-0000-0000-000000000000",
* role_definition_id=contributor.role_definition_id,
* principal_display_name="Tier 1 Support",
* )])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var contributor = Azure.Authorization.GetRoleDefinition.Invoke(new()
* {
* RoleDefinitionId = "b24988ac-6180-42a0-ab88-20f7382dd24c",
* });
* var example = new Azure.Lighthouse.Definition("example", new()
* {
* 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 = new[]
* {
* new Azure.Lighthouse.Inputs.DefinitionAuthorizationArgs
* {
* PrincipalId = "00000000-0000-0000-0000-000000000000",
* RoleDefinitionId = contributor.Apply(getRoleDefinitionResult => getRoleDefinitionResult.RoleDefinitionId),
* PrincipalDisplayName = "Tier 1 Support",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lighthouse"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* contributor, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
* RoleDefinitionId: pulumi.StringRef("b24988ac-6180-42a0-ab88-20f7382dd24c"),
* }, nil)
* if err != nil {
* return err
* }
* _, err = lighthouse.NewDefinition(ctx, "example", &lighthouse.DefinitionArgs{
* Name: pulumi.String("Sample definition"),
* Description: pulumi.String("This is a lighthouse definition created IaC"),
* ManagingTenantId: pulumi.String("00000000-0000-0000-0000-000000000000"),
* Scope: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000"),
* Authorizations: lighthouse.DefinitionAuthorizationArray{
* &lighthouse.DefinitionAuthorizationArgs{
* PrincipalId: pulumi.String("00000000-0000-0000-0000-000000000000"),
* RoleDefinitionId: pulumi.String(contributor.RoleDefinitionId),
* PrincipalDisplayName: pulumi.String("Tier 1 Support"),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:lighthouse:Definition
* properties:
* 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:
* - principalId: 00000000-0000-0000-0000-000000000000
* roleDefinitionId: ${contributor.roleDefinitionId}
* principalDisplayName: Tier 1 Support
* variables:
* contributor:
* fn::invoke:
* Function: azure:authorization:getRoleDefinition
* Arguments:
* roleDefinitionId: b24988ac-6180-42a0-ab88-20f7382dd24c
* ```
*
* ## 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
* ```
* @property authorizations An `authorization` block as defined below.
* @property description A description of the Lighthouse Definition.
* @property eligibleAuthorizations An `eligible_authorization` block as defined below.
* @property lighthouseDefinitionId 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.
* @property managingTenantId The ID of the managing tenant. Changing this forces a new resource to be created.
* @property name The name of the Lighthouse Definition. Changing this forces a new resource to be created.
* @property plan A `plan` block as defined below.
* @property scope The ID of the managed subscription. Changing this forces a new resource to be created.
*/
public data class DefinitionArgs(
public val authorizations: Output>? = null,
public val description: Output? = null,
public val eligibleAuthorizations: Output>? = null,
public val lighthouseDefinitionId: Output? = null,
public val managingTenantId: Output? = null,
public val name: Output? = null,
public val plan: Output? = null,
public val scope: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.lighthouse.DefinitionArgs =
com.pulumi.azure.lighthouse.DefinitionArgs.builder()
.authorizations(
authorizations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.description(description?.applyValue({ args0 -> args0 }))
.eligibleAuthorizations(
eligibleAuthorizations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.lighthouseDefinitionId(lighthouseDefinitionId?.applyValue({ args0 -> args0 }))
.managingTenantId(managingTenantId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.plan(plan?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.scope(scope?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DefinitionArgs].
*/
@PulumiTagMarker
public class DefinitionArgsBuilder internal constructor() {
private var authorizations: Output>? = null
private var description: Output? = null
private var eligibleAuthorizations: Output>? = null
private var lighthouseDefinitionId: Output? = null
private var managingTenantId: Output? = null
private var name: Output? = null
private var plan: Output? = null
private var scope: Output? = null
/**
* @param value An `authorization` block as defined below.
*/
@JvmName("qljocrgodyxnvhlc")
public suspend fun authorizations(`value`: Output>) {
this.authorizations = value
}
@JvmName("icphxwlfddiwremp")
public suspend fun authorizations(vararg values: Output) {
this.authorizations = Output.all(values.asList())
}
/**
* @param values An `authorization` block as defined below.
*/
@JvmName("wiaumrhdejkvfjma")
public suspend fun authorizations(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy