![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.domainservices.kotlin.ServiceTrust.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.domainservices.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
import kotlin.collections.List
/**
* Builder for [ServiceTrust].
*/
@PulumiTagMarker
public class ServiceTrustResourceBuilder internal constructor() {
public var name: String? = null
public var args: ServiceTrustArgs = ServiceTrustArgs()
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 ServiceTrustArgsBuilder.() -> Unit) {
val builder = ServiceTrustArgsBuilder()
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(): ServiceTrust {
val builtJavaResource = com.pulumi.azure.domainservices.ServiceTrust(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ServiceTrust(builtJavaResource)
}
}
/**
* Manages a Active Directory Domain Service Trust.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.domainservices.getService({
* name: "example-ds",
* resourceGroupName: "example-rg",
* });
* const exampleServiceTrust = new azure.domainservices.ServiceTrust("example", {
* name: "example-trust",
* domainServiceId: example.then(example => example.id),
* trustedDomainFqdn: "example.com",
* trustedDomainDnsIps: [
* "10.1.0.3",
* "10.1.0.4",
* ],
* password: "Password123",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.domainservices.get_service(name="example-ds",
* resource_group_name="example-rg")
* example_service_trust = azure.domainservices.ServiceTrust("example",
* name="example-trust",
* domain_service_id=example.id,
* trusted_domain_fqdn="example.com",
* trusted_domain_dns_ips=[
* "10.1.0.3",
* "10.1.0.4",
* ],
* password="Password123")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.DomainServices.GetService.Invoke(new()
* {
* Name = "example-ds",
* ResourceGroupName = "example-rg",
* });
* var exampleServiceTrust = new Azure.DomainServices.ServiceTrust("example", new()
* {
* Name = "example-trust",
* DomainServiceId = example.Apply(getServiceResult => getServiceResult.Id),
* TrustedDomainFqdn = "example.com",
* TrustedDomainDnsIps = new[]
* {
* "10.1.0.3",
* "10.1.0.4",
* },
* Password = "Password123",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/domainservices"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := domainservices.LookupService(ctx, &domainservices.LookupServiceArgs{
* Name: "example-ds",
* ResourceGroupName: "example-rg",
* }, nil)
* if err != nil {
* return err
* }
* _, err = domainservices.NewServiceTrust(ctx, "example", &domainservices.ServiceTrustArgs{
* Name: pulumi.String("example-trust"),
* DomainServiceId: pulumi.String(example.Id),
* TrustedDomainFqdn: pulumi.String("example.com"),
* TrustedDomainDnsIps: pulumi.StringArray{
* pulumi.String("10.1.0.3"),
* pulumi.String("10.1.0.4"),
* },
* Password: pulumi.String("Password123"),
* })
* 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.domainservices.DomainservicesFunctions;
* import com.pulumi.azure.domainservices.inputs.GetServiceArgs;
* import com.pulumi.azure.domainservices.ServiceTrust;
* import com.pulumi.azure.domainservices.ServiceTrustArgs;
* 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 example = DomainservicesFunctions.getService(GetServiceArgs.builder()
* .name("example-ds")
* .resourceGroupName("example-rg")
* .build());
* var exampleServiceTrust = new ServiceTrust("exampleServiceTrust", ServiceTrustArgs.builder()
* .name("example-trust")
* .domainServiceId(example.applyValue(getServiceResult -> getServiceResult.id()))
* .trustedDomainFqdn("example.com")
* .trustedDomainDnsIps(
* "10.1.0.3",
* "10.1.0.4")
* .password("Password123")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleServiceTrust:
* type: azure:domainservices:ServiceTrust
* name: example
* properties:
* name: example-trust
* domainServiceId: ${example.id}
* trustedDomainFqdn: example.com
* trustedDomainDnsIps:
* - 10.1.0.3
* - 10.1.0.4
* password: Password123
* variables:
* example:
* fn::invoke:
* Function: azure:domainservices:getService
* Arguments:
* name: example-ds
* resourceGroupName: example-rg
* ```
*
* ## Import
* Active Directory Domain Service Trusts can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:domainservices/serviceTrust:ServiceTrust example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.AAD/domainServices/DomainService1/trusts/trust1
* ```
*/
public class ServiceTrust internal constructor(
override val javaResource: com.pulumi.azure.domainservices.ServiceTrust,
) : KotlinCustomResource(javaResource, ServiceTrustMapper) {
/**
* The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
*/
public val domainServiceId: Output
get() = javaResource.domainServiceId().applyValue({ args0 -> args0 })
/**
* The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The password of the inbound trust set in the on-premise Active Directory Domain Service.
*/
public val password: Output
get() = javaResource.password().applyValue({ args0 -> args0 })
/**
* Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
*/
public val trustedDomainDnsIps: Output>
get() = javaResource.trustedDomainDnsIps().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The FQDN of the on-premise Active Directory Domain Service.
*/
public val trustedDomainFqdn: Output
get() = javaResource.trustedDomainFqdn().applyValue({ args0 -> args0 })
}
public object ServiceTrustMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.domainservices.ServiceTrust::class == javaResource::class
override fun map(javaResource: Resource): ServiceTrust = ServiceTrust(
javaResource as
com.pulumi.azure.domainservices.ServiceTrust,
)
}
/**
* @see [ServiceTrust].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ServiceTrust].
*/
public suspend fun serviceTrust(
name: String,
block: suspend ServiceTrustResourceBuilder.() -> Unit,
): ServiceTrust {
val builder = ServiceTrustResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ServiceTrust].
* @param name The _unique_ name of the resulting resource.
*/
public fun serviceTrust(name: String): ServiceTrust {
val builder = ServiceTrustResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy