Skip to content

Commit babb69e

Browse files
Update API model
1 parent 8e9acac commit babb69e

File tree

3 files changed

+419
-39
lines changed

3 files changed

+419
-39
lines changed

codegen/sdk-codegen/aws-models/amp.json

Lines changed: 298 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,75 @@
18471847
"smithy.api#input": {}
18481848
}
18491849
},
1850+
"com.amazonaws.amp#DeleteResourcePolicy": {
1851+
"type": "operation",
1852+
"input": {
1853+
"target": "com.amazonaws.amp#DeleteResourcePolicyRequest"
1854+
},
1855+
"output": {
1856+
"target": "smithy.api#Unit"
1857+
},
1858+
"errors": [
1859+
{
1860+
"target": "com.amazonaws.amp#AccessDeniedException"
1861+
},
1862+
{
1863+
"target": "com.amazonaws.amp#ConflictException"
1864+
},
1865+
{
1866+
"target": "com.amazonaws.amp#InternalServerException"
1867+
},
1868+
{
1869+
"target": "com.amazonaws.amp#ResourceNotFoundException"
1870+
},
1871+
{
1872+
"target": "com.amazonaws.amp#ThrottlingException"
1873+
},
1874+
{
1875+
"target": "com.amazonaws.amp#ValidationException"
1876+
}
1877+
],
1878+
"traits": {
1879+
"smithy.api#documentation": "<p>Deletes the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.</p>",
1880+
"smithy.api#http": {
1881+
"code": 202,
1882+
"method": "DELETE",
1883+
"uri": "/workspaces/{workspaceId}/policy"
1884+
},
1885+
"smithy.api#idempotent": {}
1886+
}
1887+
},
1888+
"com.amazonaws.amp#DeleteResourcePolicyRequest": {
1889+
"type": "structure",
1890+
"members": {
1891+
"workspaceId": {
1892+
"target": "com.amazonaws.amp#WorkspaceId",
1893+
"traits": {
1894+
"smithy.api#documentation": "<p>The ID of the workspace from which to delete the resource-based policy.</p>",
1895+
"smithy.api#httpLabel": {},
1896+
"smithy.api#required": {}
1897+
}
1898+
},
1899+
"clientToken": {
1900+
"target": "com.amazonaws.amp#IdempotencyToken",
1901+
"traits": {
1902+
"smithy.api#documentation": "<p>A unique, case-sensitive identifier that you provide to ensure the request is safe to retry (idempotent).</p>",
1903+
"smithy.api#httpQuery": "clientToken",
1904+
"smithy.api#idempotencyToken": {}
1905+
}
1906+
},
1907+
"revisionId": {
1908+
"target": "smithy.api#String",
1909+
"traits": {
1910+
"smithy.api#documentation": "<p>The revision ID of the policy to delete. Use this parameter to ensure that you are deleting the correct version of the policy.</p>",
1911+
"smithy.api#httpQuery": "revisionId"
1912+
}
1913+
}
1914+
},
1915+
"traits": {
1916+
"smithy.api#input": {}
1917+
}
1918+
},
18501919
"com.amazonaws.amp#DeleteRuleGroupsNamespace": {
18511920
"type": "operation",
18521921
"input": {
@@ -2272,6 +2341,86 @@
22722341
"smithy.api#output": {}
22732342
}
22742343
},
2344+
"com.amazonaws.amp#DescribeResourcePolicy": {
2345+
"type": "operation",
2346+
"input": {
2347+
"target": "com.amazonaws.amp#DescribeResourcePolicyRequest"
2348+
},
2349+
"output": {
2350+
"target": "com.amazonaws.amp#DescribeResourcePolicyResponse"
2351+
},
2352+
"errors": [
2353+
{
2354+
"target": "com.amazonaws.amp#AccessDeniedException"
2355+
},
2356+
{
2357+
"target": "com.amazonaws.amp#InternalServerException"
2358+
},
2359+
{
2360+
"target": "com.amazonaws.amp#ResourceNotFoundException"
2361+
},
2362+
{
2363+
"target": "com.amazonaws.amp#ThrottlingException"
2364+
},
2365+
{
2366+
"target": "com.amazonaws.amp#ValidationException"
2367+
}
2368+
],
2369+
"traits": {
2370+
"smithy.api#documentation": "<p>Returns information about the resource-based policy attached to an Amazon Managed Service for Prometheus workspace.</p>",
2371+
"smithy.api#http": {
2372+
"code": 200,
2373+
"method": "GET",
2374+
"uri": "/workspaces/{workspaceId}/policy"
2375+
},
2376+
"smithy.api#readonly": {}
2377+
}
2378+
},
2379+
"com.amazonaws.amp#DescribeResourcePolicyRequest": {
2380+
"type": "structure",
2381+
"members": {
2382+
"workspaceId": {
2383+
"target": "com.amazonaws.amp#WorkspaceId",
2384+
"traits": {
2385+
"smithy.api#documentation": "<p>The ID of the workspace to describe the resource-based policy for.</p>",
2386+
"smithy.api#httpLabel": {},
2387+
"smithy.api#required": {}
2388+
}
2389+
}
2390+
},
2391+
"traits": {
2392+
"smithy.api#input": {}
2393+
}
2394+
},
2395+
"com.amazonaws.amp#DescribeResourcePolicyResponse": {
2396+
"type": "structure",
2397+
"members": {
2398+
"policyDocument": {
2399+
"target": "smithy.api#String",
2400+
"traits": {
2401+
"smithy.api#documentation": "<p>The JSON policy document for the resource-based policy attached to the workspace.</p>",
2402+
"smithy.api#required": {}
2403+
}
2404+
},
2405+
"policyStatus": {
2406+
"target": "com.amazonaws.amp#WorkspacePolicyStatusCode",
2407+
"traits": {
2408+
"smithy.api#documentation": "<p>The current status of the resource-based policy.</p>",
2409+
"smithy.api#required": {}
2410+
}
2411+
},
2412+
"revisionId": {
2413+
"target": "smithy.api#String",
2414+
"traits": {
2415+
"smithy.api#documentation": "<p>The revision ID of the current resource-based policy.</p>",
2416+
"smithy.api#required": {}
2417+
}
2418+
}
2419+
},
2420+
"traits": {
2421+
"smithy.api#output": {}
2422+
}
2423+
},
22752424
"com.amazonaws.amp#DescribeRuleGroupsNamespace": {
22762425
"type": "operation",
22772426
"input": {
@@ -3439,7 +3588,7 @@
34393588
"aws.api#arnReference": {
34403589
"type": "AWS::Logs::LogGroup"
34413590
},
3442-
"smithy.api#pattern": "^arn:aws[-a-z]*:logs:[-a-z0-9]+:[0-9]{12}:log-group:[A-Za-z0-9\\.\\-\\_\\#/]{1,512}\\:\\*$"
3591+
"smithy.api#pattern": "^arn:aws[a-z0-9-]*:logs:[a-z0-9-]+:[0-9]{12}:log-group:[A-Za-z0-9\\.\\-\\_\\#/]{1,512}\\:\\*$"
34433592
}
34443593
},
34453594
"com.amazonaws.amp#LoggingConfiguration": {
@@ -3718,6 +3867,102 @@
37183867
"smithy.api#documentation": "<p>Represents the output of a <code>PutAlertManagerDefinition</code> operation.</p>"
37193868
}
37203869
},
3870+
"com.amazonaws.amp#PutResourcePolicy": {
3871+
"type": "operation",
3872+
"input": {
3873+
"target": "com.amazonaws.amp#PutResourcePolicyRequest"
3874+
},
3875+
"output": {
3876+
"target": "com.amazonaws.amp#PutResourcePolicyResponse"
3877+
},
3878+
"errors": [
3879+
{
3880+
"target": "com.amazonaws.amp#AccessDeniedException"
3881+
},
3882+
{
3883+
"target": "com.amazonaws.amp#ConflictException"
3884+
},
3885+
{
3886+
"target": "com.amazonaws.amp#InternalServerException"
3887+
},
3888+
{
3889+
"target": "com.amazonaws.amp#ResourceNotFoundException"
3890+
},
3891+
{
3892+
"target": "com.amazonaws.amp#ThrottlingException"
3893+
},
3894+
{
3895+
"target": "com.amazonaws.amp#ValidationException"
3896+
}
3897+
],
3898+
"traits": {
3899+
"smithy.api#documentation": "<p>Creates or updates a resource-based policy for an Amazon Managed Service for Prometheus workspace. Use resource-based policies to grant permissions to other AWS accounts or services to access your workspace.</p> <p>Only Prometheus-compatible APIs can be used for workspace sharing. You can add non-Prometheus-compatible APIs to the policy, but they will be ignored. For more information, see <a href=\"https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-APIReference-Prometheus-Compatible-Apis.html\">Prometheus-compatible APIs</a> in the <i>Amazon Managed Service for Prometheus User Guide</i>.</p> <p>If your workspace uses customer-managed KMS keys for encryption, you must grant the principals in your resource-based policy access to those KMS keys. You can do this by creating KMS grants. For more information, see <a href=\"https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html\">CreateGrant</a> in the <i>AWS Key Management Service API Reference</i> and <a href=\"https://docs.aws.amazon.com/prometheus/latest/userguide/encryption-at-rest-Amazon-Service-Prometheus.html\">Encryption at rest</a> in the <i>Amazon Managed Service for Prometheus User Guide</i>.</p> <p>For more information about working with IAM, see <a href=\"https://docs.aws.amazon.com/prometheus/latest/userguide/security_iam_service-with-iam.html\">Using Amazon Managed Service for Prometheus with IAM</a> in the <i>Amazon Managed Service for Prometheus User Guide</i>.</p>",
3900+
"smithy.api#http": {
3901+
"code": 202,
3902+
"method": "PUT",
3903+
"uri": "/workspaces/{workspaceId}/policy"
3904+
},
3905+
"smithy.api#idempotent": {}
3906+
}
3907+
},
3908+
"com.amazonaws.amp#PutResourcePolicyRequest": {
3909+
"type": "structure",
3910+
"members": {
3911+
"workspaceId": {
3912+
"target": "com.amazonaws.amp#WorkspaceId",
3913+
"traits": {
3914+
"smithy.api#documentation": "<p>The ID of the workspace to attach the resource-based policy to.</p>",
3915+
"smithy.api#httpLabel": {},
3916+
"smithy.api#required": {}
3917+
}
3918+
},
3919+
"policyDocument": {
3920+
"target": "smithy.api#String",
3921+
"traits": {
3922+
"smithy.api#documentation": "<p>The JSON policy document to use as the resource-based policy. This policy defines the permissions that other AWS accounts or services have to access your workspace.</p>",
3923+
"smithy.api#required": {}
3924+
}
3925+
},
3926+
"clientToken": {
3927+
"target": "com.amazonaws.amp#IdempotencyToken",
3928+
"traits": {
3929+
"smithy.api#documentation": "<p>A unique, case-sensitive identifier that you provide to ensure the request is safe to retry (idempotent).</p>",
3930+
"smithy.api#idempotencyToken": {}
3931+
}
3932+
},
3933+
"revisionId": {
3934+
"target": "smithy.api#String",
3935+
"traits": {
3936+
"smithy.api#documentation": "<p>The revision ID of the policy to update. Use this parameter to ensure that you are updating the correct version of the policy. If you don't specify a revision ID, the policy is updated regardless of its current revision.</p> <p>For the first <b>PUT</b> request on a workspace that doesn't have an existing resource policy, you can specify <code>NO_POLICY</code> as the revision ID.</p>"
3937+
}
3938+
}
3939+
},
3940+
"traits": {
3941+
"smithy.api#input": {}
3942+
}
3943+
},
3944+
"com.amazonaws.amp#PutResourcePolicyResponse": {
3945+
"type": "structure",
3946+
"members": {
3947+
"policyStatus": {
3948+
"target": "com.amazonaws.amp#WorkspacePolicyStatusCode",
3949+
"traits": {
3950+
"smithy.api#documentation": "<p>The current status of the resource-based policy.</p>",
3951+
"smithy.api#required": {}
3952+
}
3953+
},
3954+
"revisionId": {
3955+
"target": "smithy.api#String",
3956+
"traits": {
3957+
"smithy.api#documentation": "<p>The revision ID of the newly created or updated resource-based policy.</p>",
3958+
"smithy.api#required": {}
3959+
}
3960+
}
3961+
},
3962+
"traits": {
3963+
"smithy.api#output": {}
3964+
}
3965+
},
37213966
"com.amazonaws.amp#PutRuleGroupsNamespace": {
37223967
"type": "operation",
37233968
"input": {
@@ -5523,6 +5768,9 @@
55235768
},
55245769
{
55255770
"target": "com.amazonaws.amp#WorkspaceConfiguration"
5771+
},
5772+
{
5773+
"target": "com.amazonaws.amp#WorkspaceResourcePolicy"
55265774
}
55275775
],
55285776
"traits": {
@@ -5722,6 +5970,55 @@
57225970
"smithy.api#pattern": "[0-9A-Za-z][-.0-9A-Z_a-z]*"
57235971
}
57245972
},
5973+
"com.amazonaws.amp#WorkspacePolicyStatusCode": {
5974+
"type": "string",
5975+
"traits": {
5976+
"smithy.api#enum": [
5977+
{
5978+
"name": "CREATING",
5979+
"value": "CREATING",
5980+
"documentation": "Resource-based Policy is being created. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE."
5981+
},
5982+
{
5983+
"name": "ACTIVE",
5984+
"value": "ACTIVE",
5985+
"documentation": "Resource-based Policy has been created/updated. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE."
5986+
},
5987+
{
5988+
"name": "UPDATING",
5989+
"value": "UPDATING",
5990+
"documentation": "Resource-based Policy is being updated. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE."
5991+
},
5992+
{
5993+
"name": "DELETING",
5994+
"value": "DELETING",
5995+
"documentation": "Resource-based Policy is being deleting. Update/Deletion is disallowed until Resource-based Policy is ACTIVE and Workspace is ACTIVE."
5996+
}
5997+
]
5998+
}
5999+
},
6000+
"com.amazonaws.amp#WorkspaceResourcePolicy": {
6001+
"type": "resource",
6002+
"identifiers": {
6003+
"workspaceId": {
6004+
"target": "com.amazonaws.amp#WorkspaceId"
6005+
}
6006+
},
6007+
"put": {
6008+
"target": "com.amazonaws.amp#PutResourcePolicy"
6009+
},
6010+
"read": {
6011+
"target": "com.amazonaws.amp#DescribeResourcePolicy"
6012+
},
6013+
"delete": {
6014+
"target": "com.amazonaws.amp#DeleteResourcePolicy"
6015+
},
6016+
"traits": {
6017+
"aws.api#arn": {
6018+
"template": "workspace/{workspaceId}"
6019+
}
6020+
}
6021+
},
57256022
"com.amazonaws.amp#WorkspaceStatus": {
57266023
"type": "structure",
57276024
"members": {

0 commit comments

Comments
 (0)