Preparation

Creating an Agency

An agency is an entrusting relationship created by an administrator to grant specific permissions to other accounts. After an entrusting relationship is established, the administrator of the entrusted enterprise can manage cloud resources on behalf of the entrusting enterprise by switching the agency. This ensures secure and efficient service management.

You must create an agency to enable FunctionGraph to access API Gateway, Image Moderation, and OBS resources.

  1. Log in to the IAM console, and choose Agencies in the navigation pane.
  2. On the Agencies page, click Create Agency.
  3. Set the agency information.

    • For Agency Name, enter serverless_trust.
    • For Agency Type, select Cloud service.
    • For Cloud service, select FunctionGraph.
    • For Validity Period, select Unlimited.
    • Click Assign Permissions. On the Assign Permissions page, select Tenant Administrator.
    Figure 1 Creating an agency

    Users with the Tenant Administrator permission can perform any operations on all cloud resources of the enterprise.

  4. Click OK.

Creating an API group

An API group is a collection of APIs used for the same type of services. One API group can be considered as a service. You can manage APIs by API group.

When creating an APIG trigger, select an API group in the same region as FunctionGraph. Create an API group by following the procedure described in this section.

  1. Log in to the API Gateway console, and choose Shared Gateway > API Publishing > API Groups.
  2. Click Create API Group.
  3. Set the API group information, as shown in Table 1.

    Table 1 Information required for creating an API group

    Parameter

    Description

    Name

    Enter function.

    Description

    This example does not require a description.

  4. Click OK.

Creating an OBS bucket

Create an OBS bucket to host the frontend program and provide a static website.

  1. Log in to the OBS console, and click Create Bucket.
  2. Set the bucket information according to Figure 2.

    For Region, select a region.

    For Bucket Name, enter obs-aidemo.

    For Storage Class, select Standard.

    For Bucket Policy, select Public Read.

    Figure 2 Creating a bucket