/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.accessanalyzer; import org.w3c.dom.*; import java.net.*; import java.util.*; import javax.annotation.Generated; import org.apache.commons.logging.*; import com.amazonaws.*; import com.amazonaws.annotation.SdkInternalApi; import com.amazonaws.auth.*; import com.amazonaws.handlers.*; import com.amazonaws.http.*; import com.amazonaws.internal.*; import com.amazonaws.internal.auth.*; import com.amazonaws.metrics.*; import com.amazonaws.regions.*; import com.amazonaws.transform.*; import com.amazonaws.util.*; import com.amazonaws.protocol.json.*; import com.amazonaws.util.AWSRequestMetrics.Field; import com.amazonaws.annotation.ThreadSafe; import com.amazonaws.client.AwsSyncClientParams; import com.amazonaws.client.builder.AdvancedConfig; import com.amazonaws.services.accessanalyzer.AWSAccessAnalyzerClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.accessanalyzer.model.*; import com.amazonaws.services.accessanalyzer.model.transform.*; /** * Client for accessing Access Analyzer. All service calls made using this client are blocking, and will not return * until the service call completes. *
*
* Identity and Access Management Access Analyzer helps identify potential resource-access risks by enabling you to * identify any policies that grant access to an external principal. It does this by using logic-based reasoning to * analyze resource-based policies in your Amazon Web Services environment. An external principal can be another Amazon * Web Services account, a root user, an IAM user or role, a federated user, an Amazon Web Services service, or an * anonymous user. You can also use IAM Access Analyzer to preview and validate public and cross-account access to your * resources before deploying permissions changes. This guide describes the Identity and Access Management Access * Analyzer operations that you can call programmatically. For general information about IAM Access Analyzer, see Identity and Access Management * Access Analyzer in the IAM User Guide. *
** To start using IAM Access Analyzer, you first need to create an analyzer. *
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSAccessAnalyzerClient extends AmazonWebServiceClient implements AWSAccessAnalyzer { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSAccessAnalyzer.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "access-analyzer"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .withContentTypeOverride("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.accessanalyzer.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.accessanalyzer.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.accessanalyzer.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.accessanalyzer.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.accessanalyzer.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.accessanalyzer.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.accessanalyzer.model.transform.ValidationExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.accessanalyzer.model.AWSAccessAnalyzerException.class)); public static AWSAccessAnalyzerClientBuilder builder() { return AWSAccessAnalyzerClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Access Analyzer using the specified parameters. * ** All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AWSAccessAnalyzerClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Access Analyzer using the specified parameters. * *
* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AWSAccessAnalyzerClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("access-analyzer.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/accessanalyzer/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/accessanalyzer/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *
* Retroactively applies the archive rule to existing findings that meet the archive rule criteria. *
* * @param applyArchiveRuleRequest * Retroactively applies an archive rule. * @return Result of the ApplyArchiveRule operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ApplyArchiveRule * @see AWS API Documentation */ @Override public ApplyArchiveRuleResult applyArchiveRule(ApplyArchiveRuleRequest request) { request = beforeClientExecution(request); return executeApplyArchiveRule(request); } @SdkInternalApi final ApplyArchiveRuleResult executeApplyArchiveRule(ApplyArchiveRuleRequest applyArchiveRuleRequest) { ExecutionContext executionContext = createExecutionContext(applyArchiveRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Cancels the requested policy generation. *
* * @param cancelPolicyGenerationRequest * @return Result of the CancelPolicyGeneration operation returned by the service. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.CancelPolicyGeneration * @see AWS API Documentation */ @Override public CancelPolicyGenerationResult cancelPolicyGeneration(CancelPolicyGenerationRequest request) { request = beforeClientExecution(request); return executeCancelPolicyGeneration(request); } @SdkInternalApi final CancelPolicyGenerationResult executeCancelPolicyGeneration(CancelPolicyGenerationRequest cancelPolicyGenerationRequest) { ExecutionContext executionContext = createExecutionContext(cancelPolicyGenerationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates an access preview that allows you to preview IAM Access Analyzer findings for your resource before * deploying resource permissions. *
* * @param createAccessPreviewRequest * @return Result of the CreateAccessPreview operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ConflictException * A conflict exception error. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ServiceQuotaExceededException * Service quote met error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.CreateAccessPreview * @see AWS API Documentation */ @Override public CreateAccessPreviewResult createAccessPreview(CreateAccessPreviewRequest request) { request = beforeClientExecution(request); return executeCreateAccessPreview(request); } @SdkInternalApi final CreateAccessPreviewResult executeCreateAccessPreview(CreateAccessPreviewRequest createAccessPreviewRequest) { ExecutionContext executionContext = createExecutionContext(createAccessPreviewRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates an analyzer for your account. *
* * @param createAnalyzerRequest * Creates an analyzer. * @return Result of the CreateAnalyzer operation returned by the service. * @throws ConflictException * A conflict exception error. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ServiceQuotaExceededException * Service quote met error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.CreateAnalyzer * @see AWS * API Documentation */ @Override public CreateAnalyzerResult createAnalyzer(CreateAnalyzerRequest request) { request = beforeClientExecution(request); return executeCreateAnalyzer(request); } @SdkInternalApi final CreateAnalyzerResult executeCreateAnalyzer(CreateAnalyzerRequest createAnalyzerRequest) { ExecutionContext executionContext = createExecutionContext(createAnalyzerRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates an archive rule for the specified analyzer. Archive rules automatically archive new findings that meet * the criteria you define when you create the rule. *
** To learn about filter keys that you can use to create an archive rule, see IAM Access * Analyzer filter keys in the IAM User Guide. *
* * @param createArchiveRuleRequest * Creates an archive rule. * @return Result of the CreateArchiveRule operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ConflictException * A conflict exception error. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ServiceQuotaExceededException * Service quote met error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.CreateArchiveRule * @see AWS API Documentation */ @Override public CreateArchiveRuleResult createArchiveRule(CreateArchiveRuleRequest request) { request = beforeClientExecution(request); return executeCreateArchiveRule(request); } @SdkInternalApi final CreateArchiveRuleResult executeCreateArchiveRule(CreateArchiveRuleRequest createArchiveRuleRequest) { ExecutionContext executionContext = createExecutionContext(createArchiveRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Deletes the specified analyzer. When you delete an analyzer, IAM Access Analyzer is disabled for the account or * organization in the current or specific Region. All findings that were generated by the analyzer are deleted. You * cannot undo this action. *
* * @param deleteAnalyzerRequest * Deletes an analyzer. * @return Result of the DeleteAnalyzer operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.DeleteAnalyzer * @see AWS * API Documentation */ @Override public DeleteAnalyzerResult deleteAnalyzer(DeleteAnalyzerRequest request) { request = beforeClientExecution(request); return executeDeleteAnalyzer(request); } @SdkInternalApi final DeleteAnalyzerResult executeDeleteAnalyzer(DeleteAnalyzerRequest deleteAnalyzerRequest) { ExecutionContext executionContext = createExecutionContext(deleteAnalyzerRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Deletes the specified archive rule. *
* * @param deleteArchiveRuleRequest * Deletes an archive rule. * @return Result of the DeleteArchiveRule operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.DeleteArchiveRule * @see AWS API Documentation */ @Override public DeleteArchiveRuleResult deleteArchiveRule(DeleteArchiveRuleRequest request) { request = beforeClientExecution(request); return executeDeleteArchiveRule(request); } @SdkInternalApi final DeleteArchiveRuleResult executeDeleteArchiveRule(DeleteArchiveRuleRequest deleteArchiveRuleRequest) { ExecutionContext executionContext = createExecutionContext(deleteArchiveRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves information about an access preview for the specified analyzer. *
* * @param getAccessPreviewRequest * @return Result of the GetAccessPreview operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.GetAccessPreview * @see AWS API Documentation */ @Override public GetAccessPreviewResult getAccessPreview(GetAccessPreviewRequest request) { request = beforeClientExecution(request); return executeGetAccessPreview(request); } @SdkInternalApi final GetAccessPreviewResult executeGetAccessPreview(GetAccessPreviewRequest getAccessPreviewRequest) { ExecutionContext executionContext = createExecutionContext(getAccessPreviewRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves information about a resource that was analyzed. *
* * @param getAnalyzedResourceRequest * Retrieves an analyzed resource. * @return Result of the GetAnalyzedResource operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.GetAnalyzedResource * @see AWS API Documentation */ @Override public GetAnalyzedResourceResult getAnalyzedResource(GetAnalyzedResourceRequest request) { request = beforeClientExecution(request); return executeGetAnalyzedResource(request); } @SdkInternalApi final GetAnalyzedResourceResult executeGetAnalyzedResource(GetAnalyzedResourceRequest getAnalyzedResourceRequest) { ExecutionContext executionContext = createExecutionContext(getAnalyzedResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves information about the specified analyzer. *
* * @param getAnalyzerRequest * Retrieves an analyzer. * @return Result of the GetAnalyzer operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.GetAnalyzer * @see AWS API * Documentation */ @Override public GetAnalyzerResult getAnalyzer(GetAnalyzerRequest request) { request = beforeClientExecution(request); return executeGetAnalyzer(request); } @SdkInternalApi final GetAnalyzerResult executeGetAnalyzer(GetAnalyzerRequest getAnalyzerRequest) { ExecutionContext executionContext = createExecutionContext(getAnalyzerRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves information about an archive rule. *
** To learn about filter keys that you can use to create an archive rule, see IAM Access * Analyzer filter keys in the IAM User Guide. *
* * @param getArchiveRuleRequest * Retrieves an archive rule. * @return Result of the GetArchiveRule operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.GetArchiveRule * @see AWS * API Documentation */ @Override public GetArchiveRuleResult getArchiveRule(GetArchiveRuleRequest request) { request = beforeClientExecution(request); return executeGetArchiveRule(request); } @SdkInternalApi final GetArchiveRuleResult executeGetArchiveRule(GetArchiveRuleRequest getArchiveRuleRequest) { ExecutionContext executionContext = createExecutionContext(getArchiveRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves information about the specified finding. *
* * @param getFindingRequest * Retrieves a finding. * @return Result of the GetFinding operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.GetFinding * @see AWS API * Documentation */ @Override public GetFindingResult getFinding(GetFindingRequest request) { request = beforeClientExecution(request); return executeGetFinding(request); } @SdkInternalApi final GetFindingResult executeGetFinding(GetFindingRequest getFindingRequest) { ExecutionContext executionContext = createExecutionContext(getFindingRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Retrieves the policy that was generated using StartPolicyGeneration
.
*
* Retrieves a list of access preview findings generated by the specified access preview. *
* * @param listAccessPreviewFindingsRequest * @return Result of the ListAccessPreviewFindings operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ConflictException * A conflict exception error. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ListAccessPreviewFindings * @see AWS API Documentation */ @Override public ListAccessPreviewFindingsResult listAccessPreviewFindings(ListAccessPreviewFindingsRequest request) { request = beforeClientExecution(request); return executeListAccessPreviewFindings(request); } @SdkInternalApi final ListAccessPreviewFindingsResult executeListAccessPreviewFindings(ListAccessPreviewFindingsRequest listAccessPreviewFindingsRequest) { ExecutionContext executionContext = createExecutionContext(listAccessPreviewFindingsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves a list of access previews for the specified analyzer. *
* * @param listAccessPreviewsRequest * @return Result of the ListAccessPreviews operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ListAccessPreviews * @see AWS API Documentation */ @Override public ListAccessPreviewsResult listAccessPreviews(ListAccessPreviewsRequest request) { request = beforeClientExecution(request); return executeListAccessPreviews(request); } @SdkInternalApi final ListAccessPreviewsResult executeListAccessPreviews(ListAccessPreviewsRequest listAccessPreviewsRequest) { ExecutionContext executionContext = createExecutionContext(listAccessPreviewsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves a list of resources of the specified type that have been analyzed by the specified analyzer.. *
* * @param listAnalyzedResourcesRequest * Retrieves a list of resources that have been analyzed. * @return Result of the ListAnalyzedResources operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ListAnalyzedResources * @see AWS API Documentation */ @Override public ListAnalyzedResourcesResult listAnalyzedResources(ListAnalyzedResourcesRequest request) { request = beforeClientExecution(request); return executeListAnalyzedResources(request); } @SdkInternalApi final ListAnalyzedResourcesResult executeListAnalyzedResources(ListAnalyzedResourcesRequest listAnalyzedResourcesRequest) { ExecutionContext executionContext = createExecutionContext(listAnalyzedResourcesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves a list of analyzers. *
* * @param listAnalyzersRequest * Retrieves a list of analyzers. * @return Result of the ListAnalyzers operation returned by the service. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ListAnalyzers * @see AWS * API Documentation */ @Override public ListAnalyzersResult listAnalyzers(ListAnalyzersRequest request) { request = beforeClientExecution(request); return executeListAnalyzers(request); } @SdkInternalApi final ListAnalyzersResult executeListAnalyzers(ListAnalyzersRequest listAnalyzersRequest) { ExecutionContext executionContext = createExecutionContext(listAnalyzersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves a list of archive rules created for the specified analyzer. *
* * @param listArchiveRulesRequest * Retrieves a list of archive rules created for the specified analyzer. * @return Result of the ListArchiveRules operation returned by the service. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ListArchiveRules * @see AWS API Documentation */ @Override public ListArchiveRulesResult listArchiveRules(ListArchiveRulesRequest request) { request = beforeClientExecution(request); return executeListArchiveRules(request); } @SdkInternalApi final ListArchiveRulesResult executeListArchiveRules(ListArchiveRulesRequest listArchiveRulesRequest) { ExecutionContext executionContext = createExecutionContext(listArchiveRulesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves a list of findings generated by the specified analyzer. *
** To learn about filter keys that you can use to retrieve a list of findings, see IAM Access * Analyzer filter keys in the IAM User Guide. *
* * @param listFindingsRequest * Retrieves a list of findings generated by the specified analyzer. * @return Result of the ListFindings operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ListFindings * @see AWS * API Documentation */ @Override public ListFindingsResult listFindings(ListFindingsRequest request) { request = beforeClientExecution(request); return executeListFindings(request); } @SdkInternalApi final ListFindingsResult executeListFindings(ListFindingsRequest listFindingsRequest) { ExecutionContext executionContext = createExecutionContext(listFindingsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists all of the policy generations requested in the last seven days. *
* * @param listPolicyGenerationsRequest * @return Result of the ListPolicyGenerations operation returned by the service. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ListPolicyGenerations * @see AWS API Documentation */ @Override public ListPolicyGenerationsResult listPolicyGenerations(ListPolicyGenerationsRequest request) { request = beforeClientExecution(request); return executeListPolicyGenerations(request); } @SdkInternalApi final ListPolicyGenerationsResult executeListPolicyGenerations(ListPolicyGenerationsRequest listPolicyGenerationsRequest) { ExecutionContext executionContext = createExecutionContext(listPolicyGenerationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Retrieves a list of tags applied to the specified resource. *
* * @param listTagsForResourceRequest * Retrieves a list of tags applied to the specified resource. * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ListTagsForResource * @see AWS API Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Starts the policy generation request. *
* * @param startPolicyGenerationRequest * @return Result of the StartPolicyGeneration operation returned by the service. * @throws ConflictException * A conflict exception error. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ServiceQuotaExceededException * Service quote met error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.StartPolicyGeneration * @see AWS API Documentation */ @Override public StartPolicyGenerationResult startPolicyGeneration(StartPolicyGenerationRequest request) { request = beforeClientExecution(request); return executeStartPolicyGeneration(request); } @SdkInternalApi final StartPolicyGenerationResult executeStartPolicyGeneration(StartPolicyGenerationRequest startPolicyGenerationRequest) { ExecutionContext executionContext = createExecutionContext(startPolicyGenerationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Immediately starts a scan of the policies applied to the specified resource. *
* * @param startResourceScanRequest * Starts a scan of the policies applied to the specified resource. * @return Result of the StartResourceScan operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.StartResourceScan * @see AWS API Documentation */ @Override public StartResourceScanResult startResourceScan(StartResourceScanRequest request) { request = beforeClientExecution(request); return executeStartResourceScan(request); } @SdkInternalApi final StartResourceScanResult executeStartResourceScan(StartResourceScanRequest startResourceScanRequest) { ExecutionContext executionContext = createExecutionContext(startResourceScanRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Adds a tag to the specified resource. *
* * @param tagResourceRequest * Adds a tag to the specified resource. * @return Result of the TagResource operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.TagResource * @see AWS API * Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Removes a tag from the specified resource. *
* * @param untagResourceRequest * Removes a tag from the specified resource. * @return Result of the UntagResource operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.UntagResource * @see AWS * API Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Updates the criteria and values for the specified archive rule. *
* * @param updateArchiveRuleRequest * Updates the specified archive rule. * @return Result of the UpdateArchiveRule operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.UpdateArchiveRule * @see AWS API Documentation */ @Override public UpdateArchiveRuleResult updateArchiveRule(UpdateArchiveRuleRequest request) { request = beforeClientExecution(request); return executeUpdateArchiveRule(request); } @SdkInternalApi final UpdateArchiveRuleResult executeUpdateArchiveRule(UpdateArchiveRuleRequest updateArchiveRuleRequest) { ExecutionContext executionContext = createExecutionContext(updateArchiveRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Updates the status for the specified findings. *
* * @param updateFindingsRequest * Updates findings with the new values provided in the request. * @return Result of the UpdateFindings operation returned by the service. * @throws ResourceNotFoundException * The specified resource could not be found. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.UpdateFindings * @see AWS * API Documentation */ @Override public UpdateFindingsResult updateFindings(UpdateFindingsRequest request) { request = beforeClientExecution(request); return executeUpdateFindings(request); } @SdkInternalApi final UpdateFindingsResult executeUpdateFindings(UpdateFindingsRequest updateFindingsRequest) { ExecutionContext executionContext = createExecutionContext(updateFindingsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Requests the validation of a policy and returns a list of findings. The findings help you identify issues and * provide actionable recommendations to resolve the issue and enable you to author functional policies that meet * security best practices. *
* * @param validatePolicyRequest * @return Result of the ValidatePolicy operation returned by the service. * @throws ValidationException * Validation exception error. * @throws InternalServerException * Internal server error. * @throws ThrottlingException * Throttling limit exceeded error. * @throws AccessDeniedException * You do not have sufficient access to perform this action. * @sample AWSAccessAnalyzer.ValidatePolicy * @see AWS * API Documentation */ @Override public ValidatePolicyResult validatePolicy(ValidatePolicyRequest request) { request = beforeClientExecution(request); return executeValidatePolicy(request); } @SdkInternalApi final ValidatePolicyResult executeValidatePolicy(ValidatePolicyRequest validatePolicyRequest) { ExecutionContext executionContext = createExecutionContext(validatePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic
* information for an executed request, you should use this method to retrieve it as soon as possible after
* executing the request.
*
* @param request
* The originally executed request
*
* @return The response metadata for the specified request, or null if none is available.
*/
public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) {
return client.getResponseMetadataForRequest(request);
}
/**
* Normal invoke with authentication. Credentials are required and may be overriden at the request level.
**/
private