# How Can I Create an Agency?

#### Scenarios

Create an agency so that the Agent can automatically obtain the AK and SK. This frees you from exposing the AK or SK in the configuration file.

#### Procedure

1. Log in to the management console.
2. Click in the upper left to select a region and project.
3. Click Service List in the upper left corner, and select Identity and Access Management.
4. In the navigation pane on the left, choose Agencies. In the upper right corner, click Create Agency.
5. Configure the parameters by referring to Table 1.

   Table 1 Creating an agency
   Parameter | Description
   --- | ---
   Agency Name | Specifies the name of the agency. Example: CESAgentAutoConfigAgency
   Agency Type | Select Cloud service.
   Cloud Service | Select Elastic Cloud Server (ECS) and Bare Metal Server (BMS) from the drop-down list.
   Validity Period | Select Unlimited.
   Description | (Optional) Provides supplementary information about the agency.

6. In the Permissions area, click Modify in the row where the current region is located.
7. In the Available Policies area on the left, enter CES. In the search result, select CES and CES Administrator.
8. Click OK.

#### Agency Configuration

If no agency is configured for a server, perform the following operations to configure an agency:

1. Log in to the management console.
2. Choose Service List > Computing > Elastic Cloud Server.

   If you purchase a BMS, choose Computing > Bare Metal Server.

3. Click the name of the target ECS on which the Agent is installed.
4. In the Management Information area, select the agency created in 5 for Agency and click the green tick to make the agency take effect.

Parent topic: Server Monitoring