com.pulumi.gcp.apigee.kotlin.EndpointAttachmentArgs.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.apigee.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.apigee.EndpointAttachmentArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Apigee Endpoint Attachment.
* To get more information about EndpointAttachment, see:
* * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.endpointAttachments/create)
* * How-to Guides
* * [Creating an environment](https://cloud.google.com/apigee/docs/api-platform/get-started/create-environment)
* ## Example Usage
* ### Apigee Endpoint Attachment Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const current = gcp.organizations.getClientConfig({});
* const apigeeNetwork = new gcp.compute.Network("apigee_network", {name: "apigee-network"});
* const apigeeRange = new gcp.compute.GlobalAddress("apigee_range", {
* name: "apigee-range",
* purpose: "VPC_PEERING",
* addressType: "INTERNAL",
* prefixLength: 16,
* network: apigeeNetwork.id,
* });
* const apigeeVpcConnection = new gcp.servicenetworking.Connection("apigee_vpc_connection", {
* network: apigeeNetwork.id,
* service: "servicenetworking.googleapis.com",
* reservedPeeringRanges: [apigeeRange.name],
* });
* const apigeeOrg = new gcp.apigee.Organization("apigee_org", {
* analyticsRegion: "us-central1",
* projectId: current.then(current => current.project),
* authorizedNetwork: apigeeNetwork.id,
* });
* const apigeeEndpointAttachment = new gcp.apigee.EndpointAttachment("apigee_endpoint_attachment", {
* orgId: apigeeOrg.id,
* endpointAttachmentId: "test1",
* location: "{google_compute_service_attachment location}",
* serviceAttachment: "{google_compute_service_attachment id}",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* current = gcp.organizations.get_client_config()
* apigee_network = gcp.compute.Network("apigee_network", name="apigee-network")
* apigee_range = gcp.compute.GlobalAddress("apigee_range",
* name="apigee-range",
* purpose="VPC_PEERING",
* address_type="INTERNAL",
* prefix_length=16,
* network=apigee_network.id)
* apigee_vpc_connection = gcp.servicenetworking.Connection("apigee_vpc_connection",
* network=apigee_network.id,
* service="servicenetworking.googleapis.com",
* reserved_peering_ranges=[apigee_range.name])
* apigee_org = gcp.apigee.Organization("apigee_org",
* analytics_region="us-central1",
* project_id=current.project,
* authorized_network=apigee_network.id)
* apigee_endpoint_attachment = gcp.apigee.EndpointAttachment("apigee_endpoint_attachment",
* org_id=apigee_org.id,
* endpoint_attachment_id="test1",
* location="{google_compute_service_attachment location}",
* service_attachment="{google_compute_service_attachment id}")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var current = Gcp.Organizations.GetClientConfig.Invoke();
* var apigeeNetwork = new Gcp.Compute.Network("apigee_network", new()
* {
* Name = "apigee-network",
* });
* var apigeeRange = new Gcp.Compute.GlobalAddress("apigee_range", new()
* {
* Name = "apigee-range",
* Purpose = "VPC_PEERING",
* AddressType = "INTERNAL",
* PrefixLength = 16,
* Network = apigeeNetwork.Id,
* });
* var apigeeVpcConnection = new Gcp.ServiceNetworking.Connection("apigee_vpc_connection", new()
* {
* Network = apigeeNetwork.Id,
* Service = "servicenetworking.googleapis.com",
* ReservedPeeringRanges = new[]
* {
* apigeeRange.Name,
* },
* });
* var apigeeOrg = new Gcp.Apigee.Organization("apigee_org", new()
* {
* AnalyticsRegion = "us-central1",
* ProjectId = current.Apply(getClientConfigResult => getClientConfigResult.Project),
* AuthorizedNetwork = apigeeNetwork.Id,
* });
* var apigeeEndpointAttachment = new Gcp.Apigee.EndpointAttachment("apigee_endpoint_attachment", new()
* {
* OrgId = apigeeOrg.Id,
* EndpointAttachmentId = "test1",
* Location = "{google_compute_service_attachment location}",
* ServiceAttachment = "{google_compute_service_attachment id}",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/apigee"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicenetworking"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* current, err := organizations.GetClientConfig(ctx, nil, nil)
* if err != nil {
* return err
* }
* apigeeNetwork, err := compute.NewNetwork(ctx, "apigee_network", &compute.NetworkArgs{
* Name: pulumi.String("apigee-network"),
* })
* if err != nil {
* return err
* }
* apigeeRange, err := compute.NewGlobalAddress(ctx, "apigee_range", &compute.GlobalAddressArgs{
* Name: pulumi.String("apigee-range"),
* Purpose: pulumi.String("VPC_PEERING"),
* AddressType: pulumi.String("INTERNAL"),
* PrefixLength: pulumi.Int(16),
* Network: apigeeNetwork.ID(),
* })
* if err != nil {
* return err
* }
* _, err = servicenetworking.NewConnection(ctx, "apigee_vpc_connection", &servicenetworking.ConnectionArgs{
* Network: apigeeNetwork.ID(),
* Service: pulumi.String("servicenetworking.googleapis.com"),
* ReservedPeeringRanges: pulumi.StringArray{
* apigeeRange.Name,
* },
* })
* if err != nil {
* return err
* }
* apigeeOrg, err := apigee.NewOrganization(ctx, "apigee_org", &apigee.OrganizationArgs{
* AnalyticsRegion: pulumi.String("us-central1"),
* ProjectId: pulumi.String(current.Project),
* AuthorizedNetwork: apigeeNetwork.ID(),
* })
* if err != nil {
* return err
* }
* _, err = apigee.NewEndpointAttachment(ctx, "apigee_endpoint_attachment", &apigee.EndpointAttachmentArgs{
* OrgId: apigeeOrg.ID(),
* EndpointAttachmentId: pulumi.String("test1"),
* Location: pulumi.String("{google_compute_service_attachment location}"),
* ServiceAttachment: pulumi.String("{google_compute_service_attachment id}"),
* })
* 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.OrganizationsFunctions;
* import com.pulumi.gcp.compute.Network;
* import com.pulumi.gcp.compute.NetworkArgs;
* import com.pulumi.gcp.compute.GlobalAddress;
* import com.pulumi.gcp.compute.GlobalAddressArgs;
* import com.pulumi.gcp.servicenetworking.Connection;
* import com.pulumi.gcp.servicenetworking.ConnectionArgs;
* import com.pulumi.gcp.apigee.Organization;
* import com.pulumi.gcp.apigee.OrganizationArgs;
* import com.pulumi.gcp.apigee.EndpointAttachment;
* import com.pulumi.gcp.apigee.EndpointAttachmentArgs;
* 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 current = OrganizationsFunctions.getClientConfig();
* var apigeeNetwork = new Network("apigeeNetwork", NetworkArgs.builder()
* .name("apigee-network")
* .build());
* var apigeeRange = new GlobalAddress("apigeeRange", GlobalAddressArgs.builder()
* .name("apigee-range")
* .purpose("VPC_PEERING")
* .addressType("INTERNAL")
* .prefixLength(16)
* .network(apigeeNetwork.id())
* .build());
* var apigeeVpcConnection = new Connection("apigeeVpcConnection", ConnectionArgs.builder()
* .network(apigeeNetwork.id())
* .service("servicenetworking.googleapis.com")
* .reservedPeeringRanges(apigeeRange.name())
* .build());
* var apigeeOrg = new Organization("apigeeOrg", OrganizationArgs.builder()
* .analyticsRegion("us-central1")
* .projectId(current.applyValue(getClientConfigResult -> getClientConfigResult.project()))
* .authorizedNetwork(apigeeNetwork.id())
* .build());
* var apigeeEndpointAttachment = new EndpointAttachment("apigeeEndpointAttachment", EndpointAttachmentArgs.builder()
* .orgId(apigeeOrg.id())
* .endpointAttachmentId("test1")
* .location("{google_compute_service_attachment location}")
* .serviceAttachment("{google_compute_service_attachment id}")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* apigeeNetwork:
* type: gcp:compute:Network
* name: apigee_network
* properties:
* name: apigee-network
* apigeeRange:
* type: gcp:compute:GlobalAddress
* name: apigee_range
* properties:
* name: apigee-range
* purpose: VPC_PEERING
* addressType: INTERNAL
* prefixLength: 16
* network: ${apigeeNetwork.id}
* apigeeVpcConnection:
* type: gcp:servicenetworking:Connection
* name: apigee_vpc_connection
* properties:
* network: ${apigeeNetwork.id}
* service: servicenetworking.googleapis.com
* reservedPeeringRanges:
* - ${apigeeRange.name}
* apigeeOrg:
* type: gcp:apigee:Organization
* name: apigee_org
* properties:
* analyticsRegion: us-central1
* projectId: ${current.project}
* authorizedNetwork: ${apigeeNetwork.id}
* apigeeEndpointAttachment:
* type: gcp:apigee:EndpointAttachment
* name: apigee_endpoint_attachment
* properties:
* orgId: ${apigeeOrg.id}
* endpointAttachmentId: test1
* location: '{google_compute_service_attachment location}'
* serviceAttachment: '{google_compute_service_attachment id}'
* variables:
* current:
* fn::invoke:
* Function: gcp:organizations:getClientConfig
* Arguments: {}
* ```
*
* ## Import
* EndpointAttachment can be imported using any of these accepted formats:
* * `{{org_id}}/endpointAttachments/{{endpoint_attachment_id}}`
* * `{{org_id}}/{{endpoint_attachment_id}}`
* When using the `pulumi import` command, EndpointAttachment can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:apigee/endpointAttachment:EndpointAttachment default {{org_id}}/endpointAttachments/{{endpoint_attachment_id}}
* ```
* ```sh
* $ pulumi import gcp:apigee/endpointAttachment:EndpointAttachment default {{org_id}}/{{endpoint_attachment_id}}
* ```
* @property endpointAttachmentId ID of the endpoint attachment.
* - - -
* @property location Location of the endpoint attachment.
* @property orgId The Apigee Organization associated with the Apigee instance,
* in the format `organizations/{{org_name}}`.
* @property serviceAttachment Format: projects/*/regions/*/serviceAttachments/*
* */*/*/
*/
public data class EndpointAttachmentArgs(
public val endpointAttachmentId: Output? = null,
public val location: Output? = null,
public val orgId: Output? = null,
public val serviceAttachment: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.apigee.EndpointAttachmentArgs =
com.pulumi.gcp.apigee.EndpointAttachmentArgs.builder()
.endpointAttachmentId(endpointAttachmentId?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.orgId(orgId?.applyValue({ args0 -> args0 }))
.serviceAttachment(serviceAttachment?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [EndpointAttachmentArgs].
*/
@PulumiTagMarker
public class EndpointAttachmentArgsBuilder internal constructor() {
private var endpointAttachmentId: Output? = null
private var location: Output? = null
private var orgId: Output? = null
private var serviceAttachment: Output? = null
/**
* @param value ID of the endpoint attachment.
* - - -
*/
@JvmName("nbeuvxnaoyhtrhkk")
public suspend fun endpointAttachmentId(`value`: Output) {
this.endpointAttachmentId = value
}
/**
* @param value Location of the endpoint attachment.
*/
@JvmName("iitscbmphobdidfq")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The Apigee Organization associated with the Apigee instance,
* in the format `organizations/{{org_name}}`.
*/
@JvmName("tmoanxvlgfblvngn")
public suspend fun orgId(`value`: Output) {
this.orgId = value
}
/**
* @param value Format: projects/*/regions/*/serviceAttachments/*
* */*/*/
*/
@JvmName("svapqmqrmouymeoo")
public suspend fun serviceAttachment(`value`: Output) {
this.serviceAttachment = value
}
/**
* @param value ID of the endpoint attachment.
* - - -
*/
@JvmName("avqwuktbdrapmknw")
public suspend fun endpointAttachmentId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.endpointAttachmentId = mapped
}
/**
* @param value Location of the endpoint attachment.
*/
@JvmName("pqpuwcoappjrtptq")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The Apigee Organization associated with the Apigee instance,
* in the format `organizations/{{org_name}}`.
*/
@JvmName("eqfynnjiejebkirn")
public suspend fun orgId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.orgId = mapped
}
/**
* @param value Format: projects/*/regions/*/serviceAttachments/*
* */*/*/
*/
@JvmName("uyesohgiiwndkcln")
public suspend fun serviceAttachment(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceAttachment = mapped
}
internal fun build(): EndpointAttachmentArgs = EndpointAttachmentArgs(
endpointAttachmentId = endpointAttachmentId,
location = location,
orgId = orgId,
serviceAttachment = serviceAttachment,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy