Documentation
¶
Index ¶
- func FindAutoScaleGroups(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindBatchComputeEnvironments(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindBatchJobQueues(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindCloudFrontConnectionGroups(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindCloudFrontDistributionTenants(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindCloudWatchLogGroups(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindDbInstances(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindDbSnapshots(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindDynamodbTables(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2Addresses(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2Instances(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2RouteTables(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2SecurityGroups(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2Snapshots(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2Subnets(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2Volumes(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2VpcEndpoints(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEc2Vpcs(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEcsClusters(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEcsServices(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEfsFileSystems(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEksClusters(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEmrClusters(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEmrServerlessApplications(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindEmrServerlessJobRuns(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindGenericResources(ctx context.Context, client *v3.Client, dc *cache.DataCache, ...) ([]service.ResourceInterface, error)
- func FindGlueDatabases(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindGlueJobs(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindGlueTables(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindIamUsers(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindLambdaFunctions(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindLoadBalancers(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindRoute53DomainSummaries(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindRoute53Domains(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindRoute53HostedZones(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindRoute53ResourceRecords(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindS3Buckets(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindSecretManagerSecrets(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindSnsTopics(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- func FindSqsQueues(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
- type GenericRepoProxy
- type RepoProxy
- func (e *RepoProxy) FindAll(resourceType cfg.ResourceType) (items []service.ResourceInterface, err error)
- func (e *RepoProxy) FindAllCC(resourceType cfg.ResourceType) ([]service.ResourceInterface, error)
- func (e *RepoProxy) Generic(detailed bool) *GenericRepoProxy
- func (e RepoProxy) GetAccountID() ptypes.AwsAccountID
- func (e RepoProxy) GetClient() *v3.Client
- func (e *RepoProxy) GetContext() context.Context
- func (e RepoProxy) GetRegion() ptypes.AwsRegion
- func (e *RepoProxy) WithCache(dc *cache.DataCache) *RepoProxy
- type RepoProxyInterface
- type RepoProxyPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindAutoScaleGroups ¶
func FindAutoScaleGroups(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindAutoScaleGroups returns a list of Auto Scaling groups
func FindBatchComputeEnvironments ¶
func FindBatchComputeEnvironments(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindBatchComputeEnvironments returns a list of Batch compute environments
func FindBatchJobQueues ¶
func FindBatchJobQueues(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindBatchJobQueues returns a list of Batch job queues
func FindCloudFrontConnectionGroups ¶ added in v0.5.0
func FindCloudFrontConnectionGroups(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindCloudFrontConnectionGroups returns a list of CloudFront connection groups
func FindCloudFrontDistributionTenants ¶ added in v0.5.0
func FindCloudFrontDistributionTenants(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindCloudFrontDistributionTenants returns a list of CloudFront distribution tenants. Certificate state is not part of the list response and is therefore not included here — read it per tenant via GetManagedCertificateDetails.
func FindCloudWatchLogGroups ¶
func FindCloudWatchLogGroups(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindCloudWatchLogGroups returns a list of CloudWatch log groups
func FindDbInstances ¶
func FindDbInstances(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindDbInstances returns a list of RDS instances
func FindDbSnapshots ¶
func FindDbSnapshots(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindDbSnapshots returns a list of RDS snapshots
func FindDynamodbTables ¶
func FindDynamodbTables(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindDynamodbTables returns a list of DynamoDB tables
func FindEc2Addresses ¶ added in v0.6.0
func FindEc2Addresses(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2Addresses returns a list of Elastic IPs, each carrying its public and, when associated, its private address
func FindEc2Instances ¶
func FindEc2Instances(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2Instances returns a list of EC2 instances
func FindEc2RouteTables ¶ added in v0.6.0
func FindEc2RouteTables(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2RouteTables returns a list of VPC route tables
func FindEc2SecurityGroups ¶ added in v0.6.0
func FindEc2SecurityGroups(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2SecurityGroups returns a list of security groups
func FindEc2Snapshots ¶
func FindEc2Snapshots(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2Snapshots returns a list of EBS snapshots
func FindEc2Subnets ¶ added in v0.6.0
func FindEc2Subnets(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2Subnets returns a list of VPC subnets
func FindEc2Volumes ¶
func FindEc2Volumes(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2Volumes returns a list of EBS volumes
func FindEc2VpcEndpoints ¶ added in v0.6.0
func FindEc2VpcEndpoints(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2VpcEndpoints returns a list of VPC endpoints
func FindEc2Vpcs ¶
func FindEc2Vpcs(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEc2Vpcs returns a list of VPC
func FindEcsClusters ¶
func FindEcsClusters(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEcsClusters returns a list of ECS clusters
func FindEcsServices ¶
func FindEcsServices(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEcsServices returns a list of ECS services
func FindEfsFileSystems ¶
func FindEfsFileSystems(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEfsFileSystems returns a list of EFS file systems
func FindEksClusters ¶
func FindEksClusters(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEksClusters returns a list of EKS clusters
func FindEmrClusters ¶
func FindEmrClusters(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEmrClusters returns a list of EMR clusters
func FindEmrServerlessApplications ¶
func FindEmrServerlessApplications(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEmrServerlessApplications returns a list of EMR serverless applications
func FindEmrServerlessJobRuns ¶
func FindEmrServerlessJobRuns(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindEmrServerlessJobRuns returns a list of EMR serverless job runs
func FindGenericResources ¶ added in v0.6.0
func FindGenericResources( ctx context.Context, client *v3.Client, dc *cache.DataCache, resourceType cfg.ResourceType, detailed bool, ) ([]service.ResourceInterface, error)
FindGenericResources returns resources of any type through the Cloud Control API. It is the single implementation behind both RepoProxy.FindAllCC and GenericRepoProxy.FindAll, and the type-agnostic counterpart to the Find* helpers in helper.go: there is one of those per resource type because each wraps a hand-written repository, whereas this one takes the type as an argument.
What it gives up relative to a typed repository, so a caller can decide knowingly:
- No ARN unless the type exposes one as a property. ResourceDescription carries only an opaque identifier and the resource-path segment differs per type (instance/, role/, function:, and S3 omits region and account altogether), so a synthesized ARN would be wrong often enough to be worse than none. GetIdOrArn falls back to the identifier.
- No creation time. Cloud Control does not report one.
- Untyped properties: a map, not an SDK struct.
- No LIST handler for every type, and nested types need a ResourceModel.
detailed adds a GetResource call per item, for types whose LIST handler returns identifiers only. It costs one API call per resource, so leave it off unless the caller needs full properties.
func FindGlueDatabases ¶
func FindGlueDatabases(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindGlueDatabases returns a list of Glue databases
func FindGlueJobs ¶
func FindGlueJobs(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindGlueJobs returns a list of Glue jobs
func FindGlueTables ¶
func FindGlueTables(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindGlueTables returns a list of Glue tables
func FindIamUsers ¶
func FindIamUsers(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindIamUsers returns a list of IAM users
func FindLambdaFunctions ¶
func FindLambdaFunctions(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindLambdaFunctions returns a list of Lambda functions
func FindLoadBalancers ¶
func FindLoadBalancers(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindLoadBalancers returns a list of Load Balancers
func FindRoute53DomainSummaries ¶
func FindRoute53DomainSummaries(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindRoute53DomainSummaries returns a list of Route 53 registered domain summaries
func FindRoute53Domains ¶
func FindRoute53Domains(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindRoute53Domains returns a list of Route 53 registered domains with full details
func FindRoute53HostedZones ¶
func FindRoute53HostedZones(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindRoute53HostedZones returns a list of Route 53 hosted zones
func FindRoute53ResourceRecords ¶
func FindRoute53ResourceRecords(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindRoute53ResourceRecords returns a list of Route 53 resource records across all hosted zones
func FindS3Buckets ¶
func FindS3Buckets(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindS3Buckets returns a list of S3 buckets
func FindSecretManagerSecrets ¶
func FindSecretManagerSecrets(ctx context.Context, client *v3.Client, dc *cache.DataCache) ([]service.ResourceInterface, error)
FindSecretManagerSecrets returns a list of Secrets Manager secrets
Types ¶
type GenericRepoProxy ¶ added in v0.6.0
type GenericRepoProxy struct {
*RepoProxy
// contains filtered or unexported fields
}
GenericRepoProxy answers FindAll for *any* resource type by going through the Cloud Control API, instead of dispatching to a hand-written repository.
It satisfies RepoProxyInterface, which is the whole point: a pool of these drops straight into resources.NewProvider, so the generic path reuses the existing parallel fan-out, streaming reader, cache and global-resource-type collapsing without any of them needing to know it exists. RepoProxy.FindAll and RepoProxy.FindAllCC are left untouched.
Cloud Control is a fallback, not a replacement: types whose registry entry has no LIST handler return an error rather than an empty list, nested types need a ResourceModel this proxy does not supply, and the properties come back as an untyped bag rather than a typed SDK struct.
func (*GenericRepoProxy) FindAll ¶ added in v0.6.0
func (e *GenericRepoProxy) FindAll(resourceType cfg.ResourceType) ([]service.ResourceInterface, error)
FindAll shadows RepoProxy.FindAll with the type-agnostic Cloud Control lookup. It differs from RepoProxy.FindAllCC only in honouring this proxy's detailed setting, which FindAllCC cannot express without breaking FindAll's signature.
func (*GenericRepoProxy) WithCache ¶ added in v0.6.0
func (e *GenericRepoProxy) WithCache(dc *cache.DataCache) *GenericRepoProxy
WithCache mirrors RepoProxy.WithCache so a GenericRepoProxy keeps caching when it goes through RepoProxyPool.WithCache.
type RepoProxy ¶
type RepoProxy struct {
// contains filtered or unexported fields
}
RepoProxy is proxy to aws repositories to get all aws resources
func (*RepoProxy) FindAll ¶
func (e *RepoProxy) FindAll(resourceType cfg.ResourceType) (items []service.ResourceInterface, err error)
func (*RepoProxy) FindAllCC ¶
func (e *RepoProxy) FindAllCC(resourceType cfg.ResourceType) ([]service.ResourceInterface, error)
FindAllCC is the Cloud Control counterpart of FindAll: it resolves *any* resource type through one generic code path, with no per-type case and no hand-written entity.
It deliberately keeps FindAll's exact signature so that replacing the switch above with the Cloud Control approach stays a mechanical substitution. Cloud Control is not a free win, though — see FindGenericResources for what it gives up relative to a typed repository.
func (*RepoProxy) Generic ¶ added in v0.6.0
func (e *RepoProxy) Generic(detailed bool) *GenericRepoProxy
Generic returns a view of this proxy that resolves every resource type through Cloud Control. The underlying client, context and cache are shared.
func (RepoProxy) GetAccountID ¶
func (e RepoProxy) GetAccountID() ptypes.AwsAccountID
func (*RepoProxy) GetContext ¶
type RepoProxyInterface ¶
type RepoProxyInterface interface {
GetAccountID() ptypes.AwsAccountID
GetRegion() ptypes.AwsRegion
GetClient() *v3.Client
GetContext() context.Context
FindAll(resourceType cfg.ResourceType) ([]service.ResourceInterface, error)
}
type RepoProxyPool ¶
type RepoProxyPool struct {
// contains filtered or unexported fields
}
func NewGenericRepoProxyPool ¶ added in v0.6.0
func NewGenericRepoProxyPool(ctx context.Context, clients []*v3.Client, detailed bool) *RepoProxyPool
NewGenericRepoProxyPool builds a pool that resolves every resource type through Cloud Control. Interchangeable with NewRepoProxyPool at the call site.
func NewRepoProxyPool ¶
func NewRepoProxyPool(ctx context.Context, clients []*v3.Client) *RepoProxyPool
func (*RepoProxyPool) List ¶
func (e *RepoProxyPool) List(resourceType cfg.ResourceType) []RepoProxyInterface
func (*RepoProxyPool) WithCache ¶
func (e *RepoProxyPool) WithCache(dc *cache.DataCache) *RepoProxyPool