privatelink-20200415/main.tea (4,118 lines of code) (raw):

/** * */ import Util; import OpenApi; import OpenApiUtil; import EndpointUtil; extends OpenApi; init(config: OpenApi.Config){ super(config); @endpointRule = 'regional'; checkConfig(config); @endpoint = getEndpoint('privatelink', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint); } function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{ if (!Util.empty(endpoint)) { return endpoint; } if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { return endpointMap[regionId]; } return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); } model AddUserToVpcEndpointServiceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), regionId?: string(name='RegionId', description='The region ID of the endpoint service. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), userARN?: string(name='UserARN', description='The whitelist in the format of Aliyun Resource Name (ARN).', example='acs:ram:*:<account-id>:*'), userId?: long(name='UserId', description='The account ID that you want to add to the whitelist.', example='132193271328****'), } model AddUserToVpcEndpointServiceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model AddUserToVpcEndpointServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: AddUserToVpcEndpointServiceResponseBody(name='body'), } /** * @summary Adds an account ID to the whitelist of an endpoint service. * * @description * Before you add an account ID to the whitelist of an endpoint service, make sure that the endpoint service is in the **Active** state. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to query the status of the endpoint service. * * You cannot repeatedly call the **AddUserToVpcEndpointService** operation to add the ID of an Alibaba Cloud account to the whitelist of an endpoint service within a specified period of time. * * @param request AddUserToVpcEndpointServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return AddUserToVpcEndpointServiceResponse */ async function addUserToVpcEndpointServiceWithOptions(request: AddUserToVpcEndpointServiceRequest, runtime: Util.RuntimeOptions): AddUserToVpcEndpointServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.userARN)) { query['UserARN'] = request.userARN; } if (!Util.isUnset(request.userId)) { query['UserId'] = request.userId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'AddUserToVpcEndpointService', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Adds an account ID to the whitelist of an endpoint service. * * @description * Before you add an account ID to the whitelist of an endpoint service, make sure that the endpoint service is in the **Active** state. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to query the status of the endpoint service. * * You cannot repeatedly call the **AddUserToVpcEndpointService** operation to add the ID of an Alibaba Cloud account to the whitelist of an endpoint service within a specified period of time. * * @param request AddUserToVpcEndpointServiceRequest * @return AddUserToVpcEndpointServiceResponse */ async function addUserToVpcEndpointService(request: AddUserToVpcEndpointServiceRequest): AddUserToVpcEndpointServiceResponse { var runtime = new Util.RuntimeOptions{}; return addUserToVpcEndpointServiceWithOptions(request, runtime); } model AddZoneToVpcEndpointRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The ID of the endpoint to which you want to add the zone. This parameter is required.', example='ep-hp33b2e43fays7s8****'), ipv6Address?: string(name='Ipv6Address'), regionId?: string(name='RegionId', description='The region ID of the endpoint. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch in the zone that you want to add. The system automatically creates an endpoint ENI in the vSwitch. This parameter is required.', example='vsw-hjkshjvdkdvd****'), zoneId?: string(name='ZoneId', description='The ID of the zone that you want to add. This parameter is required.', example='cn-hangzhou-b'), ip?: string(name='ip', description='The IP address of the endpoint elastic network interface (ENI) in the zone that you want to add.', example='192.XX.XX.32'), } model AddZoneToVpcEndpointResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), } model AddZoneToVpcEndpointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: AddZoneToVpcEndpointResponseBody(name='body'), } /** * @summary Adds a zone to an endpoint. * * @description * **AddZoneToVpcEndpoint** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpointZones](https://help.aliyun.com/document_detail/183560.html) operation to query the state of the zone. * * If the zone is in the **Creating** state, the zone is being added. * * If the zone is in the Wait state, the zone is added. * * You cannot repeatedly call the **AddZoneToVpcEndpoint** operation to add a zone to an endpoint within a specified period of time. * * @param request AddZoneToVpcEndpointRequest * @param runtime runtime options for this request RuntimeOptions * @return AddZoneToVpcEndpointResponse */ async function addZoneToVpcEndpointWithOptions(request: AddZoneToVpcEndpointRequest, runtime: Util.RuntimeOptions): AddZoneToVpcEndpointResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.ipv6Address)) { query['Ipv6Address'] = request.ipv6Address; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.vSwitchId)) { query['VSwitchId'] = request.vSwitchId; } if (!Util.isUnset(request.zoneId)) { query['ZoneId'] = request.zoneId; } if (!Util.isUnset(request.ip)) { query['ip'] = request.ip; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'AddZoneToVpcEndpoint', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Adds a zone to an endpoint. * * @description * **AddZoneToVpcEndpoint** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpointZones](https://help.aliyun.com/document_detail/183560.html) operation to query the state of the zone. * * If the zone is in the **Creating** state, the zone is being added. * * If the zone is in the Wait state, the zone is added. * * You cannot repeatedly call the **AddZoneToVpcEndpoint** operation to add a zone to an endpoint within a specified period of time. * * @param request AddZoneToVpcEndpointRequest * @return AddZoneToVpcEndpointResponse */ async function addZoneToVpcEndpoint(request: AddZoneToVpcEndpointRequest): AddZoneToVpcEndpointResponse { var runtime = new Util.RuntimeOptions{}; return addZoneToVpcEndpointWithOptions(request, runtime); } model AttachResourceToVpcEndpointServiceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error code is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), regionId?: string(name='RegionId', description='The region ID of the endpoint service to which you want to add the service resource. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), resourceId?: string(name='ResourceId', description='The service resource ID. This parameter is required.', example='lb-hp32z1wp5peaoox2q****'), resourceType?: string(name='ResourceType', description='The type of the service resource. Valid values: * **slb**: Classic Load Balancer (CLB) instance * **alb**: Application Load Balancer (ALB) instance * **nlb**: Network Load Balancer (NLB) instance > You cannot access TCP/SSL listeners configured for NLB instances. This parameter is required.', example='slb'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service to which you want to add the service resource. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), zoneId?: string(name='ZoneId', description='The zone ID of the service resource.', example='cn-hangzhou-j'), } model AttachResourceToVpcEndpointServiceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model AttachResourceToVpcEndpointServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: AttachResourceToVpcEndpointServiceResponseBody(name='body'), } /** * @summary Adds a service resource to an endpoint service. * * @description * Before you add a service resource to an endpoint service, make sure that the endpoint service is in the **Active** state. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to query the status of the endpoint service. * * You cannot repeatedly call the **AttachResourceToVpcEndpointService** operation to add a service resource to an endpoint service within a specified period of time. * * @param request AttachResourceToVpcEndpointServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return AttachResourceToVpcEndpointServiceResponse */ async function attachResourceToVpcEndpointServiceWithOptions(request: AttachResourceToVpcEndpointServiceRequest, runtime: Util.RuntimeOptions): AttachResourceToVpcEndpointServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.zoneId)) { query['ZoneId'] = request.zoneId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'AttachResourceToVpcEndpointService', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Adds a service resource to an endpoint service. * * @description * Before you add a service resource to an endpoint service, make sure that the endpoint service is in the **Active** state. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to query the status of the endpoint service. * * You cannot repeatedly call the **AttachResourceToVpcEndpointService** operation to add a service resource to an endpoint service within a specified period of time. * * @param request AttachResourceToVpcEndpointServiceRequest * @return AttachResourceToVpcEndpointServiceResponse */ async function attachResourceToVpcEndpointService(request: AttachResourceToVpcEndpointServiceRequest): AttachResourceToVpcEndpointServiceResponse { var runtime = new Util.RuntimeOptions{}; return attachResourceToVpcEndpointServiceWithOptions(request, runtime); } model AttachSecurityGroupToVpcEndpointRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The ID of the endpoint with which you want to associate the security group. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The region ID of the endpoint with which you want to associate with the security group. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group with which you want to associate the endpoint. This parameter is required.', example='sg-hp3c8qj1tyct90ej****'), } model AttachSecurityGroupToVpcEndpointResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='8D778FF9-7640-4C13-BCD6-9265CA9A2F81'), } model AttachSecurityGroupToVpcEndpointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: AttachSecurityGroupToVpcEndpointResponseBody(name='body'), } /** * @summary Associates an endpoint with a security group. * * @description * **AttachSecurityGroupToVpcEndpoint** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpoints](https://help.aliyun.com/document_detail/183558.html) operation to query the state of the endpoint. * * If the endpoint is in the **Pending** state, the endpoint is being associated with the security group. * * If the endpoint is in the **Active** state, the endpoint is associated with the security group. * * You cannot repeatedly call the **AttachSecurityGroupToVpcEndpoint** operation to associate an endpoint with a security group within a specified period of time. * * @param request AttachSecurityGroupToVpcEndpointRequest * @param runtime runtime options for this request RuntimeOptions * @return AttachSecurityGroupToVpcEndpointResponse */ async function attachSecurityGroupToVpcEndpointWithOptions(request: AttachSecurityGroupToVpcEndpointRequest, runtime: Util.RuntimeOptions): AttachSecurityGroupToVpcEndpointResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.securityGroupId)) { query['SecurityGroupId'] = request.securityGroupId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'AttachSecurityGroupToVpcEndpoint', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Associates an endpoint with a security group. * * @description * **AttachSecurityGroupToVpcEndpoint** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpoints](https://help.aliyun.com/document_detail/183558.html) operation to query the state of the endpoint. * * If the endpoint is in the **Pending** state, the endpoint is being associated with the security group. * * If the endpoint is in the **Active** state, the endpoint is associated with the security group. * * You cannot repeatedly call the **AttachSecurityGroupToVpcEndpoint** operation to associate an endpoint with a security group within a specified period of time. * * @param request AttachSecurityGroupToVpcEndpointRequest * @return AttachSecurityGroupToVpcEndpointResponse */ async function attachSecurityGroupToVpcEndpoint(request: AttachSecurityGroupToVpcEndpointRequest): AttachSecurityGroupToVpcEndpointResponse { var runtime = new Util.RuntimeOptions{}; return attachSecurityGroupToVpcEndpointWithOptions(request, runtime); } model ChangeResourceGroupRequest { resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID. This parameter is required.', example='rg-acfmy*****'), resourceId?: string(name='ResourceId', description='The resource IDs. You can specify up to 50 resource IDs. This parameter is required.', example='ep-hp3i05294c2d2d****'), resourceType?: string(name='ResourceType', description='The type of resource. Valid values: * **VpcEndpoint**: endpoint * **VpcEndpointService**: endpoint service', example='VpcEndpoint'), } model ChangeResourceGroupResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='8D8992C1-6712-423C-BAC5-E5E817484C6B'), } model ChangeResourceGroupResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ChangeResourceGroupResponseBody(name='body'), } /** * @summary Modifies a resource group. * * @param request ChangeResourceGroupRequest * @param runtime runtime options for this request RuntimeOptions * @return ChangeResourceGroupResponse */ async function changeResourceGroupWithOptions(request: ChangeResourceGroupRequest, runtime: Util.RuntimeOptions): ChangeResourceGroupResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ChangeResourceGroup', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Modifies a resource group. * * @param request ChangeResourceGroupRequest * @return ChangeResourceGroupResponse */ async function changeResourceGroup(request: ChangeResourceGroupRequest): ChangeResourceGroupResponse { var runtime = new Util.RuntimeOptions{}; return changeResourceGroupWithOptions(request, runtime); } model CheckProductOpenResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='8D8992C1-6712-423C-BAC5-E5E817484C6B'), success?: boolean(name='Success', description='Indicates whether PrivateLink is activated. Only **true** is returned. The value indicates that PrivateLink is activated.', example='true'), } model CheckProductOpenResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CheckProductOpenResponseBody(name='body'), } /** * @summary Queries whether PrivateLink is activated. * * @param request CheckProductOpenRequest * @param runtime runtime options for this request RuntimeOptions * @return CheckProductOpenResponse */ async function checkProductOpenWithOptions(runtime: Util.RuntimeOptions): CheckProductOpenResponse { var req = new OpenApi.OpenApiRequest{}; var params = new OpenApi.Params{ action = 'CheckProductOpen', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries whether PrivateLink is activated. * * @return CheckProductOpenResponse */ async function checkProductOpen(): CheckProductOpenResponse { var runtime = new Util.RuntimeOptions{}; return checkProductOpenWithOptions(runtime); } model CreateVpcEndpointRequest { addressIpVersion?: string(name='AddressIpVersion'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointDescription?: string(name='EndpointDescription', description='The description of the endpoint. The description must be 2 to 256 characters in length, and cannot start with `http://` or `https://`.', example='This is my Endpoint.'), endpointName?: string(name='EndpointName', description='The name of the endpoint. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). The name must start with a letter.', example='test'), endpointType?: string(name='EndpointType', description='The endpoint type. Valid values: * **Interface** You can specify an Application Load Balancer (ALB) instance, a Classic Load Balancer (CLB) instance, or a Network Load Balancer (NLB) instance. * **Reverse** You can specify a Virtual Private Cloud (VPC) NAT gateway. > Services that support reverse endpoints are provided by Alibaba Cloud or Alibaba Cloud partners. To create such a service on your own, contact your account manager.', example='Interface'), policyDocument?: string(name='PolicyDocument', example='{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "oss:List*", "oss:PutObject", "oss:GetObject" ], "Resource": [ "acs:oss:oss-*:*:pvl-policy-test/policy-test.txt" ], "Principal": { "RAM": [ "acs:ram::14199xxxxxx:*" ] } } ] }'), protectedEnabled?: boolean(name='ProtectedEnabled', description='Specifies whether to enable user authentication. This parameter is available in Security Token Service (STS) mode. Valid values: * **true**: enables user authentication. After user authentication is enabled, only the user who creates the endpoint can modify or delete the endpoint in STS mode. * **false** (default): disables user authentication.', example='false'), regionId?: string(name='RegionId', description='The region ID of the endpoint. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmy*****'), securityGroupId?: [ string ](name='SecurityGroupId', description='The IDs of security groups that are associated with the endpoint elastic network interface (ENI).', example='sg-hp33bw6ynvm2yb0e****'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service with which the endpoint is associated.', example='epsrv-hp3xdsq46ael67lo****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service with which the endpoint is associated.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****'), tag?: [ { key?: string(name='Key', description='The key of the tag to add to the resource.', example='env'), value?: string(name='Value', description='The value of the tag to add to the resource.', example='prod'), } ](name='Tag', description='The tags to add to the resource.'), vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) to which the endpoint belongs. This parameter is required.', example='vpc-hp356stwkxg3fn2xe****'), zone?: [ { ipv6Address?: string(name='Ipv6Address'), vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch where you want to create the endpoint ENI in the zone. You can specify up to 10 vSwitch IDs.', example='vsw-hp3uf6045ljdhd5zr****'), zoneId?: string(name='ZoneId', description='The ID of the zone in which the endpoint is deployed. You can specify up to 10 zone IDs.', example='cn-huhehaote-b'), ip?: string(name='ip', description='The IP address of the zone in which the endpoint is deployed. You can specify up to 10 IP addresses.', example='192.168.XX.XX'), } ](name='Zone', description='The zones where the endpoint is deployed.'), zonePrivateIpAddressCount?: long(name='ZonePrivateIpAddressCount', description='The number of private IP addresses that are assigned to an elastic network interface (ENI) in each zone. Set the value to **1**.', example='1'), } model CreateVpcEndpointResponseBody = { addressIpVersion?: string(name='AddressIpVersion'), bandwidth?: long(name='Bandwidth', description='The bandwidth of the endpoint connection. Unit: Mbit/s.', example='200'), connectionStatus?: string(name='ConnectionStatus', description='The state of the endpoint connection. Valid values: * **Pending**: The connection is being modified. * **Connecting**: The connection is being established. * **Connected**: The connection is established. * **Disconnecting**: The endpoint is being disconnected from the endpoint service. * **Disconnected**: The endpoint is disconnected from the endpoint service. * **Deleting**: The connection is being deleted.', example='Disconnected'), createTime?: string(name='CreateTime', description='The time when the endpoint was created.', example='2022-01-02T19:11:12Z'), endpointBusinessStatus?: string(name='EndpointBusinessStatus', description='The service state of the endpoint. Valid values: * **Normal**: The endpoint runs as expected. * **FinancialLocked**: The endpoint is locked due to overdue payments.', example='Normal'), endpointDescription?: string(name='EndpointDescription', description='The description of the endpoint.', example='This is my Endpoint.'), endpointDomain?: string(name='EndpointDomain', description='The domain name of the endpoint.', example='ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com'), endpointId?: string(name='EndpointId', description='The endpoint ID.', example='ep-hp33b2e43fays7s8****'), endpointName?: string(name='EndpointName', description='The name of the endpoint.', example='test'), endpointStatus?: string(name='EndpointStatus', description='The state of the endpoint. Valid values: * **Creating**: The endpoint is being created. * **Active**: The endpoint is available. * **Pending**: The endpoint is being modified. * **Deleting**: The endpoint is being deleted.', example='Active'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service with which the endpoint is associated.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service with which the endpoint is associated.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****'), vpcId?: string(name='VpcId', description='The ID of the VPC to which the endpoint belongs.', example='vpc-hp356stwkxg3fn2xe****'), } model CreateVpcEndpointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateVpcEndpointResponseBody(name='body'), } /** * @summary Creates an endpoint. * * @description **CreateVpcEndpoint** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointAttribute](https://help.aliyun.com/document_detail/183568.html) operation to check whether the endpoint is created. * * If the endpoint is in the **Creating** state, the endpoint is being created. * * If the endpoint is in the **Active** state, the endpoint is created. * * @param request CreateVpcEndpointRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateVpcEndpointResponse */ async function createVpcEndpointWithOptions(request: CreateVpcEndpointRequest, runtime: Util.RuntimeOptions): CreateVpcEndpointResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.addressIpVersion)) { query['AddressIpVersion'] = request.addressIpVersion; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointDescription)) { query['EndpointDescription'] = request.endpointDescription; } if (!Util.isUnset(request.endpointName)) { query['EndpointName'] = request.endpointName; } if (!Util.isUnset(request.endpointType)) { query['EndpointType'] = request.endpointType; } if (!Util.isUnset(request.policyDocument)) { query['PolicyDocument'] = request.policyDocument; } if (!Util.isUnset(request.protectedEnabled)) { query['ProtectedEnabled'] = request.protectedEnabled; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.securityGroupId)) { query['SecurityGroupId'] = request.securityGroupId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceName)) { query['ServiceName'] = request.serviceName; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } if (!Util.isUnset(request.vpcId)) { query['VpcId'] = request.vpcId; } if (!Util.isUnset(request.zone)) { query['Zone'] = request.zone; } if (!Util.isUnset(request.zonePrivateIpAddressCount)) { query['ZonePrivateIpAddressCount'] = request.zonePrivateIpAddressCount; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateVpcEndpoint', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Creates an endpoint. * * @description **CreateVpcEndpoint** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointAttribute](https://help.aliyun.com/document_detail/183568.html) operation to check whether the endpoint is created. * * If the endpoint is in the **Creating** state, the endpoint is being created. * * If the endpoint is in the **Active** state, the endpoint is created. * * @param request CreateVpcEndpointRequest * @return CreateVpcEndpointResponse */ async function createVpcEndpoint(request: CreateVpcEndpointRequest): CreateVpcEndpointResponse { var runtime = new Util.RuntimeOptions{}; return createVpcEndpointWithOptions(request, runtime); } model CreateVpcEndpointServiceRequest { addressIpVersion?: string(name='AddressIpVersion'), autoAcceptEnabled?: boolean(name='AutoAcceptEnabled', description='Specifies whether to automatically accept endpoint connection requests. Valid values: * **true** * **false** (default)', example='false'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), payer?: string(name='Payer', description='The payer. Valid values: * **Endpoint**: service consumer * **EndpointService**: service provider', example='Endpoint'), regionId?: string(name='RegionId', description='The region ID of the endpoint service. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), resource?: [ { resourceId?: string(name='ResourceId', description='The ID of the service resource that is added to the endpoint service. You can specify up to 20 service resource IDs.', example='lb-hp32z1wp5peaoox2q****'), resourceType?: string(name='ResourceType', description='The type of the service resource that is added to the endpoint service. You can add up to 20 service resources to the endpoint service. Valid values: * **slb**: CLB instance * **alb**: ALB instance * **nlb**: NLB instance > In regions where PrivateLink is supported, CLB instances deployed in virtual private clouds (VPCs) can serve as the service resources of the endpoint service. You cannot access TCP/SSL listeners configured for NLB instances.', example='slb'), zoneId?: string(name='ZoneId', description='The ID of the zone.', example='cn-huhehaote-a'), } ](name='Resource', description='The service resources of the endpoint service.'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmy*****'), serviceDescription?: string(name='ServiceDescription', description='The description of the endpoint service.', example='This is my EndpointService.'), serviceResourceType?: string(name='ServiceResourceType', description='The type of the service resource. Valid values: * **slb**: Classic Load Balancer (CLB) instance * **alb**: Application Load Balancer (ALB) instance * **nlb**: Network Load Balancer (NLB) instance > You cannot access TCP/SSL listeners configured for NLB instances.', example='slb'), serviceSupportIPv6?: boolean(name='ServiceSupportIPv6', description='Specifies whether to enable IPv6 for the endpoint service. Valid values: * **true** * **false** (default)', example='false', deprecated=true), tag?: [ { key?: string(name='Key', description='The key of the tag to add to the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `aliyun` or `acs:`.', example='env'), value?: string(name='Value', description='The value of the tag to add to the resource. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `aliyun` or `acs:`.', example='prod'), } ](name='Tag', description='The tags to add to the resource.'), zoneAffinityEnabled?: boolean(name='ZoneAffinityEnabled', description='Specifies whether to first resolve the domain name of the nearest endpoint that is associated with the endpoint service. Valid values: * **true** * **false** (default)', example='false'), } model CreateVpcEndpointServiceResponseBody = { addressIpVersion?: string(name='AddressIpVersion'), autoAcceptEnabled?: boolean(name='AutoAcceptEnabled', description='Indicates whether the endpoint service automatically accepts endpoint connection requests. Valid values: * **true** * **false**', example='false'), createTime?: string(name='CreateTime', description='The time when the endpoint service was created.', example='2022-01-02T19:11:12Z'), requestId?: string(name='RequestId', description='The request ID.', example='8D8992C1-6712-423C-BAC5-E5E817484C6B'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmy*****'), serviceBusinessStatus?: string(name='ServiceBusinessStatus', description='The service state of the endpoint service. Valid values: * **Normal**: The endpoint service runs as expected. * **FinancialLocked**: The endpoint service is locked due to overdue payments.', example='Normal'), serviceDescription?: string(name='ServiceDescription', description='The description of the endpoint service.', example='This is my EndpointService.'), serviceDomain?: string(name='ServiceDomain', description='The domain name of the endpoint service.', example='epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com'), serviceId?: string(name='ServiceId', description='The endpoint service ID.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****'), serviceStatus?: string(name='ServiceStatus', description='The state of the endpoint service. Valid values: * **Creating**: The endpoint service is being created. * **Pending**: The endpoint service is being modified. * **Active**: The endpoint service is available. * **Deleting**: The endpoint service is being deleted.', example='Active'), serviceSupportIPv6?: boolean(name='ServiceSupportIPv6', description='Indicates whether IPv6 was enabled for the endpoint service. Valid values: * **true** * **false**', example='false'), zoneAffinityEnabled?: boolean(name='ZoneAffinityEnabled', description='Indicates whether the domain name of the nearest endpoint that is associated with the endpoint service is resolved first. Valid values: * **true** * **false**', example='false'), } model CreateVpcEndpointServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateVpcEndpointServiceResponseBody(name='body'), } /** * @summary Creates an endpoint service. * * @description * Before you create an endpoint service, make sure that you have created a Server Load Balancer (SLB) instance that supports PrivateLink. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/174064.html). * * **CreateVpcEndpointService** is an asynchronous operation. After a request is sent, the system returns a request ID and an instance ID and runs the task in the background. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/183542.html) operation to query the status of the endpoint service. * * If the endpoint service is in the **Creating** state, the endpoint service is being created. * * If the endpoint service is in the **Active** state, the endpoint service is created. * * @param request CreateVpcEndpointServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return CreateVpcEndpointServiceResponse */ async function createVpcEndpointServiceWithOptions(request: CreateVpcEndpointServiceRequest, runtime: Util.RuntimeOptions): CreateVpcEndpointServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.addressIpVersion)) { query['AddressIpVersion'] = request.addressIpVersion; } if (!Util.isUnset(request.autoAcceptEnabled)) { query['AutoAcceptEnabled'] = request.autoAcceptEnabled; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.payer)) { query['Payer'] = request.payer; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resource)) { query['Resource'] = request.resource; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.serviceDescription)) { query['ServiceDescription'] = request.serviceDescription; } if (!Util.isUnset(request.serviceResourceType)) { query['ServiceResourceType'] = request.serviceResourceType; } if (!Util.isUnset(request.serviceSupportIPv6)) { query['ServiceSupportIPv6'] = request.serviceSupportIPv6; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } if (!Util.isUnset(request.zoneAffinityEnabled)) { query['ZoneAffinityEnabled'] = request.zoneAffinityEnabled; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateVpcEndpointService', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Creates an endpoint service. * * @description * Before you create an endpoint service, make sure that you have created a Server Load Balancer (SLB) instance that supports PrivateLink. For more information, see [CreateLoadBalancer](https://help.aliyun.com/document_detail/174064.html). * * **CreateVpcEndpointService** is an asynchronous operation. After a request is sent, the system returns a request ID and an instance ID and runs the task in the background. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/183542.html) operation to query the status of the endpoint service. * * If the endpoint service is in the **Creating** state, the endpoint service is being created. * * If the endpoint service is in the **Active** state, the endpoint service is created. * * @param request CreateVpcEndpointServiceRequest * @return CreateVpcEndpointServiceResponse */ async function createVpcEndpointService(request: CreateVpcEndpointServiceRequest): CreateVpcEndpointServiceResponse { var runtime = new Util.RuntimeOptions{}; return createVpcEndpointServiceWithOptions(request, runtime); } model DeleteVpcEndpointRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The ID of the endpoint that you want to delete. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The region ID of the endpoint that you want to delete. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), } model DeleteVpcEndpointResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='8D8992C1-6712-423C-BAC5-E5E817484C6B'), } model DeleteVpcEndpointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteVpcEndpointResponseBody(name='body'), } /** * @summary Deletes an endpoint. * * @description * Before you delete an endpoint, you must delete the zones that are added to the endpoint. * * **DeleteVpcEndpoint** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointAttribute](https://help.aliyun.com/document_detail/183568.html) operation to check whether the endpoint is deleted. * * If the endpoint is in the **Deleting** state, the endpoint is being deleted. * * If the endpoint cannot be queried, the endpoint is deleted. * * @param request DeleteVpcEndpointRequest * @param runtime runtime options for this request RuntimeOptions * @return DeleteVpcEndpointResponse */ async function deleteVpcEndpointWithOptions(request: DeleteVpcEndpointRequest, runtime: Util.RuntimeOptions): DeleteVpcEndpointResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteVpcEndpoint', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes an endpoint. * * @description * Before you delete an endpoint, you must delete the zones that are added to the endpoint. * * **DeleteVpcEndpoint** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointAttribute](https://help.aliyun.com/document_detail/183568.html) operation to check whether the endpoint is deleted. * * If the endpoint is in the **Deleting** state, the endpoint is being deleted. * * If the endpoint cannot be queried, the endpoint is deleted. * * @param request DeleteVpcEndpointRequest * @return DeleteVpcEndpointResponse */ async function deleteVpcEndpoint(request: DeleteVpcEndpointRequest): DeleteVpcEndpointResponse { var runtime = new Util.RuntimeOptions{}; return deleteVpcEndpointWithOptions(request, runtime); } model DeleteVpcEndpointServiceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), regionId?: string(name='RegionId', description='The region ID of the endpoint service. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service that you want to delete. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), } model DeleteVpcEndpointServiceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model DeleteVpcEndpointServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteVpcEndpointServiceResponseBody(name='body'), } /** * @summary Deletes an endpoint service. * * @description * Before you delete an endpoint service, you must disconnect the endpoint from the endpoint service and remove the service resources. * * **DeleteVpcEndpointService** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/183542.html) operation to check whether the endpoint service is deleted. * * If the endpoint service is in the **Deleting** state, the endpoint service is being deleted. * * If the endpoint service cannot be queried, the endpoint service is deleted. * * You cannot repeatedly call the **DeleteVpcEndpointService** operation to delete an endpoint service that belongs to an Alibaba Cloud account within a specified period of time. * * @param request DeleteVpcEndpointServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return DeleteVpcEndpointServiceResponse */ async function deleteVpcEndpointServiceWithOptions(request: DeleteVpcEndpointServiceRequest, runtime: Util.RuntimeOptions): DeleteVpcEndpointServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteVpcEndpointService', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes an endpoint service. * * @description * Before you delete an endpoint service, you must disconnect the endpoint from the endpoint service and remove the service resources. * * **DeleteVpcEndpointService** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/183542.html) operation to check whether the endpoint service is deleted. * * If the endpoint service is in the **Deleting** state, the endpoint service is being deleted. * * If the endpoint service cannot be queried, the endpoint service is deleted. * * You cannot repeatedly call the **DeleteVpcEndpointService** operation to delete an endpoint service that belongs to an Alibaba Cloud account within a specified period of time. * * @param request DeleteVpcEndpointServiceRequest * @return DeleteVpcEndpointServiceResponse */ async function deleteVpcEndpointService(request: DeleteVpcEndpointServiceRequest): DeleteVpcEndpointServiceResponse { var runtime = new Util.RuntimeOptions{}; return deleteVpcEndpointServiceWithOptions(request, runtime); } model DescribeRegionsRequest { regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceResourceType?: string(name='ServiceResourceType'), } model DescribeRegionsResponseBody = { regions?: { region?: [ { localName?: string(name='LocalName', description='The name of the region.', example='China (Hangzhou)'), regionEndpoint?: string(name='RegionEndpoint', description='The endpoint of the region.', example='privatelink.cn-hangzhou.aliyuncs.com'), regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'), serviceResourceTypes?: { serviceResourceType?: [ string ](name='ServiceResourceType') }(name='ServiceResourceTypes'), } ](name='Region') }(name='Regions', description='The available regions.'), requestId?: string(name='RequestId', description='The request ID.', example='611CB80C-B6A9-43DB-9E38-0B0AC3D9B58F'), } model DescribeRegionsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeRegionsResponseBody(name='body'), } /** * @summary Queries available regions and zones. * * @param request DescribeRegionsRequest * @param runtime runtime options for this request RuntimeOptions * @return DescribeRegionsResponse */ async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceResourceType)) { query['ServiceResourceType'] = request.serviceResourceType; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeRegions', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries available regions and zones. * * @param request DescribeRegionsRequest * @return DescribeRegionsResponse */ async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse { var runtime = new Util.RuntimeOptions{}; return describeRegionsWithOptions(request, runtime); } model DescribeZonesRequest { regionId?: string(name='RegionId', description='The region ID of the zone. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), serviceResourceType?: string(name='ServiceResourceType'), } model DescribeZonesResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='611CB80C-B6A9-43DB-9E38-0B0AC3D9B58F'), zones?: { zone?: [ { localName?: string(name='LocalName', description='The name of the zone.', example='Hangzhou Zone B'), zoneId?: string(name='ZoneId', description='The zone ID.', example='cn-hangzhou-b'), } ](name='Zone') }(name='Zones', description='The returned zones.'), } model DescribeZonesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeZonesResponseBody(name='body'), } /** * @summary Queries a list of zones in a specified region. * * @param request DescribeZonesRequest * @param runtime runtime options for this request RuntimeOptions * @return DescribeZonesResponse */ async function describeZonesWithOptions(request: DescribeZonesRequest, runtime: Util.RuntimeOptions): DescribeZonesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceResourceType)) { query['ServiceResourceType'] = request.serviceResourceType; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeZones', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries a list of zones in a specified region. * * @param request DescribeZonesRequest * @return DescribeZonesResponse */ async function describeZones(request: DescribeZonesRequest): DescribeZonesResponse { var runtime = new Util.RuntimeOptions{}; return describeZonesWithOptions(request, runtime); } model DetachResourceFromVpcEndpointServiceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate a value, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error code is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), regionId?: string(name='RegionId', description='The region ID of the endpoint. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), resourceId?: string(name='ResourceId', description='The service resource ID. This parameter is required.', example='lb-hp32z1wp5peaoox2q****'), resourceType?: string(name='ResourceType', description='The type of the service resource. Valid values: * **slb**: a Classic Load Balancer (CLB) instance that supports PrivateLink. In addition, the CLB instance is deployed in a virtual private cloud (VPC). * **alb**: an Application Load Balancer (ALB) instance that supports PrivateLink. In addition, the ALB instance is deployed in a VPC.', example='slb'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), zoneId?: string(name='ZoneId', description='The ID of the zone that you want to remove.', example='cn-hangzhou-c'), } model DetachResourceFromVpcEndpointServiceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model DetachResourceFromVpcEndpointServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DetachResourceFromVpcEndpointServiceResponseBody(name='body'), } /** * @summary Removes a service resource from an endpoint service. * * @description * Before you remove a service resource from an endpoint service, make sure that the endpoint service is in the **Active** state. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to query the status of the endpoint service. * * You cannot repeatedly call the **DetachResourceFromVpcEndpointService** operation to remove a service resource from an endpoint service within a specified period of time. * * @param request DetachResourceFromVpcEndpointServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return DetachResourceFromVpcEndpointServiceResponse */ async function detachResourceFromVpcEndpointServiceWithOptions(request: DetachResourceFromVpcEndpointServiceRequest, runtime: Util.RuntimeOptions): DetachResourceFromVpcEndpointServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.zoneId)) { query['ZoneId'] = request.zoneId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DetachResourceFromVpcEndpointService', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Removes a service resource from an endpoint service. * * @description * Before you remove a service resource from an endpoint service, make sure that the endpoint service is in the **Active** state. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to query the status of the endpoint service. * * You cannot repeatedly call the **DetachResourceFromVpcEndpointService** operation to remove a service resource from an endpoint service within a specified period of time. * * @param request DetachResourceFromVpcEndpointServiceRequest * @return DetachResourceFromVpcEndpointServiceResponse */ async function detachResourceFromVpcEndpointService(request: DetachResourceFromVpcEndpointServiceRequest): DetachResourceFromVpcEndpointServiceResponse { var runtime = new Util.RuntimeOptions{}; return detachResourceFromVpcEndpointServiceWithOptions(request, runtime); } model DetachSecurityGroupFromVpcEndpointRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The ID of the endpoint that you want to disassociate from the security group. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The region ID of the endpoint that you want to disassociate from the security group. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group from which you want to disassociate the endpoint. This parameter is required.', example='sg-hp3c8qj1tyct90ej****'), } model DetachSecurityGroupFromVpcEndpointResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='8D778FF9-7640-4C13-BCD6-9265CA9A2F81'), } model DetachSecurityGroupFromVpcEndpointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DetachSecurityGroupFromVpcEndpointResponseBody(name='body'), } /** * @summary Disassociates an endpoint from a security group. * * @description * **DetachSecurityGroupFromVpcEndpoint** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpoints](https://help.aliyun.com/document_detail/183558.html) to check whether the endpoint is disassociated from the security group. * * If the endpoint is in the **Pending** state, the endpoint is being disassociated from the security group. * * If you cannot query the endpoint in the security group, the endpoint is disassociated from the security group. * * You cannot repeatedly call the **DetachSecurityGroupFromVpcEndpoint** operation to disassociate an endpoint from a security group within a specified period of time. * * @param request DetachSecurityGroupFromVpcEndpointRequest * @param runtime runtime options for this request RuntimeOptions * @return DetachSecurityGroupFromVpcEndpointResponse */ async function detachSecurityGroupFromVpcEndpointWithOptions(request: DetachSecurityGroupFromVpcEndpointRequest, runtime: Util.RuntimeOptions): DetachSecurityGroupFromVpcEndpointResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.securityGroupId)) { query['SecurityGroupId'] = request.securityGroupId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DetachSecurityGroupFromVpcEndpoint', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Disassociates an endpoint from a security group. * * @description * **DetachSecurityGroupFromVpcEndpoint** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpoints](https://help.aliyun.com/document_detail/183558.html) to check whether the endpoint is disassociated from the security group. * * If the endpoint is in the **Pending** state, the endpoint is being disassociated from the security group. * * If you cannot query the endpoint in the security group, the endpoint is disassociated from the security group. * * You cannot repeatedly call the **DetachSecurityGroupFromVpcEndpoint** operation to disassociate an endpoint from a security group within a specified period of time. * * @param request DetachSecurityGroupFromVpcEndpointRequest * @return DetachSecurityGroupFromVpcEndpointResponse */ async function detachSecurityGroupFromVpcEndpoint(request: DetachSecurityGroupFromVpcEndpointRequest): DetachSecurityGroupFromVpcEndpointResponse { var runtime = new Util.RuntimeOptions{}; return detachSecurityGroupFromVpcEndpointWithOptions(request, runtime); } model DisableVpcEndpointConnectionRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The endpoint ID. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The ID of the region where the connection request from the endpoint is rejected. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), } model DisableVpcEndpointConnectionResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model DisableVpcEndpointConnectionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DisableVpcEndpointConnectionResponseBody(name='body'), } /** * @summary Rejects a connection request from an endpoint. * * @description * **DisableVpcEndpointConnection** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointAttribute](https://help.aliyun.com/document_detail/183568.html) operation to query the state of the endpoint connection. * * If the endpoint connection is in the **Disconnecting** state, the endpoint is being disconnected from the endpoint service. * * If the endpoint connection is in the **Disconnected** state, the endpoint is disconnected from the endpoint service. * * You cannot repeatedly call the **DisableVpcEndpointConnection** operation to allow an endpoint service to reject a connection request from an endpoint within a specified period of time. * * @param request DisableVpcEndpointConnectionRequest * @param runtime runtime options for this request RuntimeOptions * @return DisableVpcEndpointConnectionResponse */ async function disableVpcEndpointConnectionWithOptions(request: DisableVpcEndpointConnectionRequest, runtime: Util.RuntimeOptions): DisableVpcEndpointConnectionResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DisableVpcEndpointConnection', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Rejects a connection request from an endpoint. * * @description * **DisableVpcEndpointConnection** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointAttribute](https://help.aliyun.com/document_detail/183568.html) operation to query the state of the endpoint connection. * * If the endpoint connection is in the **Disconnecting** state, the endpoint is being disconnected from the endpoint service. * * If the endpoint connection is in the **Disconnected** state, the endpoint is disconnected from the endpoint service. * * You cannot repeatedly call the **DisableVpcEndpointConnection** operation to allow an endpoint service to reject a connection request from an endpoint within a specified period of time. * * @param request DisableVpcEndpointConnectionRequest * @return DisableVpcEndpointConnectionResponse */ async function disableVpcEndpointConnection(request: DisableVpcEndpointConnectionRequest): DisableVpcEndpointConnectionResponse { var runtime = new Util.RuntimeOptions{}; return disableVpcEndpointConnectionWithOptions(request, runtime); } model DisableVpcEndpointZoneConnectionRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The endpoint ID. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The ID of the region where the connection request from the endpoint is rejected. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), replacedResource?: boolean(name='ReplacedResource', description='Specifies whether to close connections in the endpoint zone after migration. Valid values: * **true**: yes * **false** (default): no > Set the value to true if you want to close connections in the endpoint zone after migration.', example='false'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), zoneId?: string(name='ZoneId', description='The ID of the zone that is associated with the endpoint. This parameter is required.', example='cn-hangzhou-b'), } model DisableVpcEndpointZoneConnectionResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model DisableVpcEndpointZoneConnectionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DisableVpcEndpointZoneConnectionResponseBody(name='body'), } /** * @summary Closes connections in an endpoint zone. * * @description * You can call this operation only when the state of the endpoint is **Connected** and the state of the zone associated with the endpoint is **Connected** or **Migrated**. * * **DisableVpcEndpointZoneConnection** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpointZones](https://help.aliyun.com/document_detail/183560.html) operation to query the status of the task. * * If the zone is in the **Disconnecting** state, the task is running. * * If the zone is in the **Disconnected** state, the task is successful. * * You cannot repeatedly call the **DisableVpcEndpointZoneConnection** operation to allow an endpoint service to reject a connection request from the endpoint in the zone within a specified period of time. * * @param request DisableVpcEndpointZoneConnectionRequest * @param runtime runtime options for this request RuntimeOptions * @return DisableVpcEndpointZoneConnectionResponse */ async function disableVpcEndpointZoneConnectionWithOptions(request: DisableVpcEndpointZoneConnectionRequest, runtime: Util.RuntimeOptions): DisableVpcEndpointZoneConnectionResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.replacedResource)) { query['ReplacedResource'] = request.replacedResource; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.zoneId)) { query['ZoneId'] = request.zoneId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DisableVpcEndpointZoneConnection', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Closes connections in an endpoint zone. * * @description * You can call this operation only when the state of the endpoint is **Connected** and the state of the zone associated with the endpoint is **Connected** or **Migrated**. * * **DisableVpcEndpointZoneConnection** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpointZones](https://help.aliyun.com/document_detail/183560.html) operation to query the status of the task. * * If the zone is in the **Disconnecting** state, the task is running. * * If the zone is in the **Disconnected** state, the task is successful. * * You cannot repeatedly call the **DisableVpcEndpointZoneConnection** operation to allow an endpoint service to reject a connection request from the endpoint in the zone within a specified period of time. * * @param request DisableVpcEndpointZoneConnectionRequest * @return DisableVpcEndpointZoneConnectionResponse */ async function disableVpcEndpointZoneConnection(request: DisableVpcEndpointZoneConnectionRequest): DisableVpcEndpointZoneConnectionResponse { var runtime = new Util.RuntimeOptions{}; return disableVpcEndpointZoneConnectionWithOptions(request, runtime); } model EnableVpcEndpointConnectionRequest { bandwidth?: int32(name='Bandwidth', description='The bandwidth of the endpoint connection. Unit: Mbit/s. Valid values: **3072 to 10240**. > The bandwidth of an endpoint connection is in the range of **100 to 10,240** Mbit/s. The default bandwidth is **3,072** Mbit/s. When the endpoint is connected to the endpoint service, the default bandwidth is the minimum bandwidth. In this case, the connection bandwidth range is **3,072 to 10,240** Mbit/s. If Classic Load Balancer (CLB) instances or Application Load Balancer (ALB) instances are specified as service resources, you can modify the endpoint connection bandwidth based on your business requirements. This parameter is invalid if Network Load Balancer (NLB) instances are specified as service resources.', example='1024'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the check, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The endpoint ID. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The ID of the region where the connection request is accepted. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), } model EnableVpcEndpointConnectionResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model EnableVpcEndpointConnectionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: EnableVpcEndpointConnectionResponseBody(name='body'), } /** * @summary Accepts connection requests from an endpoint. * * @description * **EnableVpcEndpointConnection** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointAttribute](https://help.aliyun.com/document_detail/183568.html) operation to query the state of the endpoint connection. * * If the state is **Connecting**, the endpoint connection is being established. * * If the state is **Connected**, the endpoint connection is established. * * You cannot repeatedly call the **EnableVpcEndpointConnection** operation to allow an endpoint service of an Alibaba Cloud account to accept a connection request from an endpoint within a specified period of time. * * @param request EnableVpcEndpointConnectionRequest * @param runtime runtime options for this request RuntimeOptions * @return EnableVpcEndpointConnectionResponse */ async function enableVpcEndpointConnectionWithOptions(request: EnableVpcEndpointConnectionRequest, runtime: Util.RuntimeOptions): EnableVpcEndpointConnectionResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bandwidth)) { query['Bandwidth'] = request.bandwidth; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'EnableVpcEndpointConnection', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Accepts connection requests from an endpoint. * * @description * **EnableVpcEndpointConnection** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointAttribute](https://help.aliyun.com/document_detail/183568.html) operation to query the state of the endpoint connection. * * If the state is **Connecting**, the endpoint connection is being established. * * If the state is **Connected**, the endpoint connection is established. * * You cannot repeatedly call the **EnableVpcEndpointConnection** operation to allow an endpoint service of an Alibaba Cloud account to accept a connection request from an endpoint within a specified period of time. * * @param request EnableVpcEndpointConnectionRequest * @return EnableVpcEndpointConnectionResponse */ async function enableVpcEndpointConnection(request: EnableVpcEndpointConnectionRequest): EnableVpcEndpointConnectionResponse { var runtime = new Util.RuntimeOptions{}; return enableVpcEndpointConnectionWithOptions(request, runtime); } model EnableVpcEndpointZoneConnectionRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The endpoint ID. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The ID of the region where the endpoint connection request is accepted. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), zoneId?: string(name='ZoneId', description='The ID of the zone that is associated with the endpoint. This parameter is required.', example='cn-hangzhou-b'), } model EnableVpcEndpointZoneConnectionResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model EnableVpcEndpointZoneConnectionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: EnableVpcEndpointZoneConnectionResponseBody(name='body'), } /** * @summary Allows connections to endpoint zones. * * @description * You can call this operation only when the state of the endpoint is **Connected** and the state of the associated zone is **Disconnected**. * * **EnableVpcEndpointZoneConnection** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpointZones](https://help.aliyun.com/document_detail/183560.html) operation to check whether the endpoint service accepts a connection request from the endpoint in the associated zone. * * If the zone is in the **Connecting** state, the endpoint service is accepting the connection request from the endpoint. * * If the zone is in the **Connected** state, the endpoint service has accepted the connection request from the endpoint. * * You cannot repeatedly call the **EnableVpcEndpointZoneConnection** operation to allow an endpoint service to accept a connection request from an endpoint in the associated zone within a specified period of time. * * @param request EnableVpcEndpointZoneConnectionRequest * @param runtime runtime options for this request RuntimeOptions * @return EnableVpcEndpointZoneConnectionResponse */ async function enableVpcEndpointZoneConnectionWithOptions(request: EnableVpcEndpointZoneConnectionRequest, runtime: Util.RuntimeOptions): EnableVpcEndpointZoneConnectionResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.zoneId)) { query['ZoneId'] = request.zoneId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'EnableVpcEndpointZoneConnection', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Allows connections to endpoint zones. * * @description * You can call this operation only when the state of the endpoint is **Connected** and the state of the associated zone is **Disconnected**. * * **EnableVpcEndpointZoneConnection** is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpointZones](https://help.aliyun.com/document_detail/183560.html) operation to check whether the endpoint service accepts a connection request from the endpoint in the associated zone. * * If the zone is in the **Connecting** state, the endpoint service is accepting the connection request from the endpoint. * * If the zone is in the **Connected** state, the endpoint service has accepted the connection request from the endpoint. * * You cannot repeatedly call the **EnableVpcEndpointZoneConnection** operation to allow an endpoint service to accept a connection request from an endpoint in the associated zone within a specified period of time. * * @param request EnableVpcEndpointZoneConnectionRequest * @return EnableVpcEndpointZoneConnectionResponse */ async function enableVpcEndpointZoneConnection(request: EnableVpcEndpointZoneConnectionRequest): EnableVpcEndpointZoneConnectionResponse { var runtime = new Util.RuntimeOptions{}; return enableVpcEndpointZoneConnectionWithOptions(request, runtime); } model GetVpcEndpointAttributeRequest { endpointId?: string(name='EndpointId', description='The ID of the endpoint whose attributes you want to query. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The region ID of the endpoint whose attributes you want to query. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), } model GetVpcEndpointAttributeResponseBody = { addressIpVersion?: string(name='AddressIpVersion', description='The protocol. Valid values: * **IPv4** * **DualStack**', example='IPv4'), bandwidth?: int32(name='Bandwidth', description='The bandwidth of the endpoint connection. Unit: Mbit/s.', example='1024'), connectionStatus?: string(name='ConnectionStatus', description='The state of the endpoint connection. Valid values: * **Pending**: The connection is being modified. * **Connecting**: The connection is being established. * **Connected**: The connection is established. * **Disconnecting**: The endpoint is being disconnected from the endpoint service. * **Disconnected**: The endpoint is disconnected from the endpoint service. * **Deleting**: The connection is being deleted.', example='Connected'), createTime?: string(name='CreateTime', description='The time when the endpoint was created.', example='2021-09-24T18:00:07Z'), endpointBusinessStatus?: string(name='EndpointBusinessStatus', description='The service state of the endpoint. Valid values: * **Normal**: The endpoint runs as expected. * **FinancialLocked**: The endpoint is locked due to overdue payments.', example='Normal'), endpointDescription?: string(name='EndpointDescription', description='The description of the endpoint.', example='This is my Endpoint.'), endpointDomain?: string(name='EndpointDomain', description='The domain name of the endpoint.', example='ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com'), endpointId?: string(name='EndpointId', description='The endpoint ID.', example='ep-hp33b2e43fays7s8****'), endpointName?: string(name='EndpointName', description='The name of the endpoint.', example='test'), endpointStatus?: string(name='EndpointStatus', description='The state of the endpoint. Valid values: * **Creating**: The endpoint is being created. * **Active**: The endpoint is available. * **Pending**: The endpoint is being modified. * **Deleting**: The endpoint is being deleted.', example='Active'), endpointType?: string(name='EndpointType', description='The type of the endpoint. **Interface** is returned. The value indicates the interface endpoint with which the Classic Load Balancer (CLB) instances are associated.', example='Interface'), payer?: string(name='Payer', description='The payer. Valid values: * **Endpoint**: the service consumer. * **EndpointService**: the service provider.', example='Endpoint'), policyDocument?: string(name='PolicyDocument', example='{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "oss:List*", "oss:PutObject", "oss:GetObject" ], "Resource": [ "acs:oss:oss-*:*:pvl-policy-test/policy-test.txt" ], "Principal": { "RAM": [ "acs:ram::14199xxxxxx:*" ] } } ] }'), regionId?: string(name='RegionId', description='The region ID of the endpoint.', example='cn-huhehaote'), requestId?: string(name='RequestId', description='The request ID.', example='8D8992C1-6712-423C-BAC5-E5E817484C6B'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmz7nocpei***'), resourceOwner?: boolean(name='ResourceOwner', description='Indicates whether the endpoint and the endpoint service belong to the same Alibaba Cloud account. Valid values: * **true**: The endpoint and the endpoint service belong to the same Alibaba Cloud account. * **false**: The endpoint and the endpoint service do not belong to the same Alibaba Cloud account.', example='true'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service with which the endpoint is associated.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service with which the endpoint is associated.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****'), vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) to which the endpoint belongs.', example='vpc-fdfhkjafhjvcvdjf****'), zoneAffinityEnabled?: boolean(name='ZoneAffinityEnabled', description='Indicates whether the domain name of the nearest endpoint that is associated with the endpoint service is resolved first. Valid values: * **true** * **false**', example='true'), zonePrivateIpAddressCount?: long(name='ZonePrivateIpAddressCount', description='The number of private IP addresses that are assigned to an elastic network interface (ENI) in each zone. Only **1** is returned.', example='1'), } model GetVpcEndpointAttributeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetVpcEndpointAttributeResponseBody(name='body'), } /** * @summary Queries the attributes of an endpoint. * * @param request GetVpcEndpointAttributeRequest * @param runtime runtime options for this request RuntimeOptions * @return GetVpcEndpointAttributeResponse */ async function getVpcEndpointAttributeWithOptions(request: GetVpcEndpointAttributeRequest, runtime: Util.RuntimeOptions): GetVpcEndpointAttributeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetVpcEndpointAttribute', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the attributes of an endpoint. * * @param request GetVpcEndpointAttributeRequest * @return GetVpcEndpointAttributeResponse */ async function getVpcEndpointAttribute(request: GetVpcEndpointAttributeRequest): GetVpcEndpointAttributeResponse { var runtime = new Util.RuntimeOptions{}; return getVpcEndpointAttributeWithOptions(request, runtime); } model GetVpcEndpointServiceAttributeRequest { regionId?: string(name='RegionId', description='The region ID of the endpoint service. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), } model GetVpcEndpointServiceAttributeResponseBody = { addressIpVersion?: string(name='AddressIpVersion'), autoAcceptEnabled?: boolean(name='AutoAcceptEnabled', description='Indicates whether endpoint connection requests are automatically accepted. Valid values: * **true** * **false**', example='true'), connectBandwidth?: int32(name='ConnectBandwidth', description='The default maximum bandwidth of the endpoint connection. Unit: Mbit/s. Valid values: **100** to 10240.', example='1024'), createTime?: string(name='CreateTime', description='The time when the endpoint service was created.', example='2020-01-02T19:11:12Z'), maxBandwidth?: int32(name='MaxBandwidth', description='The maximum bandwidth of the endpoint connection. Unit: Mbit/s.', example='1024'), minBandwidth?: int32(name='MinBandwidth', description='The minimum bandwidth of the endpoint connection. Unit: Mbit/s.', example='100'), payer?: string(name='Payer', description='The payer of the endpoint service. Valid values: * **Endpoint**: the service consumer. * **EndpointService**: the service provider.', example='Endpoint'), regionId?: string(name='RegionId', description='The region ID of the endpoint service.', example='cn-huhehaote'), requestId?: string(name='RequestId', description='The request ID.', example='8D8992C1-6712-423C-BAC5-E5E817484C6B'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmy*****'), serviceBusinessStatus?: string(name='ServiceBusinessStatus', description='The service status of the endpoint service. Valid values: * **Normal**: The endpoint service runs as expected. * **FinancialLocked**: The endpoint service is locked due to overdue payments.', example='Normal'), serviceDescription?: string(name='ServiceDescription', description='The description of the endpoint service.', example='This is my EndpointService.'), serviceDomain?: string(name='ServiceDomain', description='The domain name of the endpoint service.', example='epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com'), serviceId?: string(name='ServiceId', description='The endpoint service ID.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****'), serviceResourceType?: string(name='ServiceResourceType', description='The type of the service resource. Valid values: * **slb**: a CLB instance. * **alb**: an ALB instance.', example='slb'), serviceStatus?: string(name='ServiceStatus', description='The state of the endpoint service. Valid values: * **Creating**: The endpoint service is being created. * **Pending**: The endpoint service is being modified. * **Active**: The endpoint service is available. * **Deleting**: The endpoint service is being deleted. * **Inactive**: The endpoint service is unavailable.', example='Active'), serviceSupportIPv6?: boolean(name='ServiceSupportIPv6', description='Specifies whether the endpoint service supports IPv6. Valid values: * **true** * **false** (default)', example='false', deprecated=true), serviceType?: string(name='ServiceType', description='The type of the endpoint. Only **Interface** is returned. The value indicates the interface endpoint. Then, you can specify ALB and CLB instances as service resources for the endpoint service.', example='Interface'), zoneAffinityEnabled?: boolean(name='ZoneAffinityEnabled', description='Indicates whether the domain name of the nearest endpoint that is associated with the endpoint service is resolved first. Valid values: * **true** (default) * **false**', example='true'), zones?: [ string ](name='Zones', description='The zones to which the service resources belong.'), } model GetVpcEndpointServiceAttributeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GetVpcEndpointServiceAttributeResponseBody(name='body'), } /** * @summary Queries the attributes of an endpoint service. * * @param request GetVpcEndpointServiceAttributeRequest * @param runtime runtime options for this request RuntimeOptions * @return GetVpcEndpointServiceAttributeResponse */ async function getVpcEndpointServiceAttributeWithOptions(request: GetVpcEndpointServiceAttributeRequest, runtime: Util.RuntimeOptions): GetVpcEndpointServiceAttributeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GetVpcEndpointServiceAttribute', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the attributes of an endpoint service. * * @param request GetVpcEndpointServiceAttributeRequest * @return GetVpcEndpointServiceAttributeResponse */ async function getVpcEndpointServiceAttribute(request: GetVpcEndpointServiceAttributeRequest): GetVpcEndpointServiceAttributeResponse { var runtime = new Util.RuntimeOptions{}; return getVpcEndpointServiceAttributeWithOptions(request, runtime); } model ListTagResourcesRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. * If this is your first request or no next requests are to be sent, you do not need to specify this parameter. * If a next request is to be sent, you must specify the token that is obtained from the previous request as the value of **NextToken**.', example='caeba0bbb2be03f84eb48b699f0a****'), regionId?: string(name='RegionId', description='The ID of the region where the resource resides. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId', description='The resource IDs. You can specify up to 50 resource IDs.'), resourceType?: string(name='ResourceType', description='The type of the resource. Valid values: * **vpcendpoint**: endpoint * **vpcendpointservice**: endpoint service This parameter is required.', example='vpcendpoint'), tag?: [ { key?: string(name='Key', description='The key of tag N to add to the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The tag key must start with a letter but cannot start with `aliyun` or `acs:`. The tag key cannot contain `http://` or `https://`.', example='FinanceDept'), value?: string(name='Value', description='The value of tag N to add to the resource. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The tag value must start with a letter but cannot start with `aliyun` or `acs:`. The tag value cannot contain `http://` or `https://`.', example='FinanceJoshua'), } ](name='Tag', description='The tags to add to the resource.'), } model ListTagResourcesResponseBody = { nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the parameter to the value of NextToken that is returned from the last call.', example='caeba0bbb2be03f84eb48b699f0a4883'), requestId?: string(name='RequestId', description='The request ID.', example='8D8992C1-6712-423C-BAC5-E5E817484C6B'), tagResources?: [ { resourceId?: string(name='ResourceId', description='The resource ID.', example='ep-hp3i05294c2d2d******'), resourceType?: string(name='ResourceType', description='The type of the resource. Valid values: * **vpcendpoint**: endpoint * **vpcendpointservice**: endpoint service', example='vpcendpoint'), tagKey?: string(name='TagKey', description='The key of tag N added to the resource.', example='endpoint'), tagValue?: string(name='TagValue', description='The value of tag N added to the resource.', example='FinanceJoshua'), } ](name='TagResources', description='The resources to which the tags are added.'), } model ListTagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListTagResourcesResponseBody(name='body'), } /** * @summary Queries the tags that are added to resources. * * @description * You must specify **ResourceId.N** or **Tag.N** in the request to specify the object that you want to query. * * **Tag.N** is a resource tag that consists of a key-value pair (Tag.N.Key and Tag.N.Value). If you specify only **Tag.N.Key**, all tag values that are associated with the specified key are returned. If you specify only **Tag.N.Value**, an error message is returned. * * If you specify **Tag.N** and **ResourceId.N** to filter tags, **ResourceId.N** must match all specified key-value pairs. * * If you specify multiple key-value pairs, resources that contain these key-value pairs are returned. * * @param request ListTagResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListTagResourcesResponse */ async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListTagResources', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the tags that are added to resources. * * @description * You must specify **ResourceId.N** or **Tag.N** in the request to specify the object that you want to query. * * **Tag.N** is a resource tag that consists of a key-value pair (Tag.N.Key and Tag.N.Value). If you specify only **Tag.N.Key**, all tag values that are associated with the specified key are returned. If you specify only **Tag.N.Value**, an error message is returned. * * If you specify **Tag.N** and **ResourceId.N** to filter tags, **ResourceId.N** must match all specified key-value pairs. * * If you specify multiple key-value pairs, resources that contain these key-value pairs are returned. * * @param request ListTagResourcesRequest * @return ListTagResourcesResponse */ async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return listTagResourcesWithOptions(request, runtime); } model ListVpcEndpointConnectionsRequest { connectionStatus?: string(name='ConnectionStatus', description='The state of the endpoint connection. Valid values: * **Pending**: The endpoint connection is being modified. * **Connecting**: The endpoint connection is being established. * **Connected**: The endpoint connection is established. * **Disconnecting**: The endpoint is being disconnected from the endpoint service. * **Disconnected**: The endpoint is disconnected from the endpoint service. * **Deleting**: The connection is being deleted. * **ServiceDeleted**: The corresponding endpoint service has been deleted.', example='Disconnected'), endpointId?: string(name='EndpointId', description='The endpoint ID.', example='ep-hp33b2e43fays7s8****'), endpointOwnerId?: long(name='EndpointOwnerId', description='The ID of the Alibaba Cloud account to which the endpoint belongs.', example='25346073170691****'), eniId?: string(name='EniId', description='The ID of the endpoint elastic network interface (ENI).', example='eni-hp32lk0pyv6o94hs****'), maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. Valid values: **1** to **50**. Default value: **50**.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the value to the value of **NextToken** that is returned from the last call.', example='caeba0bbb2be03f84eb48b699f0a4883'), regionId?: string(name='RegionId', description='The region ID of the endpoint connection. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), replacedResourceId?: string(name='ReplacedResourceId', description='The ID of the replaced service resource in smooth migration scenarios.', example='lb-hp32z1wp5peaoox2q****'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the endpoint belongs.', example='rg-acfmy*****'), resourceId?: string(name='ResourceId', description='The service resource ID.', example='lb-hp32z1wp5peaoox2q****'), serviceId?: string(name='ServiceId', description='The endpoint service ID.', example='epsrv-hp3vpx8yqxblby3i****'), } model ListVpcEndpointConnectionsResponseBody = { connections?: [ { bandwidth?: int32(name='Bandwidth', description='The bandwidth of the endpoint connection. Valid values: **1024 to 10240**. Unit: Mbit/s.', example='1024'), connectionStatus?: string(name='ConnectionStatus', description='The state of the endpoint connection. Valid values: * **Pending**: The connection is being modified. * **Connecting**: The connection is being established. * **Connected**: The connection is established. * **Disconnecting**: The endpoint is being disconnected from the endpoint service. * **Disconnected**: The endpoint is disconnected from the endpoint service. * **Deleting**: The connection is being deleted. * **ServiceDeleted**: The corresponding endpoint service has been deleted.', example='Disconnected'), endpointId?: string(name='EndpointId', description='The endpoint ID.', example='ep-hp33b2e43fays7s8****'), endpointOwnerId?: long(name='EndpointOwnerId', description='The ID of the Alibaba Cloud account to which the endpoint belongs.', example='25346073170691****'), endpointVpcId?: string(name='EndpointVpcId', description='The ID of the virtual private cloud (VPC) to which the endpoint belongs.', example='vpc-hp356stwkxg3fn2xe****'), modifiedTime?: string(name='ModifiedTime', description='The time when the endpoint connection was modified.', example='2021-09-28T10:34:46Z'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the endpoint belongs.', example='rg-acfmw353z35v***'), resourceOwner?: boolean(name='ResourceOwner', description='Indicates whether the endpoint and the endpoint service belong to the same Alibaba Cloud account. Valid values: * **true** * **false**', example='true'), serviceId?: string(name='ServiceId', description='The endpoint service ID.', example='epsrv-hp3vpx8yqxblby3i****'), zones?: [ { eniId?: string(name='EniId', description='The endpoint ENI ID.', example='eni-hp32lk0pyv6o94hs****'), replacedEniId?: string(name='ReplacedEniId', description='The ID of the replaced endpoint ENI in smooth migration scenarios.', example='eni-hp32lk0pyv6o94hs****'), replacedResourceId?: string(name='ReplacedResourceId', description='The ID of the replaced service resource in smooth migration scenarios.', example='lb-hp32z1wp5peaoox2q****'), resourceId?: string(name='ResourceId', description='The service resource ID.', example='lb-hp32z1wp5peaoox2q****'), vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the endpoint belongs.', example='vsw-hp3uf6045ljdhd5zr****'), zoneDomain?: string(name='ZoneDomain', description='The domain name of the zone.', example='ep-hp34jaz8ykl0exwt****-cn-huhehaote.epsrv-hp3vpx8yqxblby3i****.cn-huhehaote-b.privatelink.aliyuncs.com'), zoneId?: string(name='ZoneId', description='The zone ID.', example='cn-huhehaote-b'), zoneStatus?: string(name='ZoneStatus', description='The state of the zone. Valid values: * **Creating**: The zone is being created. * **Wait**: The zone is to be connected. * **Connected**: The zone is connected. * **Deleting**: The zone is being deleted. * **Disconnecting**: The zone is being disconnected. * **Disconnected**: The zone is disconnected. * **Connecting**: The zone is being connected. * **Migrating**: The zone is being migrated. * **Migrated**: The zone is migrated.', example='Connected'), } ](name='Zones', description='The zones.'), } ](name='Connections', description='The endpoint connections.'), maxResults?: int32(name='MaxResults', description='The number of entries returned on each page.', example='50'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values: * If no value is returned for **NextToken**, no next requests are performed. * If a value is returned for **NextToken**, the value can be used in the next request to retrieve a new page of results.', example='caeba0bbb2be03f84eb48b699f0a4883'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), totalCount?: string(name='TotalCount', description='The total number of entries returned.', example='1'), } model ListVpcEndpointConnectionsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVpcEndpointConnectionsResponseBody(name='body'), } /** * @summary Queries endpoint connections. * * @param request ListVpcEndpointConnectionsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListVpcEndpointConnectionsResponse */ async function listVpcEndpointConnectionsWithOptions(request: ListVpcEndpointConnectionsRequest, runtime: Util.RuntimeOptions): ListVpcEndpointConnectionsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.connectionStatus)) { query['ConnectionStatus'] = request.connectionStatus; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.endpointOwnerId)) { query['EndpointOwnerId'] = request.endpointOwnerId; } if (!Util.isUnset(request.eniId)) { query['EniId'] = request.eniId; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.replacedResourceId)) { query['ReplacedResourceId'] = request.replacedResourceId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVpcEndpointConnections', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries endpoint connections. * * @param request ListVpcEndpointConnectionsRequest * @return ListVpcEndpointConnectionsResponse */ async function listVpcEndpointConnections(request: ListVpcEndpointConnectionsRequest): ListVpcEndpointConnectionsResponse { var runtime = new Util.RuntimeOptions{}; return listVpcEndpointConnectionsWithOptions(request, runtime); } model ListVpcEndpointSecurityGroupsRequest { endpointId?: string(name='EndpointId', description='The ID of the endpoint that you want to query. This parameter is required.', example='ep-hp33b2e43fays7s8****'), maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. Valid values:**1** to **50**. Default value: **50**.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the parameter to the value of **NextToken** that is returned from the last call.', example='caeba0bbb2be03f84eb48b699f0a4883'), regionId?: string(name='RegionId', description='The region ID of the endpoint that you want to query. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), } model ListVpcEndpointSecurityGroupsResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries returned per page.', example='50'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values: * If no value is returned for **NextToken**, no next requests are performed. * If a value is returned for **NextToken**, the value can be used in the next request to retrieve a new page of results.', example='caeba0bbb2be03f84eb48b699f0a4883'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), securityGroups?: [ { securityGroupId?: string(name='SecurityGroupId', description='The ID of the security group that is associated with the endpoint.', example='sg-hp33bw6ynvm2yb0e****'), securityGroupStatus?: string(name='SecurityGroupStatus', description='The associate status of the security group, valid values: - Attaching: The security group is being attached. - Attached: The security group is attached. - Detaching: The security group is being detached.', example='Attached'), } ](name='SecurityGroups', description='The information about the security groups.'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='12'), } model ListVpcEndpointSecurityGroupsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVpcEndpointSecurityGroupsResponseBody(name='body'), } /** * @summary Queries the security groups that are associated with an endpoint. * * @param request ListVpcEndpointSecurityGroupsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListVpcEndpointSecurityGroupsResponse */ async function listVpcEndpointSecurityGroupsWithOptions(request: ListVpcEndpointSecurityGroupsRequest, runtime: Util.RuntimeOptions): ListVpcEndpointSecurityGroupsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVpcEndpointSecurityGroups', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the security groups that are associated with an endpoint. * * @param request ListVpcEndpointSecurityGroupsRequest * @return ListVpcEndpointSecurityGroupsResponse */ async function listVpcEndpointSecurityGroups(request: ListVpcEndpointSecurityGroupsRequest): ListVpcEndpointSecurityGroupsResponse { var runtime = new Util.RuntimeOptions{}; return listVpcEndpointSecurityGroupsWithOptions(request, runtime); } model ListVpcEndpointServiceResourcesRequest { maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. Valid values: **1** to **50**. Default value: **50**.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the parameter to the value of NextToken that is returned from the last call.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'), regionId?: string(name='RegionId', description='The region ID of the service resource. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), } model ListVpcEndpointServiceResourcesResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries returned on each page.', example='50'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values: * If no value is returned for **NextToken**, no next requests are performed. * If a value is returned for **NextToken**, the value can be used in the next request to retrieve a new page of results.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), resources?: [ { autoAllocatedEnabled?: boolean(name='AutoAllocatedEnabled', description='Indicates whether automatic resource allocation is enabled. Valid values: * **true** * **false**', example='false'), ip?: string(name='Ip', description='The IP address of the service resource.', example='192.168.10.23'), regionId?: string(name='RegionId', description='The ID of the region where the service resource is deployed.', example='cn-huhehaote'), relatedDeprecatedEndpointCount?: long(name='RelatedDeprecatedEndpointCount', description='The number of endpoints that are associated with the service resource that is smoothly migrated.', example='10'), relatedEndpointCount?: long(name='RelatedEndpointCount', description='The number of endpoints that are associated with the service resource.', example='10'), resourceId?: string(name='ResourceId', description='The service resource ID.', example='lb-hp32z1wp5peaoox2q****'), resourceSupportIPv6?: boolean(name='ResourceSupportIPv6', description='Indicates whether IPv6 is enabled for the endpoint service. Valid values: * **true** * **false**', example='false'), resourceType?: string(name='ResourceType', description='The type of the service resource. Only **slb** is returned. This value indicates a Classic Load Balancer (CLB) instance.', example='slb'), vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch to which the service resource belongs.', example='vsw-hp3uf6045ljdhd5zr****'), vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) to which the service resource belongs.', example='vpc-hp356stwkxg3fn2xe****'), zoneId?: string(name='ZoneId', description='The ID of the zone to which the service resource belongs.', example='cn-huhehaote-b'), } ](name='Resources', description='The service resources.'), } model ListVpcEndpointServiceResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVpcEndpointServiceResourcesResponseBody(name='body'), } /** * @summary Queries the service resources that are added to an endpoint service. * * @param request ListVpcEndpointServiceResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListVpcEndpointServiceResourcesResponse */ async function listVpcEndpointServiceResourcesWithOptions(request: ListVpcEndpointServiceResourcesRequest, runtime: Util.RuntimeOptions): ListVpcEndpointServiceResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVpcEndpointServiceResources', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the service resources that are added to an endpoint service. * * @param request ListVpcEndpointServiceResourcesRequest * @return ListVpcEndpointServiceResourcesResponse */ async function listVpcEndpointServiceResources(request: ListVpcEndpointServiceResourcesRequest): ListVpcEndpointServiceResourcesResponse { var runtime = new Util.RuntimeOptions{}; return listVpcEndpointServiceResourcesWithOptions(request, runtime); } model ListVpcEndpointServiceUsersRequest { maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. Valid values: **1 to 50**. Default value: **50**.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the value to the value of **NextToken** that is returned from the last call.', example='caeba0bbb2be03f84eb48b699f0a4883'), regionId?: string(name='RegionId', description='The region ID of the endpoint service that you want to query. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), userId?: long(name='UserId', description='The ID of the Alibaba Cloud account in the whitelist of the endpoint service.', example='12345678'), userListType?: string(name='UserListType', description='The type of the user list in the whitelist of the endpoint service.', example='Users'), } model ListVpcEndpointServiceUsersResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries returned on each page.', example='50'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values: * If no value is returned for **NextToken**, no next requests are performed. * If a value is returned for **NextToken**, the value can be used in the next request to retrieve a new page of results.', example='caeba0bbb2be03f84eb48b699f0a4883'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), totalCount?: string(name='TotalCount', description='The total number of entries returned.', example='3'), userARNs?: [ { userARN?: string(name='UserARN', description='The whitelist in the format of ARN.', example='acs:ram:*::*'), } ](name='UserARNs', description='The whitelists in the format of Aliyun Resource Name (ARN).'), users?: [ { userId?: long(name='UserId', description='The ID of the Alibaba Cloud account in the whitelist of the endpoint service.', example='12345678'), } ](name='Users', description='The Alibaba Cloud accounts in the whitelist of the endpoint service.'), } model ListVpcEndpointServiceUsersResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVpcEndpointServiceUsersResponseBody(name='body'), } /** * @summary Queries the whitelist of an endpoint service. * * @param request ListVpcEndpointServiceUsersRequest * @param runtime runtime options for this request RuntimeOptions * @return ListVpcEndpointServiceUsersResponse */ async function listVpcEndpointServiceUsersWithOptions(request: ListVpcEndpointServiceUsersRequest, runtime: Util.RuntimeOptions): ListVpcEndpointServiceUsersResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.userId)) { query['UserId'] = request.userId; } if (!Util.isUnset(request.userListType)) { query['UserListType'] = request.userListType; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVpcEndpointServiceUsers', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the whitelist of an endpoint service. * * @param request ListVpcEndpointServiceUsersRequest * @return ListVpcEndpointServiceUsersResponse */ async function listVpcEndpointServiceUsers(request: ListVpcEndpointServiceUsersRequest): ListVpcEndpointServiceUsersResponse { var runtime = new Util.RuntimeOptions{}; return listVpcEndpointServiceUsersWithOptions(request, runtime); } model ListVpcEndpointServicesRequest { addressIpVersion?: string(name='AddressIpVersion'), autoAcceptEnabled?: boolean(name='AutoAcceptEnabled', description='Specifies whether to automatically accept endpoint connection requests. Valid values: * **true** * **false** (default)', example='false'), maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. Valid values: **1** to **50**. Default value: **50**.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the parameter to the value of NextToken that is returned from the last call.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'), regionId?: string(name='RegionId', description='The region ID of the endpoint service. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmy*****'), resourceId?: string(name='ResourceId', description='The service resource ID.', example='lb-hp32z1wp5peaoox2q****'), serviceBusinessStatus?: string(name='ServiceBusinessStatus', description='The service state of the endpoint service. Valid values: * **Normal**: The endpoint service runs as expected. * **FinancialLocked**: The endpoint service is locked due to overdue payments.', example='Normal'), serviceId?: string(name='ServiceId', description='The endpoint service ID.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****'), serviceResourceType?: string(name='ServiceResourceType', description='The type of the service resource. Valid values: * **slb**: a Classic Load Balancer (CLB) instance * **alb**: an Application Load Balancer (ALB) instance', example='slb'), serviceStatus?: string(name='ServiceStatus', description='The state of the endpoint service. Valid values: * **Creating**: The endpoint service is being created. * **Pending**: The endpoint service is being modified. * **Active**: The endpoint service is available. * **Deleting**: The endpoint service is being deleted', example='Active'), tag?: [ { key?: string(name='Key', description='The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='FinanceDept'), value?: string(name='Value', description='The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='FinanceJoshua'), } ](name='Tag', description='The list of tags.'), zoneAffinityEnabled?: boolean(name='ZoneAffinityEnabled', description='Specifies whether to first resolve the domain name of the nearest endpoint that is associated with the endpoint service. Valid values: * **true** (default) * **false**', example='true'), } model ListVpcEndpointServicesResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries returned per page.', example='50'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values: * If no value is returned for **NextToken**, no next requests are performed. * If a value is returned for **NextToken**, the value can be used in the next request to retrieve a new page of results.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), services?: [ { addressIpVersion?: string(name='AddressIpVersion'), autoAcceptEnabled?: boolean(name='AutoAcceptEnabled', description='Indicates whether endpoint connection requests are automatically accepted. Valid values: * **true**: Endpoint connection requests are automatically accepted. * **false**: Endpoint connection requests are not automatically accepted.', example='true'), connectBandwidth?: int32(name='ConnectBandwidth', description='The default maximum bandwidth of the endpoint connection. Unit: Mbit/s.', example='1024'), createTime?: string(name='CreateTime', description='The time when the endpoint service was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.', example='2021-09-24T17:15:10Z'), maxBandwidth?: int32(name='MaxBandwidth', description='The maximum bandwidth of the endpoint connection. Unit: Mbit/s.', example='1024'), minBandwidth?: int32(name='MinBandwidth', description='The minimum bandwidth of the endpoint connection. Unit: Mbit/s.', example='100'), payer?: string(name='Payer', description='The payer. Valid values: * **Endpoint**: service consumer * **EndpointService**: service provider', example='Endpoint'), regionId?: string(name='RegionId', description='The region ID of the endpoint service.', example='cn-huhehaote'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-acfmy*****'), serviceBusinessStatus?: string(name='ServiceBusinessStatus', description='The service state of the endpoint service. Valid values: * **Normal**: The endpoint service runs as expected. * **FinancialLocked**: The endpoint service is locked due to overdue payments.', example='Normal'), serviceDescription?: string(name='ServiceDescription', description='The description of the endpoint service.', example='This is my EndpointService.'), serviceDomain?: string(name='ServiceDomain', description='The domain name of the endpoint service.', example='epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****'), serviceResourceType?: string(name='ServiceResourceType', description='The type of the service resource. Valid values: * **slb**: Classic Load Balancer (CLB) instance * **alb**: Application Load Balancer (ALB) instance * **nlb**: Network Load Balancer (NLB) instance', example='slb'), serviceStatus?: string(name='ServiceStatus', description='The state of the endpoint service. Valid values: * **Creating**: The endpoint service is being created. * **Pending**: The endpoint service is being modified. * **Active**: The endpoint service is available. * **Deleting**: The endpoint service is being deleted.', example='Active'), serviceSupportIPv6?: boolean(name='ServiceSupportIPv6', description='Indicates whether the endpoint service supports IPv6. Valid values: * **true** * **false**', example='false', deprecated=true), serviceType?: string(name='ServiceType', description='The type of the endpoint service. * Only **Interface** may be returned. You can specify CLB, ALB, and NLB instances as the service resources of the endpoint service.', example='Interface'), tags?: [ { key?: string(name='Key', description='The key of the tag added to the resource.', example='FinanceDept'), value?: string(name='Value', description='The value of the tag added to the resource.', example='FinanceJoshua'), } ](name='Tags', description='The tags added to the resource.'), zoneAffinityEnabled?: boolean(name='ZoneAffinityEnabled', description='Indicates whether zone affinity is enabled. Valid values: * **true** * **false**', example='true'), } ](name='Services', description='The endpoint services.'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='12'), } model ListVpcEndpointServicesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVpcEndpointServicesResponseBody(name='body'), } /** * @summary Queries a list of endpoint services. * * @param request ListVpcEndpointServicesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListVpcEndpointServicesResponse */ async function listVpcEndpointServicesWithOptions(request: ListVpcEndpointServicesRequest, runtime: Util.RuntimeOptions): ListVpcEndpointServicesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.addressIpVersion)) { query['AddressIpVersion'] = request.addressIpVersion; } if (!Util.isUnset(request.autoAcceptEnabled)) { query['AutoAcceptEnabled'] = request.autoAcceptEnabled; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.serviceBusinessStatus)) { query['ServiceBusinessStatus'] = request.serviceBusinessStatus; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceName)) { query['ServiceName'] = request.serviceName; } if (!Util.isUnset(request.serviceResourceType)) { query['ServiceResourceType'] = request.serviceResourceType; } if (!Util.isUnset(request.serviceStatus)) { query['ServiceStatus'] = request.serviceStatus; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } if (!Util.isUnset(request.zoneAffinityEnabled)) { query['ZoneAffinityEnabled'] = request.zoneAffinityEnabled; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVpcEndpointServices', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries a list of endpoint services. * * @param request ListVpcEndpointServicesRequest * @return ListVpcEndpointServicesResponse */ async function listVpcEndpointServices(request: ListVpcEndpointServicesRequest): ListVpcEndpointServicesResponse { var runtime = new Util.RuntimeOptions{}; return listVpcEndpointServicesWithOptions(request, runtime); } model ListVpcEndpointServicesByEndUserRequest { maxResults?: int32(name='MaxResults', description='The number of entries per page. Valid values: **1** to **50**. Default value: **50**.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the value to the value of **NextToken** that is returned from the last call.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'), regionId?: string(name='RegionId', description='The region ID of the endpoint. You can call the [DescribeRegions](~~DescribeRegions~~) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmy*****'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service that you want to query.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service that you want to query.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****'), serviceType?: string(name='ServiceType', description='The type of the endpoint service. Set the value to **Interface**. You can specify CLB and ALB instances as service resources for the endpoint service.', example='Interface'), tag?: [ { key?: string(name='Key', description='The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='FinanceDept'), value?: string(name='Value', description='The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='FinanceJoshua'), } ](name='Tag', description='The list of tags.'), } model ListVpcEndpointServicesByEndUserResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries returned per page.', example='50'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values: * If no value is returned for **NextToken**, no next requests are performed. * If a value is returned for **NextToken**, the value can be used in the next request to retrieve a new page of results.', example='FFmyTO70tTpLG6I3FmYAXGKPd****'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), services?: [ { addressIpVersion?: string(name='AddressIpVersion'), payer?: string(name='Payer', description='The payer. Valid values: * **Endpoint**: the service consumer * **EndpointService**: the service provider', example='Endpoint'), resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmy*****'), serviceDomain?: string(name='ServiceDomain', description='The domain name of the endpoint service that can be associated with the endpoint.', example='epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service that can be associated with the endpoint.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service that can be associated with the endpoint.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****'), serviceResourceType?: string(name='ServiceResourceType', description='The type of the service resource. Valid values: * **slb**: Classic Load Balancer (CLB) instance * **alb**: Application Load Balancer (ALB) instance * **nlb**: Network Load Balancer (NLB) instance', example='slb'), serviceSupportIPv6?: boolean(name='ServiceSupportIPv6', description='Indicates whether IPv6 is enabled. Valid values: * **true** * **false**', example='false'), serviceType?: string(name='ServiceType', description='The type of the endpoint service. Only **Interface** is returned, which indicates an interface endpoint. You can specify **CLB** and **ALB** instances as service resources.', example='Interface'), tags?: [ { key?: string(name='Key', description='The key of the tag.', example='FinanceDept'), value?: string(name='Value', description='The value of the tag.', example='FinanceJoshua'), } ](name='Tags', description='The list of tags.'), zones?: [ string ](name='Zones', description='The zones of the endpoint service that can be associated with the endpoint.'), } ](name='Services', description='The information about endpoint services.'), totalCount?: string(name='TotalCount', description='The total number of entries returned.', example='29'), } model ListVpcEndpointServicesByEndUserResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVpcEndpointServicesByEndUserResponseBody(name='body'), } /** * @summary Queries a list of endpoint services that can be associated with the endpoint created within the current account. * * @param request ListVpcEndpointServicesByEndUserRequest * @param runtime runtime options for this request RuntimeOptions * @return ListVpcEndpointServicesByEndUserResponse */ async function listVpcEndpointServicesByEndUserWithOptions(request: ListVpcEndpointServicesByEndUserRequest, runtime: Util.RuntimeOptions): ListVpcEndpointServicesByEndUserResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceName)) { query['ServiceName'] = request.serviceName; } if (!Util.isUnset(request.serviceType)) { query['ServiceType'] = request.serviceType; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVpcEndpointServicesByEndUser', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries a list of endpoint services that can be associated with the endpoint created within the current account. * * @param request ListVpcEndpointServicesByEndUserRequest * @return ListVpcEndpointServicesByEndUserResponse */ async function listVpcEndpointServicesByEndUser(request: ListVpcEndpointServicesByEndUserRequest): ListVpcEndpointServicesByEndUserResponse { var runtime = new Util.RuntimeOptions{}; return listVpcEndpointServicesByEndUserWithOptions(request, runtime); } model ListVpcEndpointZonesRequest { endpointId?: string(name='EndpointId', description='The ID of the endpoint for which you want to query zones. After you specify an endpoint ID, the system queries the zones of the specified endpoint. This parameter is required.', example='ep-hp33b2e43fays7s8****'), maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. Valid values: **1** to **50**. Default value: **50**.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the parameter to the value of **NextToken** that is returned from the last call.', example='caeba0bbb2be03f84eb48b699f0a4883'), regionId?: string(name='RegionId', description='The region ID of the endpoint. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), } model ListVpcEndpointZonesResponseBody = { maxResults?: int32(name='MaxResults', description='The number of entries returned on each page.', example='50'), nextToken?: string(name='NextToken', description='The returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values: * If no value is returned for **NextToken**, no next requests are performed. * If a value is returned for **NextToken**, the value can be used in the next request to retrieve a new page of results.', example='caeba0bbb2be03f84eb48b699f0a4883'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='3'), zones?: [ { eniId?: string(name='EniId', description='The ID of the endpoint ENI.', example='eni-hp3c8qj1tyct8aqy****'), eniIp?: string(name='EniIp', description='The IP address of the endpoint ENI.', example='192.168.2.23'), regionId?: string(name='RegionId', description='The region ID of the endpoint.', example='cn-huhehaote'), vSwitchId?: string(name='VSwitchId', description='The ID of the vSwitch in the zone. The system automatically creates an endpoint elastic network interface (ENI) in the vSwitch.', example='vsw-hjkshjvdkdvd****'), zoneDomain?: string(name='ZoneDomain', description='The domain name of the zone. After the endpoint in the zone is connected to the endpoint service, you can access the service resources of the endpoint service by using the domain name of the zone.', example='ep-hp3f033dp24c5yc9****-cn-huhehaote.epsrv-hp3itcpowf37m3d5****.cn-huhehaote-a.privatelink.aliyuncs.com'), zoneId?: string(name='ZoneId', description='The zone ID.', example='cn-huhehaote-a'), zoneIpv6Address?: string(name='ZoneIpv6Address', description='Indicates whether the endpoint service supports IPv6. Valid values: * **true** * **false** (default)', example='false'), zoneStatus?: string(name='ZoneStatus', description='The state of the zone. Valid values: * **Creating**: The zone is being created. * **Wait**: The zone is to be connected. * **Connected**: The zone is connected. * **Deleting**: The zone is being deleted. * **Disconnecting**: The zone is being disconnected. * **Disconnected**: The zone is disconnected. * **Connecting**: The zone is being connected.', example='Wait'), } ](name='Zones', description='The information about the zones.'), } model ListVpcEndpointZonesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVpcEndpointZonesResponseBody(name='body'), } /** * @summary Queries the zones of an endpoint. * * @param request ListVpcEndpointZonesRequest * @param runtime runtime options for this request RuntimeOptions * @return ListVpcEndpointZonesResponse */ async function listVpcEndpointZonesWithOptions(request: ListVpcEndpointZonesRequest, runtime: Util.RuntimeOptions): ListVpcEndpointZonesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVpcEndpointZones', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries the zones of an endpoint. * * @param request ListVpcEndpointZonesRequest * @return ListVpcEndpointZonesResponse */ async function listVpcEndpointZones(request: ListVpcEndpointZonesRequest): ListVpcEndpointZonesResponse { var runtime = new Util.RuntimeOptions{}; return listVpcEndpointZonesWithOptions(request, runtime); } model ListVpcEndpointsRequest { addressIpVersion?: string(name='AddressIpVersion'), connectionStatus?: string(name='ConnectionStatus', description='The state of the endpoint connection. Valid values: * **Pending**: The endpoint connection is being modified. * **Connecting**: The endpoint connection is being established. * **Connected**: The endpoint connection is established. * **Disconnecting**: The endpoint is being disconnected from the endpoint service. * **Disconnected**: The endpoint is disconnected from the endpoint service. * **Deleting**: The connection is being deleted. * **ServiceDeleted**: The corresponding endpoint service has been deleted.', example='Disconnected'), endpointId?: string(name='EndpointId', description='The ID of the endpoint.', example='ep-hp33b2e43fays7s8****'), endpointName?: string(name='EndpointName', description='The name of the endpoint.', example='test'), endpointStatus?: string(name='EndpointStatus', description='The state of the endpoint. Valid values: * **Creating**: The endpoint is being created. * **Active**: The endpoint is available. * **Pending**: The endpoint is being modified. * **Deleting**: The endpoint is being deleted.', example='Active'), endpointType?: string(name='EndpointType', description='The type of the endpoint. Valid values: * **Interface**: interface endpoint * **Reverse**: reverse endpoint', example='Interface'), maxResults?: int32(name='MaxResults', description='The number of entries returned on each page.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the parameter to the value of **NextToken** that is returned from the last call.', example='caeba0bbb2be03f84eb48b699f0a4883'), regionId?: string(name='RegionId', description='The region ID of the endpoint. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-huhehaote'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='1'), serviceName?: string(name='ServiceName', description='The name of the endpoint service with which the endpoint is associated.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****'), tag?: [ { key?: string(name='Key', description='The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key must be 1 to 64 characters in length and cannot start with `aliyun` or `acs:`. It cannot contain `http://` or `https://`.', example='FinanceDept'), value?: string(name='Value', description='The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='FinanceJoshua'), } ](name='Tag', description='The list of tags.'), vpcId?: string(name='VpcId', description='The ID of the VPC to which the endpoint belongs.', example='vpc-fdjkf789dfdfdfde****'), } model ListVpcEndpointsResponseBody = { endpoints?: [ { addressIpVersion?: string(name='AddressIpVersion'), bandwidth?: long(name='Bandwidth', description='The bandwidth of the endpoint connection. Unit: Mbit/s.', example='1024'), connectionStatus?: string(name='ConnectionStatus', description='The state of the endpoint connection. Valid values: * **Pending**: The endpoint connection is being modified. * **Connecting**: The endpoint connection is being established. * **Connected**: The endpoint connection is established. * **Disconnecting**: The endpoint is being disconnected from the endpoint service. * **Disconnected**: The endpoint is disconnected from the endpoint service. * **Deleting**: The endpoint connection is being deleted. * **ServiceDeleted**: The corresponding service is deleted.', example='Disconnected'), createTime?: string(name='CreateTime', description='The time when the endpoint was created.', example='2021-09-24T18:00:07Z'), endpointBusinessStatus?: string(name='EndpointBusinessStatus', description='The service state of the endpoint. Valid values: * **Normal**: The endpoint runs as expected. * **FinancialLocked**: The endpoint is locked due to overdue payments.', example='Normal'), endpointDescription?: string(name='EndpointDescription', description='The description of the endpoint.', example='This is my Endpoint.'), endpointDomain?: string(name='EndpointDomain', description='The domain name of the endpoint.', example='ep-hp33b2e43fays7s8****.epsrv-hp3xdsq46ael67lo****.cn-huhehaote.privatelink.aliyuncs.com'), endpointId?: string(name='EndpointId', description='The ID of the endpoint.', example='ep-hp33b2e43fays7s8****'), endpointName?: string(name='EndpointName', description='The name of the endpoint.', example='test'), endpointStatus?: string(name='EndpointStatus', description='The state of the endpoint. Valid values: * **Creating**: The endpoint is being created. * **Active**: The endpoint is available. * **Pending**: The endpoint is being modified. * **Deleting**: The endpoint is being deleted.', example='Active'), endpointType?: string(name='EndpointType', description='The type of the endpoint. Valid values: * **Interface**: interface endpoint * **Reverse**: reverse endpoint', example='Interface'), policyDocument?: string(name='PolicyDocument', description='The Resource Access Management (RAM) policy. For more information about policy definitions, see [Policy elements](https://help.aliyun.com/document_detail/93738.html).', example='{\\\\n \\\\"Version\\\\": \\\\"1\\\\",\\\\n \\\\"Statement\\\\": [\\\\n {\\\\n \\\\"Effect\\\\": \\\\"Allow\\\\",\\\\n \\\\"Action\\\\": \\\\"*\\\\",\\\\n \\\\"Principal\\\\": \\\\"*\\\\",\\\\n \\\\"Resource\\\\": \\\\"*\\\\"\\\\n }\\\\n ]\\\\n}'), regionId?: string(name='RegionId', description='The region ID of the endpoint.', example='cn-huhehaote'), resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='1'), resourceOwner?: boolean(name='ResourceOwner', description='Indicates whether the endpoint and the endpoint service belong to the same Alibaba Cloud account. Valid values: * **true** * **false**', example='true'), serviceId?: string(name='ServiceId', description='The ID of the endpoint service that is associated with the endpoint.', example='epsrv-hp3vpx8yqxblby3i****'), serviceName?: string(name='ServiceName', description='The name of the endpoint service that is associated with the endpoint.', example='com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3xdsq46ael67lo****'), tags?: [ { key?: string(name='Key', description='The key of the tag added to the resource.', example='FinanceDept'), value?: string(name='Value', description='The value of the tag added to the resource.', example='FinanceJoshua'), } ](name='Tags', description='The tags added to the resource.'), vpcId?: string(name='VpcId', description='The ID of the virtual private cloud (VPC) to which the endpoint belongs.', example='vpc-hp356stwkxg3fn2xe****'), zoneAffinityEnabled?: boolean(name='ZoneAffinityEnabled', description='Indicates whether the domain name of the nearest endpoint that is associated with the endpoint service is resolved first. Valid values: * **true** * **false**', example='true'), } ](name='Endpoints', description='The information about the endpoints.'), maxResults?: int32(name='MaxResults', description='The number of entries returned on each page.', example='50'), nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values: * If this is your first request and no next requests are to be performed, you do not need to specify this parameter. * If a next request is to be performed, set the parameter to the value of **NextToken** that is returned from the last call.', example='caeba0bbb2be03f84eb48b699f0a****'), requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='12'), } model ListVpcEndpointsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListVpcEndpointsResponseBody(name='body'), } /** * @summary Queries a list of endpoints. * * @param request ListVpcEndpointsRequest * @param runtime runtime options for this request RuntimeOptions * @return ListVpcEndpointsResponse */ async function listVpcEndpointsWithOptions(request: ListVpcEndpointsRequest, runtime: Util.RuntimeOptions): ListVpcEndpointsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.addressIpVersion)) { query['AddressIpVersion'] = request.addressIpVersion; } if (!Util.isUnset(request.connectionStatus)) { query['ConnectionStatus'] = request.connectionStatus; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.endpointName)) { query['EndpointName'] = request.endpointName; } if (!Util.isUnset(request.endpointStatus)) { query['EndpointStatus'] = request.endpointStatus; } if (!Util.isUnset(request.endpointType)) { query['EndpointType'] = request.endpointType; } if (!Util.isUnset(request.maxResults)) { query['MaxResults'] = request.maxResults; } if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.serviceName)) { query['ServiceName'] = request.serviceName; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } if (!Util.isUnset(request.vpcId)) { query['VpcId'] = request.vpcId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListVpcEndpoints', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Queries a list of endpoints. * * @param request ListVpcEndpointsRequest * @return ListVpcEndpointsResponse */ async function listVpcEndpoints(request: ListVpcEndpointsRequest): ListVpcEndpointsResponse { var runtime = new Util.RuntimeOptions{}; return listVpcEndpointsWithOptions(request, runtime); } model OpenPrivateLinkServiceRequest { ownerId?: long(name='OwnerId'), } model OpenPrivateLinkServiceResponseBody = { orderId?: string(name='OrderId', description='The order ID.', example='3245****'), requestId?: string(name='RequestId', description='The request ID.', example='427688B8-ADFB-4C4E-9D45-EF5C1FD6E23D'), } model OpenPrivateLinkServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: OpenPrivateLinkServiceResponseBody(name='body'), } /** * @summary Activates PrivateLink. * * @param request OpenPrivateLinkServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return OpenPrivateLinkServiceResponse */ async function openPrivateLinkServiceWithOptions(request: OpenPrivateLinkServiceRequest, runtime: Util.RuntimeOptions): OpenPrivateLinkServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.ownerId)) { query['OwnerId'] = request.ownerId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'OpenPrivateLinkService', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Activates PrivateLink. * * @param request OpenPrivateLinkServiceRequest * @return OpenPrivateLinkServiceResponse */ async function openPrivateLinkService(request: OpenPrivateLinkServiceRequest): OpenPrivateLinkServiceResponse { var runtime = new Util.RuntimeOptions{}; return openPrivateLinkServiceWithOptions(request, runtime); } model RemoveUserFromVpcEndpointServiceRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the AccessKey pair, the permissions of the RAM user, and the required parameters. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), regionId?: string(name='RegionId', description='The region ID of the endpoint service for which you want to remove the account ID from the whitelist. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), userARN?: string(name='UserARN', description='The whitelist in the format of Aliyun Resource Name (ARN).', example='acs:ram:*:<account-id>:*'), userId?: long(name='UserId', description='The account ID that you want to remove from the whitelist.', example='12345678'), } model RemoveUserFromVpcEndpointServiceResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model RemoveUserFromVpcEndpointServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RemoveUserFromVpcEndpointServiceResponseBody(name='body'), } /** * @summary Removes an account ID from the whitelist of an endpoint service. * * @description * Before you remove an account ID from the whitelist of an endpoint service, make sure that the endpoint service is in the **Active** state. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to query the status of the endpoint service. * * You cannot repeatedly call the **RemoveUserFromVpcEndpointService** operation to remove the ID of an Alibaba Cloud account from the whitelist of an endpoint service within a specified period of time. * * @param request RemoveUserFromVpcEndpointServiceRequest * @param runtime runtime options for this request RuntimeOptions * @return RemoveUserFromVpcEndpointServiceResponse */ async function removeUserFromVpcEndpointServiceWithOptions(request: RemoveUserFromVpcEndpointServiceRequest, runtime: Util.RuntimeOptions): RemoveUserFromVpcEndpointServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.userARN)) { query['UserARN'] = request.userARN; } if (!Util.isUnset(request.userId)) { query['UserId'] = request.userId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RemoveUserFromVpcEndpointService', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Removes an account ID from the whitelist of an endpoint service. * * @description * Before you remove an account ID from the whitelist of an endpoint service, make sure that the endpoint service is in the **Active** state. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to query the status of the endpoint service. * * You cannot repeatedly call the **RemoveUserFromVpcEndpointService** operation to remove the ID of an Alibaba Cloud account from the whitelist of an endpoint service within a specified period of time. * * @param request RemoveUserFromVpcEndpointServiceRequest * @return RemoveUserFromVpcEndpointServiceResponse */ async function removeUserFromVpcEndpointService(request: RemoveUserFromVpcEndpointServiceRequest): RemoveUserFromVpcEndpointServiceResponse { var runtime = new Util.RuntimeOptions{}; return removeUserFromVpcEndpointServiceWithOptions(request, runtime); } model RemoveZoneFromVpcEndpointRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The ID of the endpoint for which you want to delete the zone. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The region ID of the endpoint for which you want to delete the zone. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), zoneId?: string(name='ZoneId', description='The ID of the zone that you want to delete. This parameter is required.', example='eu-west-1a'), } model RemoveZoneFromVpcEndpointResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), } model RemoveZoneFromVpcEndpointResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RemoveZoneFromVpcEndpointResponseBody(name='body'), } /** * @summary Deletes a zone of an endpoint. * * @description * **RemoveZoneFromVpcEndpoint** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpointZones](https://help.aliyun.com/document_detail/183560.html) operation to check whether the zone of the endpoint is deleted. * * If the zone of the endpoint is in the **Deleting** state, the zone is being deleted. * * If the zone cannot be queried, the zone is deleted. * * You cannot repeatedly call the **RemoveZoneFromVpcEndpoint** operation to delete a zone of an endpoint within a specified period of time. * * @param request RemoveZoneFromVpcEndpointRequest * @param runtime runtime options for this request RuntimeOptions * @return RemoveZoneFromVpcEndpointResponse */ async function removeZoneFromVpcEndpointWithOptions(request: RemoveZoneFromVpcEndpointRequest, runtime: Util.RuntimeOptions): RemoveZoneFromVpcEndpointResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.zoneId)) { query['ZoneId'] = request.zoneId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RemoveZoneFromVpcEndpoint', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Deletes a zone of an endpoint. * * @description * **RemoveZoneFromVpcEndpoint** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [ListVpcEndpointZones](https://help.aliyun.com/document_detail/183560.html) operation to check whether the zone of the endpoint is deleted. * * If the zone of the endpoint is in the **Deleting** state, the zone is being deleted. * * If the zone cannot be queried, the zone is deleted. * * You cannot repeatedly call the **RemoveZoneFromVpcEndpoint** operation to delete a zone of an endpoint within a specified period of time. * * @param request RemoveZoneFromVpcEndpointRequest * @return RemoveZoneFromVpcEndpointResponse */ async function removeZoneFromVpcEndpoint(request: RemoveZoneFromVpcEndpointRequest): RemoveZoneFromVpcEndpointResponse { var runtime = new Util.RuntimeOptions{}; return removeZoneFromVpcEndpointWithOptions(request, runtime); } model TagResourcesRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. > If you do not specify this parameter, the system automatically uses the request ID as the client token.******** The request ID may be different for each request.', example='123e4567-e89b-12d3-a456-426655440000'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), regionId?: string(name='RegionId', description='The region ID of the PrivateLink instance. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId', description='The resource IDs. Up to 50 resource IDs are supported. This parameter is required.'), resourceType?: string(name='ResourceType', description='The type of resource. Valid values: * **vpcendpoint**: endpoint * **vpcendpointservice**: endpoint service This parameter is required.', example='1'), tag?: [ { key?: string(name='Key', description='The key of tag N to add to the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `aliyun` or `acs:`. This parameter is required.', example='FinanceDept'), value?: string(name='Value', description='The value of tag N to add to the resource. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `acs:` or `aliyun`. This parameter is required.', example='FinanceJoshua'), } ](name='Tag', description='The tags to add to the resources. This parameter is required.'), } model TagResourcesResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='C46FF5A8-C5F0-4024-8262-B16B639225A0'), } model TagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: TagResourcesResponseBody(name='body'), } /** * @summary Adds tags to resources. You can call this API operation to add tags to one or more endpoints or endpoint services. * * @description > You can add up to 20 tags to an instance. Before you add tags to a resource, Alibaba Cloud checks the number of existing tags of the resource. If the maximum number is reached, an error message is returned. * * @param request TagResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return TagResourcesResponse */ async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse { Util.validateModel(request); var body : map[string]any = {}; if (!Util.isUnset(request.clientToken)) { body['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { body['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { body['RegionId'] = request.regionId; } var bodyFlat : map[string]any = {}; if (!Util.isUnset(request.resourceId)) { bodyFlat['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { body['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.tag)) { bodyFlat['Tag'] = request.tag; } body = { ...body, ...OpenApiUtil.query(bodyFlat), }; var req = new OpenApi.OpenApiRequest{ body = OpenApiUtil.parseToMap(body), }; var params = new OpenApi.Params{ action = 'TagResources', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Adds tags to resources. You can call this API operation to add tags to one or more endpoints or endpoint services. * * @description > You can add up to 20 tags to an instance. Before you add tags to a resource, Alibaba Cloud checks the number of existing tags of the resource. If the maximum number is reached, an error message is returned. * * @param request TagResourcesRequest * @return TagResourcesResponse */ async function tagResources(request: TagResourcesRequest): TagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return tagResourcesWithOptions(request, runtime); } model UntagResourcesRequest { all?: boolean(name='All', description='Specifies whether to remove all tags from the resource. Valid values: * **true** * **false** > If you specify both the All and TagKey.N parameters, the All parameter does not take effect.', example='true'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters. > If you do not specify this parameter, the system automatically uses the request ID as the client token.******** The request ID may be different for each request.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a `2xx HTTP` status code is returned and the operation is performed.', example='false'), regionId?: string(name='RegionId', description='The region ID of the PrivateLink instance. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId', description='The resource IDs. You can specify up to 50 resource IDs. This parameter is required.'), resourceType?: string(name='ResourceType', description='The resource type. Valid values: * **vpcendpoint**: endpoint * **vpcendpointservice**: endpoint service This parameter is required.', example='slb'), tagKey?: [ string ](name='TagKey', description='The keys of the tags that you want to remove from the resources. You can specify up to 20 tag keys.'), } model UntagResourcesResponseBody = { requestId?: string(name='RequestId', description='The ID of the request.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model UntagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UntagResourcesResponseBody(name='body'), } /** * @summary Removes tags from one or more endpoints or endpoint services at a time. * * @param request UntagResourcesRequest * @param runtime runtime options for this request RuntimeOptions * @return UntagResourcesResponse */ async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse { Util.validateModel(request); var body : map[string]any = {}; if (!Util.isUnset(request.all)) { body['All'] = request.all; } if (!Util.isUnset(request.clientToken)) { body['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { body['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { body['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { body['RegionId'] = request.regionId; } var bodyFlat : map[string]any = {}; if (!Util.isUnset(request.resourceId)) { bodyFlat['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceType)) { body['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.tagKey)) { bodyFlat['TagKey'] = request.tagKey; } body = { ...body, ...OpenApiUtil.query(bodyFlat), }; var req = new OpenApi.OpenApiRequest{ body = OpenApiUtil.parseToMap(body), }; var params = new OpenApi.Params{ action = 'UntagResources', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Removes tags from one or more endpoints or endpoint services at a time. * * @param request UntagResourcesRequest * @return UntagResourcesResponse */ async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return untagResourcesWithOptions(request, runtime); } model UpdateVpcEndpointAttributeRequest { addressIpVersion?: string(name='AddressIpVersion'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='true'), endpointDescription?: string(name='EndpointDescription', description='The description of the endpoint. The description must be 2 to 256 characters in length. It cannot start with `http://` or `https://`.', example='This is my Endpoint.'), endpointId?: string(name='EndpointId', description='The endpoint ID whose attributes you want to modify. This parameter is required.', example='ep-hp33b2e43fays7s8****'), endpointName?: string(name='EndpointName', description='The name of the endpoint. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.', example='test'), policyDocument?: string(name='PolicyDocument', example='{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "oss:List*", "oss:PutObject", "oss:GetObject" ], "Resource": [ "acs:oss:oss-*:*:pvl-policy-test/policy-test.txt" ], "Principal": { "RAM": [ "acs:ram::14199xxxxxx:*" ] } } ] }'), regionId?: string(name='RegionId', description='The region ID of the endpoint whose attributes you want to modify. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), } model UpdateVpcEndpointAttributeResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model UpdateVpcEndpointAttributeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateVpcEndpointAttributeResponseBody(name='body'), } /** * @summary Modifies the attributes of an endpoint. * * @description You cannot repeatedly call the **UpdateVpcEndpointAttribute** operation to modify the attributes of an endpoint that belongs to an Alibaba Cloud account within a specified period of time. * * @param request UpdateVpcEndpointAttributeRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateVpcEndpointAttributeResponse */ async function updateVpcEndpointAttributeWithOptions(request: UpdateVpcEndpointAttributeRequest, runtime: Util.RuntimeOptions): UpdateVpcEndpointAttributeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.addressIpVersion)) { query['AddressIpVersion'] = request.addressIpVersion; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointDescription)) { query['EndpointDescription'] = request.endpointDescription; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.endpointName)) { query['EndpointName'] = request.endpointName; } if (!Util.isUnset(request.policyDocument)) { query['PolicyDocument'] = request.policyDocument; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateVpcEndpointAttribute', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Modifies the attributes of an endpoint. * * @description You cannot repeatedly call the **UpdateVpcEndpointAttribute** operation to modify the attributes of an endpoint that belongs to an Alibaba Cloud account within a specified period of time. * * @param request UpdateVpcEndpointAttributeRequest * @return UpdateVpcEndpointAttributeResponse */ async function updateVpcEndpointAttribute(request: UpdateVpcEndpointAttributeRequest): UpdateVpcEndpointAttributeResponse { var runtime = new Util.RuntimeOptions{}; return updateVpcEndpointAttributeWithOptions(request, runtime); } model UpdateVpcEndpointConnectionAttributeRequest { bandwidth?: int32(name='Bandwidth', description='The bandwidth of the endpoint connection that you want to modify. Unit: Mbit/s. Valid values: **3072** to **10240**. > The bandwidth of an endpoint connection is in the range of **100** to **10,240** Mbit/s. The default bandwidth is **3,072** Mbit/s. When the endpoint is connected to the endpoint service, the default bandwidth is the minimum bandwidth. In this case, the connection bandwidth range is **3,072** to **10,240** Mbit/s. If Classic Load Balancer (CLB) instances or Application Load Balancer (ALB) instances are specified as service resources, you can modify the endpoint connection bandwidth based on your business requirements. This parameter is invalid if Network Load Balancer (NLB) instances are specified as service resources.', example='1000'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The endpoint ID. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The region ID of the endpoint connection whose bandwidth you want to modify. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='eu-west-1'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), } model UpdateVpcEndpointConnectionAttributeResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model UpdateVpcEndpointConnectionAttributeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateVpcEndpointConnectionAttributeResponseBody(name='body'), } /** * @summary Modifies the attributes of an endpoint connection. * * @description You cannot repeatedly call the **UpdateVpcEndpointConnectionAttribute** operation to modify the bandwidth of an endpoint connection that belongs to an Alibaba Cloud account within a specified period of time. * * @param request UpdateVpcEndpointConnectionAttributeRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateVpcEndpointConnectionAttributeResponse */ async function updateVpcEndpointConnectionAttributeWithOptions(request: UpdateVpcEndpointConnectionAttributeRequest, runtime: Util.RuntimeOptions): UpdateVpcEndpointConnectionAttributeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bandwidth)) { query['Bandwidth'] = request.bandwidth; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateVpcEndpointConnectionAttribute', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Modifies the attributes of an endpoint connection. * * @description You cannot repeatedly call the **UpdateVpcEndpointConnectionAttribute** operation to modify the bandwidth of an endpoint connection that belongs to an Alibaba Cloud account within a specified period of time. * * @param request UpdateVpcEndpointConnectionAttributeRequest * @return UpdateVpcEndpointConnectionAttributeResponse */ async function updateVpcEndpointConnectionAttribute(request: UpdateVpcEndpointConnectionAttributeRequest): UpdateVpcEndpointConnectionAttributeResponse { var runtime = new Util.RuntimeOptions{}; return updateVpcEndpointConnectionAttributeWithOptions(request, runtime); } model UpdateVpcEndpointServiceAttributeRequest { addressIpVersion?: string(name='AddressIpVersion'), autoAcceptEnabled?: boolean(name='AutoAcceptEnabled', description='Specifies whether to automatically accept endpoint connection requests. Valid values: * **true** * **false**', example='false'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), connectBandwidth?: int32(name='ConnectBandwidth', description='The default maximum bandwidth of the endpoint connection. Unit: Mbit/s. Default value: **3072**. Valid values: **100** to **10240**. > You can specify this parameter only if you specify Classic Load Balancer (CLB) instances or Application Load Balancer (ALB) instances as service resources.', example='200'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), regionId?: string(name='RegionId', description='The region ID of the endpoint service. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), serviceDescription?: string(name='ServiceDescription', description='The description of the endpoint service.', example='This is my EndpointService.'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), serviceSupportIPv6?: boolean(name='ServiceSupportIPv6', description='Specifies whether to enable IPv6. Valid values: * **true** * **false** (default)', example='false', deprecated=true), zoneAffinityEnabled?: boolean(name='ZoneAffinityEnabled', description='Specifies whether to first resolve the domain name of the nearest endpoint that is associated with the endpoint service. Valid values: * **true** (default) * **false**', example='true'), } model UpdateVpcEndpointServiceAttributeResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='8D8992C1-6712-423C-BAC5-E5E817484C6B'), } model UpdateVpcEndpointServiceAttributeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateVpcEndpointServiceAttributeResponseBody(name='body'), } /** * @summary Modifies the attributes of an endpoint service. * * @description You cannot repeatedly call the **UpdateVpcEndpointServiceAttribute** operation to modify the attributes of an endpoint service that belongs to an Alibaba Cloud account within a specified period of time. * * @param request UpdateVpcEndpointServiceAttributeRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateVpcEndpointServiceAttributeResponse */ async function updateVpcEndpointServiceAttributeWithOptions(request: UpdateVpcEndpointServiceAttributeRequest, runtime: Util.RuntimeOptions): UpdateVpcEndpointServiceAttributeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.addressIpVersion)) { query['AddressIpVersion'] = request.addressIpVersion; } if (!Util.isUnset(request.autoAcceptEnabled)) { query['AutoAcceptEnabled'] = request.autoAcceptEnabled; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.connectBandwidth)) { query['ConnectBandwidth'] = request.connectBandwidth; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.serviceDescription)) { query['ServiceDescription'] = request.serviceDescription; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.serviceSupportIPv6)) { query['ServiceSupportIPv6'] = request.serviceSupportIPv6; } if (!Util.isUnset(request.zoneAffinityEnabled)) { query['ZoneAffinityEnabled'] = request.zoneAffinityEnabled; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateVpcEndpointServiceAttribute', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Modifies the attributes of an endpoint service. * * @description You cannot repeatedly call the **UpdateVpcEndpointServiceAttribute** operation to modify the attributes of an endpoint service that belongs to an Alibaba Cloud account within a specified period of time. * * @param request UpdateVpcEndpointServiceAttributeRequest * @return UpdateVpcEndpointServiceAttributeResponse */ async function updateVpcEndpointServiceAttribute(request: UpdateVpcEndpointServiceAttributeRequest): UpdateVpcEndpointServiceAttributeResponse { var runtime = new Util.RuntimeOptions{}; return updateVpcEndpointServiceAttributeWithOptions(request, runtime); } model UpdateVpcEndpointServiceResourceAttributeRequest { autoAllocatedEnabled?: boolean(name='AutoAllocatedEnabled', description='Specifies whether to enable automatic resource allocation. Valid values: * **true** * **false** This parameter is required.', example='true'), clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform a dry run. Valid values: * **true**: performs a dry run. The system checks the required parameters, request syntax, and limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false**: performs a dry run and sends the request. If the request passes the dry run, an HTTP 2xx status code is returned and the operation is performed. This is the default value.', example='false'), regionId?: string(name='RegionId', description='The ID of the region where the service resource is deployed. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), resourceId?: string(name='ResourceId', description='The service resource ID. This parameter is required.', example='lb-hp32z1wp5peaoox2q****'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), zoneId?: string(name='ZoneId', description='The zone ID of the service resource.', example='cn-hangzhou-i'), } model UpdateVpcEndpointServiceResourceAttributeResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model UpdateVpcEndpointServiceResourceAttributeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateVpcEndpointServiceResourceAttributeResponseBody(name='body'), } /** * @summary Modifies the attributes of a service resource that is added to an endpoint service. * * @description You cannot repeatedly call the **UpdateVpcEndpointServiceResourceAttribute** operation to modify the attributes of a service resource that is added to an endpoint service within a specified period of time. * * @param request UpdateVpcEndpointServiceResourceAttributeRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateVpcEndpointServiceResourceAttributeResponse */ async function updateVpcEndpointServiceResourceAttributeWithOptions(request: UpdateVpcEndpointServiceResourceAttributeRequest, runtime: Util.RuntimeOptions): UpdateVpcEndpointServiceResourceAttributeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.autoAllocatedEnabled)) { query['AutoAllocatedEnabled'] = request.autoAllocatedEnabled; } if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.zoneId)) { query['ZoneId'] = request.zoneId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateVpcEndpointServiceResourceAttribute', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Modifies the attributes of a service resource that is added to an endpoint service. * * @description You cannot repeatedly call the **UpdateVpcEndpointServiceResourceAttribute** operation to modify the attributes of a service resource that is added to an endpoint service within a specified period of time. * * @param request UpdateVpcEndpointServiceResourceAttributeRequest * @return UpdateVpcEndpointServiceResourceAttributeResponse */ async function updateVpcEndpointServiceResourceAttribute(request: UpdateVpcEndpointServiceResourceAttributeRequest): UpdateVpcEndpointServiceResourceAttributeResponse { var runtime = new Util.RuntimeOptions{}; return updateVpcEndpointServiceResourceAttributeWithOptions(request, runtime); } model UpdateVpcEndpointZoneConnectionResourceAttributeRequest { clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.', example='0c593ea1-3bea-11e9-b96b-88e9fe637760'), dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values: * **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'), endpointId?: string(name='EndpointId', description='The endpoint ID. This parameter is required.', example='ep-hp33b2e43fays7s8****'), regionId?: string(name='RegionId', description='The region ID of the endpoint connection whose bandwidth you want to modify. You can call the [DescribeRegions](https://help.aliyun.com/document_detail/120468.html) operation to query the most recent region list. This parameter is required.', example='cn-hangzhou'), resourceAllocateMode?: string(name='ResourceAllocateMode', description='The resource allocation mode. You can change the resource allocation mode only if the endpoint connection is in the **Disconnected** state. Valid values: * **Auto**: automatically and randomly allocates service resources. In this mode, the specified service resource is deleted. * **Manual**: manually allocates service resources. If you set the value to Manual, you must also specify the **ResourceId** and **ResourceType** parameters.', example='Auto'), resourceId?: string(name='ResourceId', description='The ID of the service resource that you want to manually allocate or migrate in the zone where the endpoint connection is deployed. > If **ResourceAllocateMode** is set to **Mannual**, or **ResourceReplaceMode** is set, this parameter is required.', example='lb-hp32z1wp5peaoox2q****'), resourceReplaceMode?: string(name='ResourceReplaceMode', description='The migration mode of the service resource. Valid values: * **Graceful**: smooth migration. Service resources in the zone are smoothly migrated. * **Force**: forced migration. Service resources in the zone are forcefully migrated. > You need to specify this parameter only if you want to migrate service resources and the endpoint connection is in the **Connected** state. If you specify this parameter, you must also specify the **ResourceId** and **ResourceType** parameters.', example='Graceful'), resourceType?: string(name='ResourceType', description='The type of the service resource. Valid values: * **slb**: a CLB instance that supports PrivateLink. In addition, the CLB instance is deployed in a VPC. * **alb**: an Application Load Balancer (ALB) instance that supports PrivateLink. In addition, the ALB instance is deployed in a VPC. > If **ResourceAllocateMode** is set to **Mannual**, or **ResourceReplaceMode** is set, this parameter is required.', example='slb'), serviceId?: string(name='ServiceId', description='The endpoint service ID. This parameter is required.', example='epsrv-hp3vpx8yqxblby3i****'), zoneId?: string(name='ZoneId', description='The zone ID. This parameter is required.', example='cn-hangzhou-b'), } model UpdateVpcEndpointZoneConnectionResourceAttributeResponseBody = { requestId?: string(name='RequestId', description='The request ID.', example='0ED8D006-F706-4D23-88ED-E11ED28DCAC0'), } model UpdateVpcEndpointZoneConnectionResourceAttributeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateVpcEndpointZoneConnectionResourceAttributeResponseBody(name='body'), } /** * @summary Modifies a service resource of a zone to which an endpoint connection belongs. * * @description ### Prerequisites * By default, the feature of modifying a service resource of a zone to which an endpoint connection belongs is unavailable. To use this feature, log on to the [Quota Center console](https://quotas.console.aliyun.com/white-list-products/privatelink/quotas). Click Whitelist Quotas in the left-side navigation pane and click PrivateLink in the Networking section. On the page that appears, search for `privatelink_whitelist/svc_res_mgt_uat` and click Apply in the Actions column. * ### Usage notes * * If the endpoint connection is in the **Disconnected** state, you can manually allocate the service resource in the zone. * * If the endpoint connection is in the **Connected** state, you can manually migrate the service resource in the zone. In this case, the connection might be interrupted. * * **UpdateVpcEndpointZoneConnectionResourceAttribute** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to check whether the service resource is modified. * * If the endpoint service is in the **Pending** state, the service resource is being modified. * * If the endpoint service is in the **Active** state, the service resource is modified. * * You cannot repeatedly call the **UpdateVpcEndpointZoneConnectionResourceAttribute** operation to modify a service resource in the zone to which an endpoint connection belongs within a specified period of time. * * @param request UpdateVpcEndpointZoneConnectionResourceAttributeRequest * @param runtime runtime options for this request RuntimeOptions * @return UpdateVpcEndpointZoneConnectionResourceAttributeResponse */ async function updateVpcEndpointZoneConnectionResourceAttributeWithOptions(request: UpdateVpcEndpointZoneConnectionResourceAttributeRequest, runtime: Util.RuntimeOptions): UpdateVpcEndpointZoneConnectionResourceAttributeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientToken)) { query['ClientToken'] = request.clientToken; } if (!Util.isUnset(request.dryRun)) { query['DryRun'] = request.dryRun; } if (!Util.isUnset(request.endpointId)) { query['EndpointId'] = request.endpointId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceAllocateMode)) { query['ResourceAllocateMode'] = request.resourceAllocateMode; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceReplaceMode)) { query['ResourceReplaceMode'] = request.resourceReplaceMode; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.serviceId)) { query['ServiceId'] = request.serviceId; } if (!Util.isUnset(request.zoneId)) { query['ZoneId'] = request.zoneId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateVpcEndpointZoneConnectionResourceAttribute', version = '2020-04-15', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) { return callApi(params, req, runtime); } else { return execute(params, req, runtime); } } /** * @summary Modifies a service resource of a zone to which an endpoint connection belongs. * * @description ### Prerequisites * By default, the feature of modifying a service resource of a zone to which an endpoint connection belongs is unavailable. To use this feature, log on to the [Quota Center console](https://quotas.console.aliyun.com/white-list-products/privatelink/quotas). Click Whitelist Quotas in the left-side navigation pane and click PrivateLink in the Networking section. On the page that appears, search for `privatelink_whitelist/svc_res_mgt_uat` and click Apply in the Actions column. * ### Usage notes * * If the endpoint connection is in the **Disconnected** state, you can manually allocate the service resource in the zone. * * If the endpoint connection is in the **Connected** state, you can manually migrate the service resource in the zone. In this case, the connection might be interrupted. * * **UpdateVpcEndpointZoneConnectionResourceAttribute** is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the [GetVpcEndpointServiceAttribute](https://help.aliyun.com/document_detail/469330.html) operation to check whether the service resource is modified. * * If the endpoint service is in the **Pending** state, the service resource is being modified. * * If the endpoint service is in the **Active** state, the service resource is modified. * * You cannot repeatedly call the **UpdateVpcEndpointZoneConnectionResourceAttribute** operation to modify a service resource in the zone to which an endpoint connection belongs within a specified period of time. * * @param request UpdateVpcEndpointZoneConnectionResourceAttributeRequest * @return UpdateVpcEndpointZoneConnectionResourceAttributeResponse */ async function updateVpcEndpointZoneConnectionResourceAttribute(request: UpdateVpcEndpointZoneConnectionResourceAttributeRequest): UpdateVpcEndpointZoneConnectionResourceAttributeResponse { var runtime = new Util.RuntimeOptions{}; return updateVpcEndpointZoneConnectionResourceAttributeWithOptions(request, runtime); }