To allow Realtime Compute for Apache Flink in shared mode to access storage resources in a virtual private cloud (VPC), you must grant Realtime Compute for Apache Flink this permission. This topic describes how to grant Realtime Compute for Apache Flink the permission to access a VPC.

Background information

Realtime Compute for Apache Flink projects in shared mode are deployed in the classic network. To allow Realtime Compute for Apache Flink to access storage resources in a VPC, you must grant the system the permission to access the VPC. Realtime Compute for Apache Flink can access only ApsaraDB RDS instances in a VPC.
Note
  • Realtime Compute for Apache Flink clusters in exclusive mode can access VPCs without authorization because these clusters reside in VPCs.
  • After you grant Realtime Compute for Apache Flink in shared mode the permission to access a VPC, performance issues may occur when the system accesses storage resources in the VPC. For example, the bandwidth may be restricted. To avoid such issues, we recommend that you do not access storage resources in a VPC from Realtime Compute for Apache Flink in shared mode.
  • As of December 24, 2019, Realtime Compute for Apache Flink in shared mode is no longer available. You cannot purchase projects in this mode. You can only scale out, scale in, or renew existing shared-mode projects. We recommend that you purchase the exclusive mode or the Flink cloud-native mode of Realtime Compute for Apache Flink based on your business requirements.

Procedure

  1. Log on to the Realtime Compute development platform.
  2. Move the pointer over the username in the upper-right corner.
  3. In the list that appears, click Project Management.
  4. In the left-side navigation pane, click VPC Access Authorization.
  5. In the upper-right corner of the VPC Access Authorization page, click Add Authorization.
  6. In the Authorize StreamCompute VPC Access dialog box, configure the parameters. The following table describes the parameters.
    Parameter Description
    Name The name of the VPC.
    Region The region in which the storage resource resides.
    VPC ID The ID of the VPC. To view the VPC ID of an ApsaraDB RDS instance, perform the following steps:
    1. Log on to the ApsaraDB RDS console.
    2. In the left-side navigation pane, click Instances.
    3. In the top navigation bar, select the region in which the ApsaraDB RDS instance resides.
    4. On the Instances page, find the ApsaraDB RDS instance and click the instance ID in the Instance ID/Name column.
    5. In the left-side navigation pane, click Database Connection.
    6. On the Database Connection page, view the VPC ID in Network Type.

      For example, the VPC ID of the ApsaraDB RDS instance is vpc-bp1lysht98wrvl9n3****.

    Instance ID The ID of the ApsaraDB RDS instance in the VPC. To view the ID of an ApsaraDB for RDS instance, perform the following steps:
    1. Log on to the ApsaraDB RDS console.
    2. In the left-side navigation pane, click Instances.
    3. In the top navigation bar, select the region where the ApsaraDB RDS instance resides.
    4. On the Instances page, find the ApsaraDB RDS instance and click the instance ID in the Instance ID/Name column.
    5. On the Basic Information page, view the ID of the ApsaraDB RDS instance.
    Instance Port The port number of the ApsaraDB RDS instance in the VPC. For more information about how to view the port number of an ApsaraDB RDS instance, see View and change the internal and public endpoints and port numbers of an ApsaraDB RDS for MySQL instance.

FAQ

Q: How do I configure the url parameter when I use data definition language (DDL) statements to reference a storage resource in a VPC?

A: When you use DDL statements to reference storage resources in a VPC, you can configure the url parameter in the WITH clause based on the Mapping IP Address and Mapping Port parameters on the VPC Access Authorization page. For example, you can configure url='jdbc:mysql://<mappingIP>:<mappingPort>/<databaseName>'. To obtain the values of the Mapping IP Address and Mapping Port parameters, perform the following steps:
  1. Log on to the Realtime Compute development platform.
  2. Move the pointer over the username in the upper-right corner.
  3. In the list that appears, click Project Management.
  4. In the left-side navigation pane, click VPC Access Authorization.
  5. On the VPC Access Authorization page, view the values of the Mapping IP Address and Mapping Port parameters.