gcp.storage.TransferAgentPool
Represents an On-Premises Agent pool.
To get more information about AgentPool, see:
- API documentation
- How-to Guides
Example Usage
Agent Pool Basic
using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = Gcp.Storage.GetTransferProjectServieAccount.Invoke(new()
{
Project = "my-project-name",
});
var pubsubEditorRole = new Gcp.Projects.IAMMember("pubsubEditorRole", new()
{
Project = "my-project-name",
Role = "roles/pubsub.editor",
Member = @default.Apply(@default => $"serviceAccount:{@default.Apply(getTransferProjectServieAccountResult => getTransferProjectServieAccountResult.Email)}"),
});
var example = new Gcp.Storage.TransferAgentPool("example", new()
{
DisplayName = "Source A to destination Z",
BandwidthLimit = new Gcp.Storage.Inputs.TransferAgentPoolBandwidthLimitArgs
{
LimitMbps = "120",
},
}, new CustomResourceOptions
{
DependsOn = new[]
{
pubsubEditorRole,
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/projects"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := storage.GetTransferProjectServieAccount(ctx, &storage.GetTransferProjectServieAccountArgs{
Project: pulumi.StringRef("my-project-name"),
}, nil)
if err != nil {
return err
}
pubsubEditorRole, err := projects.NewIAMMember(ctx, "pubsubEditorRole", &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{
DisplayName: pulumi.String("Source A to destination Z"),
BandwidthLimit: &storage.TransferAgentPoolBandwidthLimitArgs{
LimitMbps: pulumi.String("120"),
},
}, pulumi.DependsOn([]pulumi.Resource{
pubsubEditorRole,
}))
if err != nil {
return err
}
return nil
})
}
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.GetTransferProjectServieAccountArgs;
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 com.pulumi.resources.CustomResourceOptions;
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.getTransferProjectServieAccount(GetTransferProjectServieAccountArgs.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()
.displayName("Source A to destination Z")
.bandwidthLimit(TransferAgentPoolBandwidthLimitArgs.builder()
.limitMbps("120")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(pubsubEditorRole)
.build());
}
}
import pulumi
import pulumi_gcp as gcp
default = gcp.storage.get_transfer_project_servie_account(project="my-project-name")
pubsub_editor_role = gcp.projects.IAMMember("pubsubEditorRole",
project="my-project-name",
role="roles/pubsub.editor",
member=f"serviceAccount:{default.email}")
example = gcp.storage.TransferAgentPool("example",
display_name="Source A to destination Z",
bandwidth_limit=gcp.storage.TransferAgentPoolBandwidthLimitArgs(
limit_mbps="120",
),
opts=pulumi.ResourceOptions(depends_on=[pubsub_editor_role]))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const default = gcp.storage.getTransferProjectServieAccount({
project: "my-project-name",
});
const pubsubEditorRole = new gcp.projects.IAMMember("pubsubEditorRole", {
project: "my-project-name",
role: "roles/pubsub.editor",
member: _default.then(_default => `serviceAccount:${_default.email}`),
});
const example = new gcp.storage.TransferAgentPool("example", {
displayName: "Source A to destination Z",
bandwidthLimit: {
limitMbps: "120",
},
}, {
dependsOn: [pubsubEditorRole],
});
resources:
pubsubEditorRole:
type: gcp:projects:IAMMember
properties:
project: my-project-name
role: roles/pubsub.editor
member: serviceAccount:${default.email}
example:
type: gcp:storage:TransferAgentPool
properties:
displayName: Source A to destination Z
bandwidthLimit:
limitMbps: '120'
options:
dependson:
- ${pubsubEditorRole}
variables:
default:
fn::invoke:
Function: gcp:storage:getTransferProjectServieAccount
Arguments:
project: my-project-name
Create TransferAgentPool Resource
new TransferAgentPool(name: string, args?: TransferAgentPoolArgs, opts?: CustomResourceOptions);
@overload
def TransferAgentPool(resource_name: str,
opts: Optional[ResourceOptions] = None,
bandwidth_limit: Optional[TransferAgentPoolBandwidthLimitArgs] = None,
display_name: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None)
@overload
def TransferAgentPool(resource_name: str,
args: Optional[TransferAgentPoolArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewTransferAgentPool(ctx *Context, name string, args *TransferAgentPoolArgs, opts ...ResourceOption) (*TransferAgentPool, error)
public TransferAgentPool(string name, TransferAgentPoolArgs? args = null, CustomResourceOptions? opts = null)
public TransferAgentPool(String name, TransferAgentPoolArgs args)
public TransferAgentPool(String name, TransferAgentPoolArgs args, CustomResourceOptions options)
type: gcp:storage:TransferAgentPool
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TransferAgentPoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TransferAgentPoolArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TransferAgentPoolArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TransferAgentPoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TransferAgentPoolArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TransferAgentPool Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The TransferAgentPool resource accepts the following input properties:
- Bandwidth
Limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- Display
Name string Specifies the client-specified AgentPool description.
- Name string
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?$.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Bandwidth
Limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- Display
Name string Specifies the client-specified AgentPool description.
- Name string
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?$.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bandwidth
Limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- display
Name String Specifies the client-specified AgentPool description.
- name String
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?$.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bandwidth
Limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- display
Name string Specifies the client-specified AgentPool description.
- name string
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?$.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bandwidth_
limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- display_
name str Specifies the client-specified AgentPool description.
- name str
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?$.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- bandwidth
Limit Property Map Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- display
Name String Specifies the client-specified AgentPool description.
- name String
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?$.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the TransferAgentPool resource produces the following output properties:
Look up Existing TransferAgentPool Resource
Get an existing TransferAgentPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TransferAgentPoolState, opts?: CustomResourceOptions): TransferAgentPool
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bandwidth_limit: Optional[TransferAgentPoolBandwidthLimitArgs] = None,
display_name: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
state: Optional[str] = None) -> TransferAgentPool
func GetTransferAgentPool(ctx *Context, name string, id IDInput, state *TransferAgentPoolState, opts ...ResourceOption) (*TransferAgentPool, error)
public static TransferAgentPool Get(string name, Input<string> id, TransferAgentPoolState? state, CustomResourceOptions? opts = null)
public static TransferAgentPool get(String name, Output<String> id, TransferAgentPoolState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bandwidth
Limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- Display
Name string Specifies the client-specified AgentPool description.
- Name string
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?$.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- State string
Specifies the state of the AgentPool.
- Bandwidth
Limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- Display
Name string Specifies the client-specified AgentPool description.
- Name string
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?$.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- State string
Specifies the state of the AgentPool.
- bandwidth
Limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- display
Name String Specifies the client-specified AgentPool description.
- name String
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?$.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state String
Specifies the state of the AgentPool.
- bandwidth
Limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- display
Name string Specifies the client-specified AgentPool description.
- name string
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?$.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state string
Specifies the state of the AgentPool.
- bandwidth_
limit TransferAgent Pool Bandwidth Limit Args Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- display_
name str Specifies the client-specified AgentPool description.
- name str
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?$.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state str
Specifies the state of the AgentPool.
- bandwidth
Limit Property Map Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
- display
Name String Specifies the client-specified AgentPool description.
- name String
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?$.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state String
Specifies the state of the AgentPool.
Supporting Types
TransferAgentPoolBandwidthLimit
- Limit
Mbps string Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
- Limit
Mbps string Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
- limit
Mbps String Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
- limit
Mbps string Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
- limit_
mbps str Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
- limit
Mbps String Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
Import
AgentPool can be imported using any of these accepted formats
$ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default projects/{{project}}/agentPools/{{name}}
$ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default {{project}}/{{name}}
$ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default {{name}}
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
google-beta
Terraform Provider.