GetComponent

Updated at:

Gets component information.

Operation description

  1. You must purchase DataWorks Basic Edition or a higher edition to use this feature.

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

dataworks:GetComponent

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

No

The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to query the ID. You must configure either this parameter or the ProjectIdentifier parameter to determine the DataWorks workspace to which the operation is applied.

10000

ComponentId

string

Yes

The component ID.

1112312312312

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

0000-ABCD-EFG****

Component

object

JSON serialization of the component module.

ComponentId

string

The ID of the dataset acceleration component. For information on how to obtain the component ID, see ListComponents.

43cd873b-235c-44f8-be07-e4d4cf7e73b0

ProjectId

integer

The DataWorks workspace ID.

64623

Name

string

The name.

dim_whse_epet_warehouse_jz_storage_stock_lot_relation_id

Owner

string

The ID of the task owner.

207316543660665792

CreateTime

string

The creation time.

2017-04-27T05:37:05Z

ModifyTime

string

The modification time (millisecond-level timestamp).

2024-01-26T07:44:21Z

Spec

string

The FlowSpec information for this workflow. For more information, see FlowSpec.

{ "kind": "Component", "name": "com1", "spec": { "components": [ { "name": "test11", "id": "8196828925037*****", "owner": "054664", "description": "", "script": { "language": "odps-sql", "path": "test11", "content": "select '@@{bizdate}', '@@{my_input_table}'", "runtime": { "command": "SQL_COMPONENT" } }, "inputs": [ { "name": "bizdate", "type": "string" }, { "name": "my_input_table", "type": "string" } ], "outputs": [ { "name": "my_output_table1", "type": "string" } ] } ] } }

Description

string

The description.

None

RegionId

string

The region information, usually the region where the service is located. For example, cn-shanghai specifies China (Shanghai), and cn-zhangjiakou specifies China (Zhangjiakou). You do not need to specify RegionId because it is automatically parsed from the endpoint that you call.

cn-hangzhou

Examples

Success response

JSON format

{
  "RequestId": "0000-ABCD-EFG****",
  "Component": {
    "ComponentId": "43cd873b-235c-44f8-be07-e4d4cf7e73b0",
    "ProjectId": 64623,
    "Name": "dim_whse_epet_warehouse_jz_storage_stock_lot_relation_id",
    "Owner": "207316543660665792",
    "CreateTime": "2017-04-27T05:37:05Z",
    "ModifyTime": "2024-01-26T07:44:21Z",
    "Spec": "{\n    \"kind\": \"Component\",\n    \"name\": \"com1\",\n    \"spec\": {\n        \"components\": [\n            {\n                \"name\": \"test11\",\n                \"id\": \"8196828925037*****\",\n                \"owner\": \"054664\",\n                \"description\": \"\",\n                \"script\": {\n                    \"language\": \"odps-sql\",\n                    \"path\": \"test11\",\n                    \"content\": \"select '@@{bizdate}', '@@{my_input_table}'\",\n                    \"runtime\": {\n                        \"command\": \"SQL_COMPONENT\"\n                    }\n                },\n                \"inputs\": [\n                    {\n                        \"name\": \"bizdate\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"my_input_table\",\n                        \"type\": \"string\"\n                    }\n                ],\n                \"outputs\": [\n                    {\n                        \"name\": \"my_output_table1\",\n                        \"type\": \"string\"\n                    }\n                ]\n            }\n        ]\n    }\n}",
    "Description": "None",
    "RegionId": "cn-hangzhou"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

404 InvalidComponent.NotFound The specified Component does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.