com.pulumi.gcp.storage.kotlin.TransferAgentPoolArgs.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.storage.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.storage.TransferAgentPoolArgs.builder
import com.pulumi.gcp.storage.kotlin.inputs.TransferAgentPoolBandwidthLimitArgs
import com.pulumi.gcp.storage.kotlin.inputs.TransferAgentPoolBandwidthLimitArgsBuilder
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.jvm.JvmName
/**
* Represents an On-Premises Agent pool.
* To get more information about AgentPool, see:
* * [API documentation](https://cloud.google.com/storage-transfer/docs/reference/rest/v1/projects.agentPools)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/storage-transfer/docs/on-prem-agent-pools)
* ## Example Usage
* ### Agent Pool Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const default = gcp.storage.getTransferProjectServiceAccount({
* project: "my-project-name",
* });
* const pubsubEditorRole = new gcp.projects.IAMMember("pubsub_editor_role", {
* project: "my-project-name",
* role: "roles/pubsub.editor",
* member: _default.then(_default => `serviceAccount:${_default.email}`),
* });
* const example = new gcp.storage.TransferAgentPool("example", {
* name: "agent-pool-example",
* displayName: "Source A to destination Z",
* bandwidthLimit: {
* limitMbps: "120",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* default = gcp.storage.get_transfer_project_service_account(project="my-project-name")
* pubsub_editor_role = gcp.projects.IAMMember("pubsub_editor_role",
* project="my-project-name",
* role="roles/pubsub.editor",
* member=f"serviceAccount:{default.email}")
* example = gcp.storage.TransferAgentPool("example",
* name="agent-pool-example",
* display_name="Source A to destination Z",
* bandwidth_limit=gcp.storage.TransferAgentPoolBandwidthLimitArgs(
* limit_mbps="120",
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var @default = Gcp.Storage.GetTransferProjectServiceAccount.Invoke(new()
* {
* Project = "my-project-name",
* });
* var pubsubEditorRole = new Gcp.Projects.IAMMember("pubsub_editor_role", new()
* {
* Project = "my-project-name",
* Role = "roles/pubsub.editor",
* Member = @default.Apply(@default => $"serviceAccount:{@default.Apply(getTransferProjectServiceAccountResult => getTransferProjectServiceAccountResult.Email)}"),
* });
* var example = new Gcp.Storage.TransferAgentPool("example", new()
* {
* Name = "agent-pool-example",
* DisplayName = "Source A to destination Z",
* BandwidthLimit = new Gcp.Storage.Inputs.TransferAgentPoolBandwidthLimitArgs
* {
* LimitMbps = "120",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/projects"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/storage"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _default, err := storage.GetTransferProjectServiceAccount(ctx, &storage.GetTransferProjectServiceAccountArgs{
* Project: pulumi.StringRef("my-project-name"),
* }, nil)
* if err != nil {
* return err
* }
* _, err = projects.NewIAMMember(ctx, "pubsub_editor_role", &projects.IAMMemberArgs{
* Project: pulumi.String("my-project-name"),
* Role: pulumi.String("roles/pubsub.editor"),
* Member: pulumi.String(fmt.Sprintf("serviceAccount:%v", _default.Email)),
* })
* if err != nil {
* return err
* }
* _, err = storage.NewTransferAgentPool(ctx, "example", &storage.TransferAgentPoolArgs{
* Name: pulumi.String("agent-pool-example"),
* DisplayName: pulumi.String("Source A to destination Z"),
* BandwidthLimit: &storage.TransferAgentPoolBandwidthLimitArgs{
* LimitMbps: pulumi.String("120"),
* },
* })
* 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.storage.StorageFunctions;
* import com.pulumi.gcp.storage.inputs.GetTransferProjectServiceAccountArgs;
* import com.pulumi.gcp.projects.IAMMember;
* import com.pulumi.gcp.projects.IAMMemberArgs;
* import com.pulumi.gcp.storage.TransferAgentPool;
* import com.pulumi.gcp.storage.TransferAgentPoolArgs;
* import com.pulumi.gcp.storage.inputs.TransferAgentPoolBandwidthLimitArgs;
* 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 default = StorageFunctions.getTransferProjectServiceAccount(GetTransferProjectServiceAccountArgs.builder()
* .project("my-project-name")
* .build());
* var pubsubEditorRole = new IAMMember("pubsubEditorRole", IAMMemberArgs.builder()
* .project("my-project-name")
* .role("roles/pubsub.editor")
* .member(String.format("serviceAccount:%s", default_.email()))
* .build());
* var example = new TransferAgentPool("example", TransferAgentPoolArgs.builder()
* .name("agent-pool-example")
* .displayName("Source A to destination Z")
* .bandwidthLimit(TransferAgentPoolBandwidthLimitArgs.builder()
* .limitMbps("120")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* pubsubEditorRole:
* type: gcp:projects:IAMMember
* name: pubsub_editor_role
* properties:
* project: my-project-name
* role: roles/pubsub.editor
* member: serviceAccount:${default.email}
* example:
* type: gcp:storage:TransferAgentPool
* properties:
* name: agent-pool-example
* displayName: Source A to destination Z
* bandwidthLimit:
* limitMbps: '120'
* variables:
* default:
* fn::invoke:
* Function: gcp:storage:getTransferProjectServiceAccount
* Arguments:
* project: my-project-name
* ```
*
* ## Import
* AgentPool can be imported using any of these accepted formats:
* * `projects/{{project}}/agentPools/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, AgentPool can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default projects/{{project}}/agentPools/{{name}}
* ```
* ```sh
* $ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default {{name}}
* ```
* @property bandwidthLimit Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'.
* Structure is documented below.
* @property displayName Specifies the client-specified AgentPool description.
* @property name The ID of the agent pool to create.
* The agentPoolId must meet the following requirements:
* * Length of 128 characters or less.
* * Not start with the string goog.
* * Start with a lowercase ASCII character, followed by:
* * Zero or more: lowercase Latin alphabet characters, numerals, hyphens (-), periods (.), underscores (_), or tildes (~).
* * One or more numerals or lowercase ASCII characters.
* As expressed by the regular expression: ^(?!goog)a-z?$.
* - - -
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public data class TransferAgentPoolArgs(
public val bandwidthLimit: Output? = null,
public val displayName: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.storage.TransferAgentPoolArgs =
com.pulumi.gcp.storage.TransferAgentPoolArgs.builder()
.bandwidthLimit(bandwidthLimit?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.displayName(displayName?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TransferAgentPoolArgs].
*/
@PulumiTagMarker
public class TransferAgentPoolArgsBuilder internal constructor() {
private var bandwidthLimit: Output? = null
private var displayName: Output? = null
private var name: Output? = null
private var project: Output? = null
/**
* @param value Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'.
* Structure is documented below.
*/
@JvmName("ydveqpedprgnfjqn")
public suspend fun bandwidthLimit(`value`: Output) {
this.bandwidthLimit = value
}
/**
* @param value Specifies the client-specified AgentPool description.
*/
@JvmName("srgqbamtkumjsaag")
public suspend fun displayName(`value`: Output) {
this.displayName = value
}
/**
* @param value The ID of the agent pool to create.
* The agentPoolId must meet the following requirements:
* * Length of 128 characters or less.
* * Not start with the string goog.
* * Start with a lowercase ASCII character, followed by:
* * Zero or more: lowercase Latin alphabet characters, numerals, hyphens (-), periods (.), underscores (_), or tildes (~).
* * One or more numerals or lowercase ASCII characters.
* As expressed by the regular expression: ^(?!goog)a-z?$.
* - - -
*/
@JvmName("cdipcgxllgjukvrm")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("ibcyuhgphxacsvjn")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'.
* Structure is documented below.
*/
@JvmName("invdxucwganiuetw")
public suspend fun bandwidthLimit(`value`: TransferAgentPoolBandwidthLimitArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.bandwidthLimit = mapped
}
/**
* @param argument Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'.
* Structure is documented below.
*/
@JvmName("jhgudmkwcicrrvyi")
public suspend fun bandwidthLimit(argument: suspend TransferAgentPoolBandwidthLimitArgsBuilder.() -> Unit) {
val toBeMapped = TransferAgentPoolBandwidthLimitArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.bandwidthLimit = mapped
}
/**
* @param value Specifies the client-specified AgentPool description.
*/
@JvmName("viulekyheltdnonp")
public suspend fun displayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.displayName = mapped
}
/**
* @param value The ID of the agent pool to create.
* The agentPoolId must meet the following requirements:
* * Length of 128 characters or less.
* * Not start with the string goog.
* * Start with a lowercase ASCII character, followed by:
* * Zero or more: lowercase Latin alphabet characters, numerals, hyphens (-), periods (.), underscores (_), or tildes (~).
* * One or more numerals or lowercase ASCII characters.
* As expressed by the regular expression: ^(?!goog)a-z?$.
* - - -
*/
@JvmName("wmeqqfbnguqhmgdx")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("ictjpkigybvlohaf")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): TransferAgentPoolArgs = TransferAgentPoolArgs(
bandwidthLimit = bandwidthLimit,
displayName = displayName,
name = name,
project = project,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy