libZSservicesZSamazonka-codeguruprofilerZSamazonka-codeguruprofiler
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CodeGuruProfiler.PutPermission

Description

Adds permissions to a profiling group's resource-based policy that are provided using an action group. If a profiling group doesn't have a resource-based policy, one is created for it using the permissions in the action group and the roles and users in the principals parameter.

 <p> The one supported action group that can be added is <code>agentPermission</code> which grants <code>ConfigureAgent</code> and <code>PostAgent</code> permissions. For more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-ug/resource-based-policies.html">Resource-based policies in CodeGuru Profiler</a> in the <i>Amazon CodeGuru Profiler User Guide</i>, <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html"> <code>ConfigureAgent</code> </a>, and <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html"> <code>PostAgentProfile</code> </a>. </p> <p> The first time you call <code>PutPermission</code> on a profiling group, do not specify a <code>revisionId</code> because it doesn't have a resource-based policy. Subsequent calls must provide a <code>revisionId</code> to specify which revision of the resource-based policy to add the permissions to. </p> <p> The response contains the profiling group's JSON-formatted resource policy. </p>
Synopsis

Creating a Request

data PutPermission Source #

The structure representing the putPermissionRequest.

See: newPutPermission smart constructor.

Constructors

PutPermission' 

Fields

  • revisionId :: Maybe Text

    A universally unique identifier (UUID) for the revision of the policy you are adding to the profiling group. Do not specify this when you add permissions to a profiling group for the first time. If a policy already exists on the profiling group, you must specify the revisionId.

  • actionGroup :: ActionGroup

    Specifies an action group that contains permissions to add to a profiling group resource. One action group is supported, agentPermissions, which grants permission to perform actions required by the profiling agent, ConfigureAgent and PostAgentProfile permissions.

  • principals :: NonEmpty Text

    A list ARNs for the roles and users you want to grant access to the profiling group. Wildcards are not are supported in the ARNs.

  • profilingGroupName :: Text

    The name of the profiling group to grant access to.

Instances

Instances details
Eq PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Read PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Show PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Generic PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Associated Types

type Rep PutPermission :: Type -> Type #

NFData PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Methods

rnf :: PutPermission -> () #

Hashable PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

ToJSON PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

AWSRequest PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Associated Types

type AWSResponse PutPermission #

ToHeaders PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

ToPath PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

ToQuery PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

type Rep PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

type Rep PutPermission = D1 ('MetaData "PutPermission" "Amazonka.CodeGuruProfiler.PutPermission" "libZSservicesZSamazonka-codeguruprofilerZSamazonka-codeguruprofiler" 'False) (C1 ('MetaCons "PutPermission'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "revisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "actionGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ActionGroup)) :*: (S1 ('MetaSel ('Just "principals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Text)) :*: S1 ('MetaSel ('Just "profilingGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse PutPermission Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

newPutPermission Source #

Create a value of PutPermission with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:revisionId:PutPermission', putPermission_revisionId - A universally unique identifier (UUID) for the revision of the policy you are adding to the profiling group. Do not specify this when you add permissions to a profiling group for the first time. If a policy already exists on the profiling group, you must specify the revisionId.

$sel:actionGroup:PutPermission', putPermission_actionGroup - Specifies an action group that contains permissions to add to a profiling group resource. One action group is supported, agentPermissions, which grants permission to perform actions required by the profiling agent, ConfigureAgent and PostAgentProfile permissions.

$sel:principals:PutPermission', putPermission_principals - A list ARNs for the roles and users you want to grant access to the profiling group. Wildcards are not are supported in the ARNs.

$sel:profilingGroupName:PutPermission', putPermission_profilingGroupName - The name of the profiling group to grant access to.

Request Lenses

putPermission_revisionId :: Lens' PutPermission (Maybe Text) Source #

A universally unique identifier (UUID) for the revision of the policy you are adding to the profiling group. Do not specify this when you add permissions to a profiling group for the first time. If a policy already exists on the profiling group, you must specify the revisionId.

putPermission_actionGroup :: Lens' PutPermission ActionGroup Source #

Specifies an action group that contains permissions to add to a profiling group resource. One action group is supported, agentPermissions, which grants permission to perform actions required by the profiling agent, ConfigureAgent and PostAgentProfile permissions.

putPermission_principals :: Lens' PutPermission (NonEmpty Text) Source #

A list ARNs for the roles and users you want to grant access to the profiling group. Wildcards are not are supported in the ARNs.

putPermission_profilingGroupName :: Lens' PutPermission Text Source #

The name of the profiling group to grant access to.

Destructuring the Response

data PutPermissionResponse Source #

The structure representing the putPermissionResponse.

See: newPutPermissionResponse smart constructor.

Constructors

PutPermissionResponse' 

Fields

  • httpStatus :: Int

    The response's http status code.

  • policy :: Text

    The JSON-formatted resource-based policy on the profiling group that includes the added permissions.

  • revisionId :: Text

    A universally unique identifier (UUID) for the revision of the resource-based policy that includes the added permissions. The JSON-formatted policy is in the policy element of the response.

Instances

Instances details
Eq PutPermissionResponse Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Read PutPermissionResponse Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Show PutPermissionResponse Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Generic PutPermissionResponse Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Associated Types

type Rep PutPermissionResponse :: Type -> Type #

NFData PutPermissionResponse Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

Methods

rnf :: PutPermissionResponse -> () #

type Rep PutPermissionResponse Source # 
Instance details

Defined in Amazonka.CodeGuruProfiler.PutPermission

type Rep PutPermissionResponse = D1 ('MetaData "PutPermissionResponse" "Amazonka.CodeGuruProfiler.PutPermission" "libZSservicesZSamazonka-codeguruprofilerZSamazonka-codeguruprofiler" 'False) (C1 ('MetaCons "PutPermissionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "policy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "revisionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newPutPermissionResponse Source #

Create a value of PutPermissionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:PutPermissionResponse', putPermissionResponse_httpStatus - The response's http status code.

$sel:policy:PutPermissionResponse', putPermissionResponse_policy - The JSON-formatted resource-based policy on the profiling group that includes the added permissions.

$sel:revisionId:PutPermission', putPermissionResponse_revisionId - A universally unique identifier (UUID) for the revision of the resource-based policy that includes the added permissions. The JSON-formatted policy is in the policy element of the response.

Response Lenses

putPermissionResponse_policy :: Lens' PutPermissionResponse Text Source #

The JSON-formatted resource-based policy on the profiling group that includes the added permissions.

putPermissionResponse_revisionId :: Lens' PutPermissionResponse Text Source #

A universally unique identifier (UUID) for the revision of the resource-based policy that includes the added permissions. The JSON-formatted policy is in the policy element of the response.