POST /2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy
Adds permissions to the resource-based policy of a version of an Lambda layer. Use this action to grant layer usage permission to other accounts. You can grant permission to a single account, all accounts in an organization, or all Amazon Web Services accounts.
To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you added it.
Servers
- https://lambda.{region}.amazonaws.com
- https://lambda.{region}.amazonaws.com.cn
Path parameters
Name | Type | Required | Description |
---|---|---|---|
LayerName |
String | Yes |
The name or Amazon Resource Name (ARN) of the layer. |
VersionNumber |
Integer | Yes |
The version number. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
X-Amz-Content-Sha256 |
String | No | |
X-Amz-Credential |
String | No | |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
X-Amz-Date |
String | No | |
X-Amz-Algorithm |
String | No | |
X-Amz-SignedHeaders |
String | No | |
X-Amz-Security-Token |
String | No | |
X-Amz-Signature |
String | No |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
RevisionId |
String | No |
Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it. |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
StatementId |
String | Yes |
An identifier that distinguishes the policy from others on the same layer version. |
Principal |
String | Yes |
An account ID, or |
OrganizationId |
String | No |
With the principal set to |
Action |
String | Yes |
The API action that grants access to the layer. For example, |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.