Create Data Transfer Essentials resources

For traffic to be identified as configured for Data Transfer Essentials billing, you need to select services and associate them with selected endpoints. This page shows you how to create the required Data Transfer Essentials resources, which are configurations and destinations.

Before you begin

Before you create Data Transfer Essentials configurations or destinations, do the following:

  1. If you haven't already done so, install the Google Cloud CLI.

  2. Authenticate the gcloud CLI with your account:

    gcloud auth login
    
  3. Set your project:

    gcloud config set project PROJECT_ID
    

    Replace PROJECT_ID with your project ID.

  4. Enable the Network Connectivity API in your project.

  5. Configure permissions.

  6. Check whether the services that you want to select for Data Transfer Essentials are supported. You can configure Data Transfer Essentials only for supported services and regions.

    gcloud

    Use the gcloud network-connectivity multicloud-data-transfer-supported-services list command.

    gcloud network-connectivity multicloud-data-transfer-supported-services list \
        --location=LOCATION
    

    Replace LOCATION with a Google Cloud region ID—for example, europe-west3.

    The following sample output shows that the services are eligible to be configured by using Data Transfer Essentials because they use supported tiers.

    NAME                   SERVICE_CONFIGS
    cloud-sql              [{'eligibilityCriteria': 'NETWORK_SERVICE_TIER_PREMIUM_ONLY'}]
    cloud-storage          [{'eligibilityCriteria': 'REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY'}]
    compute-engine         [{'eligibilityCriteria': 'NETWORK_SERVICE_TIER_STANDARD_ONLY'}]
    

    To check the eligibility of a specific service, use the gcloud network-connectivity multicloud-data-transfer-supported-services describe command.

    gcloud network-connectivity multicloud-data-transfer-supported-services describe SERVICE1 \
        --location=LOCATION
    

    Replace SERVICE1 with a valid string that represents the service. See Supported services and regions.

    API

    Use the multicloudDataTransferSupportedServices.get method.

    GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION:getMulticloudDataTransferSupportedServices
    

    Replace the following:

    • PROJECT_ID: the ID of your project
    • LOCATION: a Google Cloud region ID, for example, europe-west3

    The following sample output lists the services that are eligible to be configured by using Data Transfer Essentials because they use supported tiers.

    {
      "multicloudDataTransferSupportedServices": [
        {
          "name": "cloud-sql",
          "serviceConfigs": [
            {
              "eligibilityCriteria": "NETWORK_SERVICE_TIER_PREMIUM_ONLY"
            }
          ]
        },
        {
          "name": "cloud-storage",
          "serviceConfigs": [
            {
              "eligibilityCriteria": "REQUEST_ENDPOINT_REGIONAL_ENDPOINT_ONLY"
            }
          ]
        },
        {
          "name": "compute-engine",
          "serviceConfigs": [
            {
              "eligibilityCriteria": "NETWORK_SERVICE_TIER_STANDARD_ONLY"
            }
          ]
        }
      ]
    }
    

    To check the eligibility of a specific service, use the following method:

    GET https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION:getMulticloudDataTransferSupportedServices
    {
    "service": "SERVICE1"
    }
    

    Replace the following:

    • PROJECT_ID: the ID of your project.
    • LOCATION: a Google Cloud region ID, for example, europe-west3.
    • SERVICE1: a valid string that represents the service. See Supported services and regions.
  7. Check whether the autonomous system numbers (ASNs) that you want to specify are recognized. You can configure traffic only to destinations that use recognized ASNs.

Create a configuration

Create a Data Transfer Essentials configuration that includes specified services. You can create only one configuration per region per project.

gcloud

Use the gcloud network-connectivity multicloud-data-transfer-configs create command.

gcloud network-connectivity multicloud-data-transfer-configs create CONFIGURATION_NAME \
    --location=LOCATION \
    --description=DESCRIPTION \
    --services=SERVICE-A,...

Replace the following:

  • CONFIGURATION_NAME: a name for the configuration.
  • LOCATION: the region of the configuration.
  • DESCRIPTION: a description of the configuration and its purpose.
  • SERVICE-A,...: a series of strings that represent the services for which you want to configure Data Transfer Essentials. For valid strings, see Supported services and regions.

The following sample command creates a configuration named config1 in the europe-west3 region for the compute-engine, cloud-storage, and cloud-sql services.

gcloud network-connectivity multicloud-data-transfer-configs create config1 \
    --location=europe-west3 \
    --description="configuration for europe-west3" \
    --services=compute-engine,cloud-storage,cloud-sql

API

Use the multicloudDataTransferConfigs.create method.

POST https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/multicloudDataTransferConfigs/CONFIGURATION_NAME
{
  "description": "DESCRIPTION",
  "services": {
    "SERVICE-A",
    "SERVICE-B"
  }
}

Replace the following:

  • PROJECT_ID: the ID of your project.
  • LOCATION: the region of the configuration.
  • CONFIGURATION_NAME: a name for the configuration.
  • DESCRIPTION: a description of the configuration and its purpose.
  • SERVICE-A,...: a series of strings that represent the services for which you want to configure Data Transfer Essentials. For valid strings, see Supported services and regions.

Optionally, use the requestID query parameter to identify your API requests. If you retry your request, the server can use the identifier to ignore a request that has already been responded to.

The following JSON snippet creates a configuration named config1 in the europe-west3 region for the compute-engine, cloud-storage, and cloud-sql services.

POST https://networkconnectivity.googleapis.com/v1/projects/my-project/locations/europe-west3/multicloudDataTransferConfigs/config1
{
  "description": "configuration for europe-west3",
  "services": {
    "compute-engine": {},
    "cloud-storage": {},
    "cloud-sql": {}
}

Data Transfer Essentials configurations take up to 24 hours to be created. To check the state of the configuration, view the details of the configuration.

To add or remove services, update a configuration.

Before attempting to create a new configuration, delete the existing configuration.

Create a destination for the configuration

Create a destination for the Data Transfer Essentials configuration. A destination resource creates an association between an existing configuration and an external IP prefix with an endpoint. An endpoint contains a cloud service provider (CSP) identifier and its ASN.

Create one destination at a time.

gcloud

Use the gcloud network-connectivity multicloud-data-transfer-configs destinations create command.

gcloud network-connectivity multicloud-data-transfer-configs destinations create DESTINATION_NAME \
    --multicloud-data-transfer-config=CONFIGURATION_NAME \
    --location=LOCATION \
    --description=DESCRIPTION \
    --ip-prefix=IP_PREFIX \
    --endpoints=asn=ASN,csp=CSP

Replace the following:

  • DESTINATION_NAME: a name for the destination. The name must be unique within a region.
  • CONFIGURATION_NAME: the name of the configuration.
  • LOCATION: the region of the configuration.
  • DESCRIPTION: a description of the destination and its purpose.
  • IP_PREFIX: the IP prefix of the destination specified as a range (for example, 203.0.113.0/24 or 2001:db8::/32) or a value (for example, 203.0.113.6 or 2001:db8:2:2:2:2:2:2). An IP prefix must be used only once in a configuration, must be associated with at least one endpoint, and can be associated with up to 5 endpoints.

  • Specify strings corresponding to the endpoints that you want to add to the destination:

    • ASN: the ASN expected to announce the prefix. See Recognized ASNs.
    • CSP: a string that represents the CSP of the ASN that is announcing the prefix.

    You can specify the endpoints flag multiple times in the same command. A destination must have at least one endpoint and can't have more than five endpoints.

The following sample command creates a destination named destination1 for configuration config1 in the europe-west3 region for the specified IP prefix and endpoint.

gcloud network-connectivity multicloud-data-transfer-configs destinations create destination1 \
    --multicloud-data-transfer-config=config1 \
    --location=europe-west3 \
    --description="destination1 for config1" \
    --ip-prefix=203.0.113.0/24 \
    --endpoints=asn=16509,csp="aws"

API

Use the multicloudDataTransferConfigs.destinations.create method.

POST https://networkconnectivity.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/multicloudDataTransferConfigs/CONFIGURATION_NAME/destinations/DESTINATION_NAME
{
  "description": "DESCRIPTION",
  "ipPrefix": "IP_PREFIX",
  "endpoints": [
    {
      "asn": "ASN",
      "csp": "CSP"
    }
  ]
}

Replace the following:

  • PROJECT_ID: the ID of your project.
  • LOCATION: the region of the configuration.
  • CONFIGURATION_NAME: the name of the configuration.
  • DESTINATION_NAME: a name for the destination. The name must be unique within a region.
  • DESCRIPTION: a description of the destination and its purpose.
  • IP_PREFIX: the IP prefix of the destination specified as a range (for example, 203.0.113.0/24 or 2001:db8::/32) or a value (for example, 203.0.113.6 or 2001:db8:2:2:2:2:2:2). An IP prefix must be used only once in a configuration and for only one ASN.

  • Specify strings corresponding to the endpoints that you want to add to the destination:

    • ASN: the ASN expected to announce the prefix. See Recognized ASNs.
    • CSP: a string that represents the CSP of the ASN that is announcing the prefix.

    You can specify multiple endpoints in the same call. A destination must have at least one endpoint and can't have more than five endpoints.

The following sample command creates a destination named destination1 for configuration config1 in the europe-west3 region for the specified IP prefix and endpoint.

POST https://networkconnectivity.googleapis.com/v1/projects/my-project/locations/europe-west3/multicloudDataTransferConfigs/config1/destinations/destination1
{
  "description": "destination1 for config1",
  "ipPrefix": "203.0.113.0/24",
  "endpoints": [
    {
      "asn": "16509",
      "csp": "aws"
    }
  ]
}

To check the state of the destination, view the details of the destination.

To add or remove endpoints, update the destination.

Alternatively, delete the destination.

What's next