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.azure.graph.kotlin.ServicesAccountArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.graph.kotlin
import com.pulumi.azure.graph.ServicesAccountArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Microsoft Graph Services Account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* import * as azuread from "@pulumi/azuread";
* const example = new azuread.Application("example", {displayName: "example-app"});
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleServicesAccount = new azure.graph.ServicesAccount("example", {
* name: "example",
* resourceGroupName: exampleResourceGroup.name,
* applicationId: example.applicationId,
* tags: {
* environment: "Production",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* import pulumi_azuread as azuread
* example = azuread.Application("example", display_name="example-app")
* example_resource_group = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_services_account = azure.graph.ServicesAccount("example",
* name="example",
* resource_group_name=example_resource_group.name,
* application_id=example.application_id,
* tags={
* "environment": "Production",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* using AzureAD = Pulumi.AzureAD;
* return await Deployment.RunAsync(() =>
* {
* var example = new AzureAD.Application("example", new()
* {
* DisplayName = "example-app",
* });
* var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleServicesAccount = new Azure.Graph.ServicesAccount("example", new()
* {
* Name = "example",
* ResourceGroupName = exampleResourceGroup.Name,
* ApplicationId = example.ApplicationId,
* Tags =
* {
* { "environment", "Production" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/graph"
* "github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := azuread.NewApplication(ctx, "example", &azuread.ApplicationArgs{
* DisplayName: pulumi.String("example-app"),
* })
* if err != nil {
* return err
* }
* exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = graph.NewServicesAccount(ctx, "example", &graph.ServicesAccountArgs{
* Name: pulumi.String("example"),
* ResourceGroupName: exampleResourceGroup.Name,
* ApplicationId: example.ApplicationId,
* Tags: pulumi.StringMap{
* "environment": pulumi.String("Production"),
* },
* })
* 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.azuread.Application;
* import com.pulumi.azuread.ApplicationArgs;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.graph.ServicesAccount;
* import com.pulumi.azure.graph.ServicesAccountArgs;
* 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 Application("example", ApplicationArgs.builder()
* .displayName("example-app")
* .build());
* var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleServicesAccount = new ServicesAccount("exampleServicesAccount", ServicesAccountArgs.builder()
* .name("example")
* .resourceGroupName(exampleResourceGroup.name())
* .applicationId(example.applicationId())
* .tags(Map.of("environment", "Production"))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azuread:Application
* properties:
* displayName: example-app
* exampleResourceGroup:
* type: azure:core:ResourceGroup
* name: example
* properties:
* name: example-resources
* location: West Europe
* exampleServicesAccount:
* type: azure:graph:ServicesAccount
* name: example
* properties:
* name: example
* resourceGroupName: ${exampleResourceGroup.name}
* applicationId: ${example.applicationId}
* tags:
* environment: Production
* ```
*
* ## Import
* An existing Account can be imported into Terraform using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:graph/servicesAccount:ServicesAccount example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.GraphServices/accounts/account1
* ```
* @property applicationId Customer owned application ID. Changing this forces a new Account to be created.
* @property name Specifies the name of this Account. Changing this forces a new Account to be created.
* @property resourceGroupName Specifies the name of the Resource Group within which this Account should exist. Changing this forces a new Account to be created.
* @property tags A mapping of tags which should be assigned to the Account.
*/
public data class ServicesAccountArgs(
public val applicationId: Output? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.graph.ServicesAccountArgs =
com.pulumi.azure.graph.ServicesAccountArgs.builder()
.applicationId(applicationId?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [ServicesAccountArgs].
*/
@PulumiTagMarker
public class ServicesAccountArgsBuilder internal constructor() {
private var applicationId: Output? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
/**
* @param value Customer owned application ID. Changing this forces a new Account to be created.
*/
@JvmName("iwtbnycskwjtseyp")
public suspend fun applicationId(`value`: Output) {
this.applicationId = value
}
/**
* @param value Specifies the name of this Account. Changing this forces a new Account to be created.
*/
@JvmName("mmgahyxrolmtnkxb")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Specifies the name of the Resource Group within which this Account should exist. Changing this forces a new Account to be created.
*/
@JvmName("lkolpjrwqkvbpriw")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value A mapping of tags which should be assigned to the Account.
*/
@JvmName("nhueaydqtkumgosh")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Customer owned application ID. Changing this forces a new Account to be created.
*/
@JvmName("dxinftbriwutfpph")
public suspend fun applicationId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.applicationId = mapped
}
/**
* @param value Specifies the name of this Account. Changing this forces a new Account to be created.
*/
@JvmName("dhpcokrmcfxamhqq")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Specifies the name of the Resource Group within which this Account should exist. Changing this forces a new Account to be created.
*/
@JvmName("pqdlruqalumshfkw")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value A mapping of tags which should be assigned to the Account.
*/
@JvmName("ueajsigpdpffoovw")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A mapping of tags which should be assigned to the Account.
*/
@JvmName("nvbxoselifdcwwon")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): ServicesAccountArgs = ServicesAccountArgs(
applicationId = applicationId,
name = name,
resourceGroupName = resourceGroupName,
tags = tags,
)
}