com.pulumi.gcp.iap.kotlin.Brand.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.iap.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [Brand].
*/
@PulumiTagMarker
public class BrandResourceBuilder internal constructor() {
public var name: String? = null
public var args: BrandArgs = BrandArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend BrandArgsBuilder.() -> Unit) {
val builder = BrandArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Brand {
val builtJavaResource = com.pulumi.gcp.iap.Brand(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Brand(builtJavaResource)
}
}
/**
* ## Example Usage
* ### Iap Brand
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const project = new gcp.organizations.Project("project", {
* projectId: "my-project",
* name: "my-project",
* orgId: "123456789",
* });
* const projectService = new gcp.projects.Service("project_service", {
* project: project.projectId,
* service: "iap.googleapis.com",
* });
* const projectBrand = new gcp.iap.Brand("project_brand", {
* supportEmail: "[email protected]",
* applicationTitle: "Cloud IAP protected Application",
* project: projectService.project,
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.Project("project",
* project_id="my-project",
* name="my-project",
* org_id="123456789")
* project_service = gcp.projects.Service("project_service",
* project=project.project_id,
* service="iap.googleapis.com")
* project_brand = gcp.iap.Brand("project_brand",
* support_email="[email protected]",
* application_title="Cloud IAP protected Application",
* project=project_service.project)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var project = new Gcp.Organizations.Project("project", new()
* {
* ProjectId = "my-project",
* Name = "my-project",
* OrgId = "123456789",
* });
* var projectService = new Gcp.Projects.Service("project_service", new()
* {
* Project = project.ProjectId,
* ServiceName = "iap.googleapis.com",
* });
* var projectBrand = new Gcp.Iap.Brand("project_brand", new()
* {
* SupportEmail = "[email protected]",
* ApplicationTitle = "Cloud IAP protected Application",
* Project = projectService.Project,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/iap"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
* ProjectId: pulumi.String("my-project"),
* Name: pulumi.String("my-project"),
* OrgId: pulumi.String("123456789"),
* })
* if err != nil {
* return err
* }
* projectService, err := projects.NewService(ctx, "project_service", &projects.ServiceArgs{
* Project: project.ProjectId,
* Service: pulumi.String("iap.googleapis.com"),
* })
* if err != nil {
* return err
* }
* _, err = iap.NewBrand(ctx, "project_brand", &iap.BrandArgs{
* SupportEmail: pulumi.String("[email protected]"),
* ApplicationTitle: pulumi.String("Cloud IAP protected Application"),
* Project: projectService.Project,
* })
* 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.gcp.organizations.Project;
* import com.pulumi.gcp.organizations.ProjectArgs;
* import com.pulumi.gcp.projects.Service;
* import com.pulumi.gcp.projects.ServiceArgs;
* import com.pulumi.gcp.iap.Brand;
* import com.pulumi.gcp.iap.BrandArgs;
* 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 project = new Project("project", ProjectArgs.builder()
* .projectId("my-project")
* .name("my-project")
* .orgId("123456789")
* .build());
* var projectService = new Service("projectService", ServiceArgs.builder()
* .project(project.projectId())
* .service("iap.googleapis.com")
* .build());
* var projectBrand = new Brand("projectBrand", BrandArgs.builder()
* .supportEmail("[email protected]")
* .applicationTitle("Cloud IAP protected Application")
* .project(projectService.project())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* project:
* type: gcp:organizations:Project
* properties:
* projectId: my-project
* name: my-project
* orgId: '123456789'
* projectService:
* type: gcp:projects:Service
* name: project_service
* properties:
* project: ${project.projectId}
* service: iap.googleapis.com
* projectBrand:
* type: gcp:iap:Brand
* name: project_brand
* properties:
* supportEmail: [email protected]
* applicationTitle: Cloud IAP protected Application
* project: ${projectService.project}
* ```
*
* ## Import
* Brand can be imported using any of these accepted formats:
* * `projects/{{project_id}}/brands/{{brand_id}}`
* * `projects/{{project_number}}/brands/{{brand_id}}`
* * `{{project_number}}/{{brand_id}}`
* When using the `pulumi import` command, Brand can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:iap/brand:Brand default projects/{{project_id}}/brands/{{brand_id}}
* ```
* ```sh
* $ pulumi import gcp:iap/brand:Brand default projects/{{project_number}}/brands/{{brand_id}}
* ```
* ```sh
* $ pulumi import gcp:iap/brand:Brand default {{project_number}}/{{brand_id}}
* ```
*/
public class Brand internal constructor(
override val javaResource: com.pulumi.gcp.iap.Brand,
) : KotlinCustomResource(javaResource, BrandMapper) {
/**
* Application name displayed on OAuth consent screen.
* - - -
*/
public val applicationTitle: Output
get() = javaResource.applicationTitle().applyValue({ args0 -> args0 })
/**
* Output only. Identifier of the brand, in the format `projects/{project_number}/brands/{brand_id}`
* NOTE: The name can also be expressed as `projects/{project_id}/brands/{brand_id}`, e.g. when importing.
* NOTE: The brand identification corresponds to the project number as only one
* brand can be created per project.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Whether the brand is only intended for usage inside the GSuite organization only.
*/
public val orgInternalOnly: Output
get() = javaResource.orgInternalOnly().applyValue({ args0 -> args0 })
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* Support email displayed on the OAuth consent screen. Can be either a
* user or group email. When a user email is specified, the caller must
* be the user with the associated email address. When a group email is
* specified, the caller can be either a user or a service account which
* is an owner of the specified group in Cloud Identity.
*/
public val supportEmail: Output
get() = javaResource.supportEmail().applyValue({ args0 -> args0 })
}
public object BrandMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.iap.Brand::class == javaResource::class
override fun map(javaResource: Resource): Brand = Brand(javaResource as com.pulumi.gcp.iap.Brand)
}
/**
* @see [Brand].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Brand].
*/
public suspend fun brand(name: String, block: suspend BrandResourceBuilder.() -> Unit): Brand {
val builder = BrandResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Brand].
* @param name The _unique_ name of the resulting resource.
*/
public fun brand(name: String): Brand {
val builder = BrandResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy