GuidesAPI Reference
API Reference

Add a resource to a resource policy

Add a resource to the Resource Policy with allowedActions. A maximum of 100 resources may be contained in a single Resource Policy. Note: The allowed actions list must match the Resource's resource setting allowed actions available for resource policy. By default all "projectLinkingEnabled" are allowed to be added for a resource in a resource policy. Adding a resource to a resource policy enables the ability of the resource to be made linkable to other realms.


Access Control:

  • The calling principal must have "manageResourcePolicy" action permission for the resource "{resourcePolicy}" in the "authorization" service. AND
  • According to the resource setting, The calling principal must either have permission to take all the "requiredToMakeLinkable" actions against the service inferred via the reserved resource prefix of the resource in the path in the scope of the home project of the resource or the Resource's resource setting is configured to allow anyone within the home realm of the resource to create a resource policy.
  • When the access token is project scoped, all the resources added to a resource policy must either be homed or referenced in the project.
  • This API works for tokens with or without a project scope.
Path Params
string
required

The HRN of the resource policy

string
required

The hrn that identifies the resource.

Body Params
string

The hrn of the resource

allowedActions
array of strings

The list of actions made available for referencing for the resourceType. These actions must be one of the "projectLinkingEnabled" actions of the service inferred via the reserved resource prefix of the resource in the path.

allowedActions
subresources
array of strings
length ≤ 10

The list of associated subresource identifiers.

subresources
Headers
string

Correlates HTTP requests between a client and server. If not present in the incoming request, it will be generated.

Responses

Language
Credentials
Bearer
JWT
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json