All Products
Search
Document Center

Security Center:GenerateK8sAccessInfo

Last Updated:Nov 25, 2024

Generates a command that is used to add a self-managed Kubernetes cluster.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-sas:GenerateK8sAccessInfocreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterNamestringYes

The name of the Kubernetes cluster.

test
GroupIdlongYes

The group ID.

11341690
VendorstringYes

The service provider of the cloud asset. Valid values:

  • Tencent
  • HUAWEICLOUD
  • Azure
  • AWS
  • Others
Tencent
ExpireDatelongYes

The time at which the container ends to be added.

1711951508388
AuditRegionIdstringNo

The ID of the region in which the audit logs are stored.

cn-hangzhou
AuditProjectstringNo

The Simple Log Service project that is used to store the audit logs.

k8s-log-custom-huxintest1018-2
AuditLogStorestringNo

The Simple Log Service Logstore that is used to store the audit logs.

audit-cf6baf6afa106eca665296fdf68b65bf
AliyunYundunGatewayProjectNamestringNo

This parameter is deprecated.

None
AliyunYundunGatewayApiNamestringNo

This parameter is deprecated.

None
AliyunYundunGatewayPopNamestringNo

This parameter is deprecated.

None

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

061955B2-BC40-589F-AF63-C40A901EE279
Dataobject

The data returned.

ClusterNamestring

The cluster name.

test
AliUidlong

The ID of the Alibaba Cloud account.

1766185894104***
InstallKeystring

The installation key of the server.

BC66185***
ClusterIdstring

The cluster ID.

c8ca91e0907d94efaba7fb0827eb9****
GroupIdstring

The server group ID.

11618788
ExpireDatelong

The expiration time. Unit: milliseconds.

1804230578566
AuditRegionIdstring

The ID of the region in which the server is deployed.

cn-hangzhou
AuditProjectstring

The Simple Log Service project that is used to store the audit logs.

k8s-log-custom-your-project-sd89ehaaa
AuditLogStorestring

The Simple Log Service Logstore that is used to store the audit logs.

audit-cf6baf6afa106eca665296fdf68b65bf

Examples

Sample success responses

JSONformat

{
  "RequestId": "061955B2-BC40-589F-AF63-C40A901EE279",
  "Data": {
    "ClusterName": "test",
    "AliUid": 0,
    "InstallKey": "BC66185***",
    "ClusterId": "c8ca91e0907d94efaba7fb0827eb9****",
    "GroupId": "11618788",
    "ExpireDate": 1804230578566,
    "AuditRegionId": "cn-hangzhou",
    "AuditProject": "k8s-log-custom-your-project-sd89ehaaa",
    "AuditLogStore": "audit-cf6baf6afa106eca665296fdf68b65bf"
  }
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history