CreateInstance

更新时间:
复制 MD 格式

Creates a subscription or pay-as-you-go fully managed Flink workspace.

Operation description

Before you call this operation, ensure you understand the billing methods and pricing of fully managed Flink.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

stream:CreateVvpInstance

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceName

string

Yes

The name of the workspace. The name must start with a lowercase letter, can contain lowercase letters, digits, and hyphens (-), and cannot end with a hyphen.

rtc-e2e-test-pre

ChargeType

string

Yes

The billing method. Valid values:

  • POST: pay-as-you-go

  • PRE: subscription

PRE

Region

string

Yes

The region.

cn-beijing

VpcId

string

Yes

The ID of the Virtual Private Cloud (VPC).

vpc-2ze9xoh8qyt1rnxfmfcdi

VSwitchIds

array

Yes

The IDs of the vSwitches.

string

Yes

A vSwitch ID.

vsw-m5esz02px6qxiu28x7c2i

ResourceSpec

object

No

The resource specifications.

Note

This parameter is required when you set ChargeType to PRE.

Cpu

integer

No

The number of CPUs.

Note
  • The number of CPUs for the project must be less than the number of available CPUs in the workspace. The number of available CPUs is the total number of purchased CPUs minus the number of CPUs that are allocated to other projects. Otherwise, an error occurs.

30

MemoryGB

integer

No

The memory size in GB.

Note

The memory size must be four times the number of CPUs.

120

PricingCycle

string

No

The billing cycle of the subscription instance. Valid values:

  • year

  • month

Note

This parameter is required if you set ChargeType to PRE.

Month

Duration

integer

No

The subscription duration.

Note

This parameter is required when you set ChargeType to PRE.

1

AutoRenew

boolean

No

Specifies whether to enable auto-renewal. Valid values:

  • true: Auto-renewal is enabled.

  • false: Auto-renewal is disabled. This is the default value.

Note

This parameter does not take effect for pay-as-you-go instances.

true

Storage

object

Yes

The storage parameters.

Oss

object

No

The Object Storage Service (OSS) storage.

Bucket

string

No

The name of the OSS bucket to attach.

oss-flink-cn-shanghai-260343971602724445

FullyManaged

boolean

No

Specifies whether to use fully managed storage. You can use either fully managed storage or an OSS bucket.

  • true: Use fully managed storage.

  • false: Do not use fully managed storage.

false

UsePromotionCode

boolean

No

Specifies whether to use a coupon. Valid values:

  • true: Use a coupon.

  • false: Do not use a coupon.

true

PromotionCode

string

No

The coupon code.

500043499350689

ResourceGroupId

string

No

The resource group ID.

rg-acfmxbavps3rpiy

Extra

string

No

The extended field.

“”

ArchitectureType

string

No

The processor architecture.

Valid values:

  • X86 :

    X86

  • ARM :

    ARM

X86

Ha

boolean

No

Specifies whether to enable high availability (HA) within the same city.

true

HaVSwitchIds

array

No

The vSwitch IDs for the secondary zone of the HA configuration.

string

No

The vSwitch IDs for the secondary zone of the HA configuration.

[\"vsw-2ze78bg1iewkwk25dylxi\"]

HaResourceSpec

object

No

The resource specifications for the HA configuration.

Cpu

integer

No

The number of CPUs for the HA configuration.

10

MemoryGB

integer

No

The memory size for the HA configuration.

40

MonitorType

string

No

The type of the alert service. You can select ARMS or Cloud Monitor.

Valid values:

  • TAIHAO :

    TAIHAO

  • ARMS :

    ARMS

TAIHAO

Tag

array<object>

No

The list of tags. You can add up to 20 tags.

object

No

A tag.

Value

string

No

The tag value.

tag

Key

string

No

The tag key.

test

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

67F33190-946B-1105-B6A1-E2DF0426DD51

Success

boolean

Indicates whether the request was successful.

true

OrderInfo

object

The order information.

OrderId

integer

The order ID.

210406354694567

InstanceId

string

The instance ID of the order.

f-cn-zvp2q0zik06

StorageOrderId

integer

The storage order ID.

240353501970749

StorageInstanceId

string

The storage instance ID.

sc_flinkstorage_public_cn-w*****

Examples

Success response

JSON format

{
  "RequestId": "67F33190-946B-1105-B6A1-E2DF0426DD51",
  "Success": true,
  "OrderInfo": {
    "OrderId": 210406354694567,
    "InstanceId": "f-cn-zvp2q0zik06",
    "StorageOrderId": 240353501970749,
    "StorageInstanceId": "sc_flinkstorage_public_cn-w*****\n"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.