accessanalyzer – github.com/aws/aws-sdk-go-v2/service/accessanalyzer Index | Files | Directories

package accessanalyzer

import "github.com/aws/aws-sdk-go-v2/service/accessanalyzer"

Package accessanalyzer provides the API client, operations, and parameter types for Access Analyzer.

AWS IAM 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 AWS environment. An external principal can be another AWS account, a root user, an IAM user or role, a federated user, an AWS service, or an anonymous user. This guide describes the AWS IAM Access Analyzer operations that you can call programmatically. For general information about Access Analyzer, see the AWS IAM Access Analyzer section of the IAM User Guide (https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html). To start using Access Analyzer, you first need to create an analyzer.

Index

Constants

const ServiceAPIVersion = "2019-11-01"
const ServiceID = "AccessAnalyzer"

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for Access Analyzer.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) CreateAnalyzer

func (c *Client) CreateAnalyzer(ctx context.Context, params *CreateAnalyzerInput, optFns ...func(*Options)) (*CreateAnalyzerOutput, error)

Creates an analyzer for your account.

func (*Client) CreateArchiveRule

func (c *Client) CreateArchiveRule(ctx context.Context, params *CreateArchiveRuleInput, optFns ...func(*Options)) (*CreateArchiveRuleOutput, error)

Creates an archive rule for the specified analyzer. Archive rules automatically archive findings that meet the criteria you define when you create the rule.

func (*Client) DeleteAnalyzer

func (c *Client) DeleteAnalyzer(ctx context.Context, params *DeleteAnalyzerInput, optFns ...func(*Options)) (*DeleteAnalyzerOutput, error)

Deletes the specified analyzer. When you delete an analyzer, Access Analyzer is disabled for the account in the current or specific Region. All findings that were generated by the analyzer are deleted. You cannot undo this action.

func (*Client) DeleteArchiveRule

func (c *Client) DeleteArchiveRule(ctx context.Context, params *DeleteArchiveRuleInput, optFns ...func(*Options)) (*DeleteArchiveRuleOutput, error)

Deletes the specified archive rule.

func (*Client) GetAnalyzedResource

func (c *Client) GetAnalyzedResource(ctx context.Context, params *GetAnalyzedResourceInput, optFns ...func(*Options)) (*GetAnalyzedResourceOutput, error)

Retrieves information about a resource that was analyzed.

func (*Client) GetAnalyzer

func (c *Client) GetAnalyzer(ctx context.Context, params *GetAnalyzerInput, optFns ...func(*Options)) (*GetAnalyzerOutput, error)

Retrieves information about the specified analyzer.

func (*Client) GetArchiveRule

func (c *Client) GetArchiveRule(ctx context.Context, params *GetArchiveRuleInput, optFns ...func(*Options)) (*GetArchiveRuleOutput, error)

Retrieves information about an archive rule.

func (*Client) GetFinding

func (c *Client) GetFinding(ctx context.Context, params *GetFindingInput, optFns ...func(*Options)) (*GetFindingOutput, error)

Retrieves information about the specified finding.

func (*Client) ListAnalyzedResources

func (c *Client) ListAnalyzedResources(ctx context.Context, params *ListAnalyzedResourcesInput, optFns ...func(*Options)) (*ListAnalyzedResourcesOutput, error)

Retrieves a list of resources of the specified type that have been analyzed by the specified analyzer..

func (*Client) ListAnalyzers

func (c *Client) ListAnalyzers(ctx context.Context, params *ListAnalyzersInput, optFns ...func(*Options)) (*ListAnalyzersOutput, error)

Retrieves a list of analyzers.

func (*Client) ListArchiveRules

func (c *Client) ListArchiveRules(ctx context.Context, params *ListArchiveRulesInput, optFns ...func(*Options)) (*ListArchiveRulesOutput, error)

Retrieves a list of archive rules created for the specified analyzer.

func (*Client) ListFindings

func (c *Client) ListFindings(ctx context.Context, params *ListFindingsInput, optFns ...func(*Options)) (*ListFindingsOutput, error)

Retrieves a list of findings generated by the specified analyzer.

func (*Client) ListTagsForResource

func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)

Retrieves a list of tags applied to the specified resource.

func (*Client) StartResourceScan

func (c *Client) StartResourceScan(ctx context.Context, params *StartResourceScanInput, optFns ...func(*Options)) (*StartResourceScanOutput, error)

Immediately starts a scan of the policies applied to the specified resource.

func (*Client) TagResource

func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)

Adds a tag to the specified resource.

func (*Client) UntagResource

func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)

Removes a tag from the specified resource.

func (*Client) UpdateArchiveRule

func (c *Client) UpdateArchiveRule(ctx context.Context, params *UpdateArchiveRuleInput, optFns ...func(*Options)) (*UpdateArchiveRuleOutput, error)

Updates the criteria and values for the specified archive rule.

func (*Client) UpdateFindings

func (c *Client) UpdateFindings(ctx context.Context, params *UpdateFindingsInput, optFns ...func(*Options)) (*UpdateFindingsOutput, error)

Updates the status for the specified findings.

type CreateAnalyzerInput

type CreateAnalyzerInput struct {

	// The name of the analyzer to create.
	//
	// This member is required.
	AnalyzerName *string

	// The type of analyzer to create. Only ACCOUNT analyzers are supported. You can
	// create only one analyzer per account per Region.
	//
	// This member is required.
	Type types.Type

	// Specifies the archive rules to add for the analyzer. Archive rules automatically
	// archive findings that meet the criteria you define for the rule.
	ArchiveRules []*types.InlineArchiveRule

	// A client token.
	ClientToken *string

	// The tags to apply to the analyzer.
	Tags map[string]*string
}

Creates an analyzer.

type CreateAnalyzerOutput

type CreateAnalyzerOutput struct {

	// The ARN of the analyzer that was created by the request.
	Arn *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request to create an analyzer.

type CreateArchiveRuleInput

type CreateArchiveRuleInput struct {

	// The name of the created analyzer.
	//
	// This member is required.
	AnalyzerName *string

	// The criteria for the rule.
	//
	// This member is required.
	Filter map[string]*types.Criterion

	// The name of the rule to create.
	//
	// This member is required.
	RuleName *string

	// A client token.
	ClientToken *string
}

Creates an archive rule.

type CreateArchiveRuleOutput

type CreateArchiveRuleOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteAnalyzerInput

type DeleteAnalyzerInput struct {

	// The name of the analyzer to delete.
	//
	// This member is required.
	AnalyzerName *string

	// A client token.
	ClientToken *string
}

Deletes an analyzer.

type DeleteAnalyzerOutput

type DeleteAnalyzerOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteArchiveRuleInput

type DeleteArchiveRuleInput struct {

	// The name of the analyzer that associated with the archive rule to delete.
	//
	// This member is required.
	AnalyzerName *string

	// The name of the rule to delete.
	//
	// This member is required.
	RuleName *string

	// A client token.
	ClientToken *string
}

Deletes an archive rule.

type DeleteArchiveRuleOutput

type DeleteArchiveRuleOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options ResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func WithEndpointResolver

func WithEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver

WithEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided fallbackResolver for resolution. awsResolver and fallbackResolver must not be nil

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options ResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options ResolverOptions) (endpoint aws.Endpoint, err error)

type GetAnalyzedResourceInput

type GetAnalyzedResourceInput struct {

	// The ARN of the analyzer to retrieve information from.
	//
	// This member is required.
	AnalyzerArn *string

	// The ARN of the resource to retrieve information about.
	//
	// This member is required.
	ResourceArn *string
}

Retrieves an analyzed resource.

type GetAnalyzedResourceOutput

type GetAnalyzedResourceOutput struct {

	// An AnalyedResource object that contains information that Access Analyzer found
	// when it analyzed the resource.
	Resource *types.AnalyzedResource

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type GetAnalyzerInput

type GetAnalyzerInput struct {

	// The name of the analyzer retrieved.
	//
	// This member is required.
	AnalyzerName *string
}

Retrieves an analyzer.

type GetAnalyzerOutput

type GetAnalyzerOutput struct {

	// An AnalyzerSummary object that contains information about the analyzer.
	//
	// This member is required.
	Analyzer *types.AnalyzerSummary

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type GetArchiveRuleInput

type GetArchiveRuleInput struct {

	// The name of the analyzer to retrieve rules from.
	//
	// This member is required.
	AnalyzerName *string

	// The name of the rule to retrieve.
	//
	// This member is required.
	RuleName *string
}

Retrieves an archive rule.

type GetArchiveRuleOutput

type GetArchiveRuleOutput struct {

	// Contains information about an archive rule.
	//
	// This member is required.
	ArchiveRule *types.ArchiveRuleSummary

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type GetFindingInput

type GetFindingInput struct {

	// The ARN of the analyzer that generated the finding.
	//
	// This member is required.
	AnalyzerArn *string

	// The ID of the finding to retrieve.
	//
	// This member is required.
	Id *string
}

Retrieves a finding.

type GetFindingOutput

type GetFindingOutput struct {

	// A finding object that contains finding details.
	Finding *types.Finding

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time) error
}

type IdempotencyTokenProvider

type IdempotencyTokenProvider interface {
	GetIdempotencyToken() (string, error)
}

IdempotencyTokenProvider interface for providing idempotency token

type ListAnalyzedResourcesInput

type ListAnalyzedResourcesInput struct {

	// The ARN of the analyzer to retrieve a list of analyzed resources from.
	//
	// This member is required.
	AnalyzerArn *string

	// The maximum number of results to return in the response.
	MaxResults *int32

	// A token used for pagination of results returned.
	NextToken *string

	// The type of resource.
	ResourceType types.ResourceType
}

Retrieves a list of resources that have been analyzed.

type ListAnalyzedResourcesOutput

type ListAnalyzedResourcesOutput struct {

	// A list of resources that were analyzed.
	//
	// This member is required.
	AnalyzedResources []*types.AnalyzedResourceSummary

	// A token used for pagination of results returned.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type ListAnalyzersInput

type ListAnalyzersInput struct {

	// The maximum number of results to return in the response.
	MaxResults *int32

	// A token used for pagination of results returned.
	NextToken *string

	// The type of analyzer.
	Type types.Type
}

Retrieves a list of analyzers.

type ListAnalyzersOutput

type ListAnalyzersOutput struct {

	// The analyzers retrieved.
	//
	// This member is required.
	Analyzers []*types.AnalyzerSummary

	// A token used for pagination of results returned.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type ListArchiveRulesInput

type ListArchiveRulesInput struct {

	// The name of the analyzer to retrieve rules from.
	//
	// This member is required.
	AnalyzerName *string

	// The maximum number of results to return in the request.
	MaxResults *int32

	// A token used for pagination of results returned.
	NextToken *string
}

Retrieves a list of archive rules created for the specified analyzer.

type ListArchiveRulesOutput

type ListArchiveRulesOutput struct {

	// A list of archive rules created for the specified analyzer.
	//
	// This member is required.
	ArchiveRules []*types.ArchiveRuleSummary

	// A token used for pagination of results returned.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type ListFindingsInput

type ListFindingsInput struct {

	// The ARN of the analyzer to retrieve findings from.
	//
	// This member is required.
	AnalyzerArn *string

	// A filter to match for the findings to return.
	Filter map[string]*types.Criterion

	// The maximum number of results to return in the response.
	MaxResults *int32

	// A token used for pagination of results returned.
	NextToken *string

	// The sort order for the findings returned.
	Sort *types.SortCriteria
}

Retrieves a list of findings generated by the specified analyzer.

type ListFindingsOutput

type ListFindingsOutput struct {

	// A list of findings retrieved from the analyzer that match the filter criteria
	// specified, if any.
	//
	// This member is required.
	Findings []*types.FindingSummary

	// A token used for pagination of results returned.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type ListTagsForResourceInput

type ListTagsForResourceInput struct {

	// The ARN of the resource to retrieve tags from.
	//
	// This member is required.
	ResourceArn *string
}

Retrieves a list of tags applied to the specified resource.

type ListTagsForResourceOutput

type ListTagsForResourceOutput struct {

	// The tags that are applied to the specified resource.
	Tags map[string]*string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions ResolverOptions

	// The service endpoint resolver.
	EndpointResolver EndpointResolver

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// Provides idempotency tokens values that will be automatically populated into
	// idempotent API operations.
	IdempotencyTokenProvider IdempotencyTokenProvider

	// The region to send requests to. (Required)
	Region string

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer.
	Retryer retry.Retryer

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  ResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type ResolverOptions

type ResolverOptions = internalendpoints.Options

ResolverOptions is the service endpoint resolver options

type StartResourceScanInput

type StartResourceScanInput struct {

	// The ARN of the analyzer to use to scan the policies applied to the specified
	// resource.
	//
	// This member is required.
	AnalyzerArn *string

	// The ARN of the resource to scan.
	//
	// This member is required.
	ResourceArn *string
}

Starts a scan of the policies applied to the specified resource.

type StartResourceScanOutput

type StartResourceScanOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type TagResourceInput

type TagResourceInput struct {

	// The ARN of the resource to add the tag to.
	//
	// This member is required.
	ResourceArn *string

	// The tags to add to the resource.
	//
	// This member is required.
	Tags map[string]*string
}

Adds a tag to the specified resource.

type TagResourceOutput

type TagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type UntagResourceInput

type UntagResourceInput struct {

	// The ARN of the resource to remove the tag from.
	//
	// This member is required.
	ResourceArn *string

	// The key for the tag to add.
	//
	// This member is required.
	TagKeys []*string
}

Removes a tag from the specified resource.

type UntagResourceOutput

type UntagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

The response to the request.

type UpdateArchiveRuleInput

type UpdateArchiveRuleInput struct {

	// The name of the analyzer to update the archive rules for.
	//
	// This member is required.
	AnalyzerName *string

	// A filter to match for the rules to update. Only rules that match the filter are
	// updated.
	//
	// This member is required.
	Filter map[string]*types.Criterion

	// The name of the rule to update.
	//
	// This member is required.
	RuleName *string

	// A client token.
	ClientToken *string
}

Updates the specified archive rule.

type UpdateArchiveRuleOutput

type UpdateArchiveRuleOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type UpdateFindingsInput

type UpdateFindingsInput struct {

	// The ARN of the analyzer that generated the findings to update.
	//
	// This member is required.
	AnalyzerArn *string

	// The state represents the action to take to update the finding Status. Use
	// ARCHIVE to change an Active finding to an Archived finding. Use ACTIVE to change
	// an Archived finding to an Active finding.
	//
	// This member is required.
	Status types.FindingStatusUpdate

	// A client token.
	ClientToken *string

	// The IDs of the findings to update.
	Ids []*string

	// The ARN of the resource identified in the finding.
	ResourceArn *string
}

Updates findings with the new values provided in the request.

type UpdateFindingsOutput

type UpdateFindingsOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

Source Files

api_client.go api_op_CreateAnalyzer.go api_op_CreateArchiveRule.go api_op_DeleteAnalyzer.go api_op_DeleteArchiveRule.go api_op_GetAnalyzedResource.go api_op_GetAnalyzer.go api_op_GetArchiveRule.go api_op_GetFinding.go api_op_ListAnalyzedResources.go api_op_ListAnalyzers.go api_op_ListArchiveRules.go api_op_ListFindings.go api_op_ListTagsForResource.go api_op_StartResourceScan.go api_op_TagResource.go api_op_UntagResource.go api_op_UpdateArchiveRule.go api_op_UpdateFindings.go deserializers.go doc.go endpoints.go serializers.go validators.go

Directories

PathSynopsis
internal
types
Version
v0.27.0
Published
Oct 17, 2020
Platform
windows/amd64
Imports
29 packages
Last checked
1 week ago

Tools for package owners.