1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. storage
  5. TransferAgentPool
Google Cloud Classic v7.18.0 published on Wednesday, Apr 10, 2024 by Pulumi

gcp.storage.TransferAgentPool

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.18.0 published on Wednesday, Apr 10, 2024 by Pulumi

    Represents an On-Premises Agent pool.

    To get more information about AgentPool, see:

    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",
        },
    });
    
    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",
        ))
    
    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
    	})
    }
    
    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",
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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.

    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=gcp.storage.TransferAgentPoolBandwidthLimitArgs(
            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

    The TransferAgentPool resource accepts the following input properties:

    BandwidthLimit TransferAgentPoolBandwidthLimit
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    DisplayName 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.
    BandwidthLimit TransferAgentPoolBandwidthLimitArgs
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    DisplayName 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.
    bandwidthLimit TransferAgentPoolBandwidthLimit
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    displayName 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.
    bandwidthLimit TransferAgentPoolBandwidthLimit
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    displayName 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 TransferAgentPoolBandwidthLimitArgs
    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.
    bandwidthLimit Property Map
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    displayName 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Specifies the state of the AgentPool.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Specifies the state of the AgentPool.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Specifies the state of the AgentPool.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    Specifies the state of the AgentPool.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    Specifies the state of the AgentPool.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Specifies the state of the AgentPool.

    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.
    The following state arguments are supported:
    BandwidthLimit TransferAgentPoolBandwidthLimit
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    DisplayName 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.
    BandwidthLimit TransferAgentPoolBandwidthLimitArgs
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    DisplayName 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.
    bandwidthLimit TransferAgentPoolBandwidthLimit
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    displayName 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.
    bandwidthLimit TransferAgentPoolBandwidthLimit
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    displayName 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 TransferAgentPoolBandwidthLimitArgs
    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.
    bandwidthLimit Property Map
    Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'. Structure is documented below.
    displayName 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

    LimitMbps string
    Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
    LimitMbps string
    Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
    limitMbps String
    Bandwidth rate in megabytes per second, distributed across all the agents in the pool.
    limitMbps 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.
    limitMbps 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.
    gcp logo
    Google Cloud Classic v7.18.0 published on Wednesday, Apr 10, 2024 by Pulumi