Role Data
    • PDF

    Role Data

    • PDF

    Article Summary

    Can be used in a VPC environment.

    Summary

    Search information regarding the role assigned to the server instance.
    A role must be assigned to the server instance to use the corresponding feature.
    Please see Sub Account User Guide > Manage roles page for related details.
    Role ID search and temporary access key issuing feature can be used internally in ncloud-sdk and Object Storage CLI.
    If both the environment variable and the configure file don't have an access key set, a temporary access key will be used internally using the corresponding feature.

    Request

    Call pathDescription
    /{version}/meta-data/iam/Search list of the role-related data provided in the corresponding version.
    /{version}/meta-data/iam/infoSearch details of the role assigned to the server instance.
    /{version}/meta-data/iam/security-credentialsSearch ID of the role assigned to the server instance.
    The line feed character (\n) does not exist at the end of the output result.
    It can be used for obtaining the role ID internally in ncloud-sdk and Object Storage CLI.
    /{version}/meta-data/iam/security-credentials/{roleId}You can get a temporarily issued access key (STS) assigned to the server instance.
    The temporary access key will get permissions under the policy set in the role.
    Just like sub account's access key, it can also be used in API, CLI, and SDK.
    The line feed character (\n) does not exist at the end of the output result.
    It can be used for obtaining the temporary access key internally in ncloud-sdk and Object Storage CLI.

    Example

    [root@test-server ~]# curl http://169.254.169.254/latest/meta-data/iam/
    info
    security-credentials
    [root@test-server ~]# curl http://169.254.169.254/latest/meta-data/iam/info
    {
      "roleId" : "***-***-***-***-***ec4",
      "roleName" : "test-role",
      "roleType" : "Server",
      "createTime" : "2020-12-04T08:24:35Z"
    }
    [root@test-server ~]# curl http://169.254.169.254/latest/meta-data/iam/security-credentials
    ***-***-***-***-***ec4[root@test-server ~]#
    [root@test-server ~]# curl http://169.254.169.254/latest/meta-data/iam/security-credentials/***-***-***-***-***ec4
    {
      "Type" : "NCP-HMAC",
      "AccessKeyId" : "s_***976",
      "SecretAccessKey" : "***6ab",
      "Expiration" : "2020-12-22T11:50:45Z",
      "Token" : "",
      "LastUpdated" : "2020-12-21T23:50:45Z",
      "Code" : "Success"
    }[root@test-server ~]#
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.