UNPKG

@rockset/cli

Version:
98 lines (95 loc) 3.88 kB
"use strict"; /* eslint-disable unicorn/filename-case */ // Generated file, please do not edit directly Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); const core_2 = require("@rockset/core"); const util_1 = require("../../../helper/util"); const base_command_1 = require("../../../base-command"); const chalk = require("chalk"); const cli_ux_1 = require("cli-ux"); const bodySchema = `name: event-logs description: AWS account with event data for the data science team. s3: aws_access_key: aws_access_key_id: AKIAIOSFODNN7EXAMPLE aws_secret_access_key: wJal.... aws_role: aws_role_arn: arn:aws:iam::2378964092:role/rockset-role kinesis: aws_access_key: aws_access_key_id: AKIAIOSFODNN7EXAMPLE aws_secret_access_key: wJal.... aws_role: aws_role_arn: arn:aws:iam::2378964092:role/rockset-role dynamodb: aws_access_key: aws_access_key_id: AKIAIOSFODNN7EXAMPLE aws_secret_access_key: wJal.... aws_role: aws_role_arn: arn:aws:iam::2378964092:role/rockset-role s3_export_bucket_name: null redshift: aws_access_key: aws_access_key_id: AKIAIOSFODNN7EXAMPLE aws_secret_access_key: wJal.... username: awsuser password: pswd.... host: test.yuyugt.us-west-2.redshift.amazonaws.com port: 5439 s3_bucket_path: s3://redshift-unload gcs: gcp_service_account: ? service_account_key_file_json segment: ? connection_string kafka: kafka_topic_names: - null source_status_by_topic: topic-a:DORMANT kafka_data_format: json connection_string: null use_v3: null bootstrap_servers: null security_config: ? api_key ? secret mongodb: connection_uri: mongodb+srv://<username>:<password>@server.example.com/ `; let CreateIntegration = /** @class */ (() => { class CreateIntegration extends base_command_1.RockCommand { async run() { const { args, flags } = await this.parse(CreateIntegration); // Rockset client object const client = await core_2.main.createClient(); const namedArgs = CreateIntegration.args; // apicall const apicall = client.integrations.createIntegration.bind(client.integrations); // endpoint const endpoint = '/v1/orgs/self/integrations'; const method = 'POST'; await util_1.runApiCall.bind(this)({ args, flags, namedArgs, apicall, method, endpoint, bodySchema }); } } CreateIntegration.flags = Object.assign({ help: core_1.Flags.help({ char: 'h' }), body: core_1.Flags.string({ required: true, description: 'Path to a file whose contents will be passed as the POST body of this request. Format must be [json|yaml]. An example schema is shown below.', }), raw: core_1.Flags.boolean({ description: 'Show the raw output from the server, instead of grabbing the results. Usually used in conjunction with --output=json', }) }, cli_ux_1.cli.table.flags({ only: ['columns', 'output'] })); CreateIntegration.args = []; CreateIntegration.description = `create a new integration Arguments to this command will be passed as URL parameters to ${chalk.bold(`POST: /v1/orgs/self/integrations`)} ${chalk.bold(`This endpoint REQUIRES a POST body. To specify a POST body, please pass a JSON or YAML file to the --body flag. `)} The POST body request schema has been omitted because it is too long. Please view the documentation at ${chalk.underline(`https://docs.rockset.com/rest-api#createintegration`)} to see the example. Endpoint Reference POST: /v1/orgs/self/integrations Create Integration Create a new integration. More documentation at ${chalk.underline(`https://docs.rockset.com/rest-api#createintegration`)}`; CreateIntegration.examples = []; return CreateIntegration; })(); exports.default = CreateIntegration;