CreateService

Updated at:

Creates an application observability service.

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

cms:CreateService

create

*Service

acs:cms:{#regionId}:{#accountId}:workspace/{#Workspace}/service/*

None None

Request syntax

POST /workspace/{workspace}/service HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspace

string

Yes

The workspace name.

default-cms-1793369865235921-cn-shenzhen

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

serviceName

string

Yes

The service name.

mag_test

serviceType

string

Yes

The service type.

Valid values:

  • TRACE :

    Application performance monitoring.

  • RUM :

    Real user monitoring.

  • XTRACE :

    OpenTelemetry tracing.

TRACE

displayName

string

No

The display name. This parameter is valid only when serviceType is set to RUM.

mag test application

description

string

No

The service description. This parameter is valid only when serviceType is set to RUM.

mag test application

attributes

string

No

The extended attributes.

{"language":"java"}

serviceStatus

string

No

The service status. You do not need to specify this parameter when creating a service.

Created

pid

string

No

The application ID. Generally, you do not need to specify this parameter.

bx3udsi5ie@ed2ba6beebdb6de

resourceGroupId

string

No

The resource group ID.

rg-xxxxxxx

tags

array<object>

No

The tag array.

object

No

The tag.

key

string

No

The tag key.

env

value

string

No

The tag value.

prod

Extended attributes: When serviceType is set to TRACE, the optional attribute language is supported. Valid values: java, python, and golang. When serviceType is set to XTRACE, the optional attribute language is supported. For valid values, refer to the open source values of the OpenTelemetry telemetry.sdk.language attribute.

Response elements

Element

Type

Description

Example

object

requestId

string

The request ID.

3A2FA9E9-9CF1-5CB1-A808-52828F14310D

serviceId

string

The service ID.

cwzxvuc6uo@4bc6b15ad81f166174ffb

pid

string

The legacy ARMS application ID for backward compatibility.

cwzxvuc6uo@d60088ad4797d26

Examples

Success response

JSON format

{
  "requestId": "3A2FA9E9-9CF1-5CB1-A808-52828F14310D",
  "serviceId": "cwzxvuc6uo@4bc6b15ad81f166174ffb",
  "pid": "cwzxvuc6uo@d60088ad4797d26"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.