为项目创建 Atlas Stream Processing 实例
要快速开始,请指定名称、云提供商和地区来配置Atlas Stream Processing实例。要使用此命令,您必须使用具有项目所有者角色的用户帐户、服务帐户或API密钥进行身份验证。
语法
atlas streams instances create <name> [options]
参数
名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
名称 | 字符串 | true | Atlas Stream Processing 实例的名称。 创建后,您无法更改实例的名称。 名称可以包含 ASCII 字母、数字和连字符。 |
选项
名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
-h,--help | false | 创建帮助 | |
-o, --output | 字符串 | false | 输出格式。 有效值为 json、json-path、go-template 或 go-template-file。 要查看完整输出,请使用 -o json 选项。 |
--projectId | 字符串 | false | 标识要使用的项目的十六进制字符串。 此选项会覆盖配置文件或环境变量中的设置。 |
--provider | 字符串 | true | 适用于预配Atlas Stream Processing实例的云服务提供商。有效值为Amazon Web Services或Azure。 该值默认为“Amazon Web Services”。 |
-r, --region | 字符串 | true | Human-readable label that identifies the physical location of your Atlas Stream Processing instance. The region can affect network latency and performance if it is far from your source or sink. For AWS, region name must be in the following format: VIRGINIA_USA. For a list of valid values, see https://www.mongodb.com/zh-cn/docs/atlas/reference/amazon-aws/#stream-processing-workspaces. For Azure, region name must be in the following format: eastus. For a list of valid values, see https://www.mongodb.com/zh-cn/docs/atlas/reference/microsoft-azure/#stream-processing-workspaces. For GCP, region name must be in the following format: us-central1. For a list of valid values, see https://www.mongodb.com/zh-cn/docs/atlas/reference/google-gcp/#stream-processing-workspaces. |
--tier | 字符串 | false | Stream 实例的层级。 此值默认为 "SP 30 "。 |
继承选项
名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
-P, --profile | 字符串 | false | 要从您的配置文件中使用的配置文件的名称。要学习;了解Atlas CLI配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings. |
输出
如果命令成功,CLI 将返回类似于以下示例的输出。 括号中的值代表您的价值观。
Atlas Streams Processor Instance '<Name>' successfully created.
示例
# Deploy an Atlas Stream Processing instance called myProcessor for the project with the ID 5e2211c17a3e5a48f5497de3: atlas streams instance create myProcessor --projectId 5e2211c17a3e5a48f5497de3 --provider AWS --region VIRGINIA_USA --tier SP30