gcp.storage.TransferAgentPool
Explore with Pulumi AI
Represents an On-Premises Agent pool.
To get more information about AgentPool, see:
- API documentation
- How-to Guides
Example Usage
Agent Pool Basic
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",
},
}, {
dependsOn: [pubsubEditorRole],
});
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={
"limit_mbps": "120",
},
opts = pulumi.ResourceOptions(depends_on=[pubsub_editor_role]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
"github.com/pulumi/pulumi-gcp/sdk/v8/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
}
pubsubEditorRole, err := projects.NewIAMMember(ctx, "pubsub_editor_role", &projects.IAMMemberArgs{
Project: pulumi.String("my-project-name"),
Role: pulumi.String("roles/pubsub.editor"),
Member: pulumi.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"),
},
}, pulumi.DependsOn([]pulumi.Resource{
pubsubEditorRole,
}))
if err != nil {
return err
}
return nil
})
}
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",
},
}, new CustomResourceOptions
{
DependsOn =
{
pubsubEditorRole,
},
});
});
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 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.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(), CustomResourceOptions.builder()
.dependsOn(pubsubEditorRole)
.build());
}
}
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'
options:
dependson:
- ${pubsubEditorRole}
variables:
default:
fn::invoke:
Function: gcp:storage:getTransferProjectServiceAccount
Arguments:
project: my-project-name
Create TransferAgentPool Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TransferAgentPool(name: string, args?: TransferAgentPoolArgs, opts?: CustomResourceOptions);
@overload
def TransferAgentPool(resource_name: str,
args: Optional[TransferAgentPoolArgs] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var transferAgentPoolResource = new Gcp.Storage.TransferAgentPool("transferAgentPoolResource", new()
{
BandwidthLimit = new Gcp.Storage.Inputs.TransferAgentPoolBandwidthLimitArgs
{
LimitMbps = "string",
},
DisplayName = "string",
Name = "string",
Project = "string",
});
example, err := storage.NewTransferAgentPool(ctx, "transferAgentPoolResource", &storage.TransferAgentPoolArgs{
BandwidthLimit: &storage.TransferAgentPoolBandwidthLimitArgs{
LimitMbps: pulumi.String("string"),
},
DisplayName: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
var transferAgentPoolResource = new TransferAgentPool("transferAgentPoolResource", TransferAgentPoolArgs.builder()
.bandwidthLimit(TransferAgentPoolBandwidthLimitArgs.builder()
.limitMbps("string")
.build())
.displayName("string")
.name("string")
.project("string")
.build());
transfer_agent_pool_resource = gcp.storage.TransferAgentPool("transferAgentPoolResource",
bandwidth_limit={
"limit_mbps": "string",
},
display_name="string",
name="string",
project="string")
const transferAgentPoolResource = new gcp.storage.TransferAgentPool("transferAgentPoolResource", {
bandwidthLimit: {
limitMbps: "string",
},
displayName: "string",
name: "string",
project: "string",
});
type: gcp:storage:TransferAgentPool
properties:
bandwidthLimit:
limitMbps: string
displayName: string
name: string
project: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TransferAgentPool resource accepts the following input properties:
- Bandwidth
Limit TransferAgent Pool Bandwidth Limit - 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 - 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 - 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 - 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 - 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 - 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, TransferAgentPoolBandwidthLimitArgs
- 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:
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:
$ 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}}
To learn more about importing existing cloud resources, see Importing resources.
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.