Documentation ¶
Overview ¶
Code generated by codegen; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func AccountMultiplex(meta schema.ClientMeta) []schema.ClientMeta
- func AwsMockTestHelper(t *testing.T, table *schema.Table, ...)
- func Configure(ctx context.Context, logger zerolog.Logger, spec specs.Source, ...) (schema.ClientMeta, error)
- func CustomConfig(config aws.Config) plugins.SourceNewExecutionClientFunc
- func IgnoreAccessDeniedServiceDisabled(err error) bool
- func IgnoreCommonErrors(err error) bool
- func IgnoreNotAvailableRegion(err error) bool
- func IgnoreWithInvalidAction(err error) bool
- func IsAWSError(err error, code ...string) bool
- func IsInvalidParameterValueError(err error) bool
- func RegionsPartition(region string) (string, bool)
- func ResolveARN(service AWSService, ...) schema.ColumnResolver
- func ResolveARNGlobal(service AWSService, ...) schema.ColumnResolver
- func ResolveARNWithAccount(service AWSService, ...) schema.ColumnResolver
- func ResolveARNWithRegion(service AWSService, ...) schema.ColumnResolver
- func ResolveAWSAccount(_ context.Context, meta schema.ClientMeta, r *schema.Resource, _ schema.Column) error
- func ResolveAWSNamespace(_ context.Context, meta schema.ClientMeta, r *schema.Resource, _ schema.Column) error
- func ResolveAWSRegion(_ context.Context, meta schema.ClientMeta, r *schema.Resource, _ schema.Column) error
- func ResolveTagField(fieldName string) ...
- func ResolveTags(ctx context.Context, meta schema.ClientMeta, r *schema.Resource, ...) error
- func ResolveWAFScope(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error
- func ServiceAccountRegionMultiplexer(service string) func(meta schema.ClientMeta) []schema.ClientMeta
- func ServiceAccountRegionNamespaceMultiplexer(service string) func(meta schema.ClientMeta) []schema.ClientMeta
- func ServiceAccountRegionScopeMultiplexer(service string) func(meta schema.ClientMeta) []schema.ClientMeta
- func Sleep(ctx context.Context, dur time.Duration) error
- func StaticValueResolver(value any) schema.ColumnResolver
- func TagsIntoMap(tagSlice any, dst map[string]string)
- func TagsToMap(tagSlice any) map[string]string
- type AWSService
- type Account
- type AssumeRoleAPIClient
- type AwsLogger
- type AwsPartition
- type AwsService
- type Client
- type DetailResolverFunc
- type ListResolverFunc
- type NoRateLimiter
- type Services
- type ServicesManager
- func (s *ServicesManager) InitServicesForPartitionAccountAndRegion(partition, accountId, region string, svcs Services)
- func (s *ServicesManager) InitServicesForPartitionAccountAndScope(partition, accountId string, svcs Services)
- func (s *ServicesManager) ServicesByAccountForWAFScope(partition, accountId string) *Services
- func (s *ServicesManager) ServicesByPartitionAccountAndRegion(partition, accountId, region string) *Services
- type ServicesPartitionAccountRegionMap
- type Spec
- type SupportedServiceRegionsData
- type TestOptions
Constants ¶
const (
PartitionServiceRegionFile = "data/partition_service_region.json"
)
Variables ¶
var AllNamespaces = []string{
"comprehend", "rds", "sagemaker", "appstream", "elasticmapreduce", "dynamodb", "lambda", "ecs", "cassandra", "ec2", "neptune", "kafka", "custom-resource", "elasticache",
}
Functions ¶
func AccountMultiplex ¶
func AccountMultiplex(meta schema.ClientMeta) []schema.ClientMeta
func AwsMockTestHelper ¶
func AwsMockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, *gomock.Controller) Services, _ TestOptions)
func CustomConfig ¶
func CustomConfig(config aws.Config) plugins.SourceNewExecutionClientFunc
func IgnoreCommonErrors ¶
func IgnoreWithInvalidAction ¶
func IsAWSError ¶
func RegionsPartition ¶
func ResolveARN ¶
func ResolveARN(service AWSService, resourceID func(resource *schema.Resource) ([]string, error)) schema.ColumnResolver
ResolveARN returns a column resolver that will set a field value to a proper ARN based on provided AWS service and resource id value returned by resourceID function. Region and account id are set to the values of the client.
func ResolveARNGlobal ¶
func ResolveARNGlobal(service AWSService, resourceID func(resource *schema.Resource) ([]string, error)) schema.ColumnResolver
ResolveARNGlobal returns a column resolver that will set a field value to a proper ARN based on provided AWS service and resource id value returned by resourceID function. Region and account id are left empty.
func ResolveARNWithAccount ¶
func ResolveARNWithAccount(service AWSService, resourceID func(resource *schema.Resource) ([]string, error)) schema.ColumnResolver
ResolveARNWithAccount returns a column resolver that will set a field value to a proper ARN based on provided AWS service and resource id value returned by resourceID function. Region is left empty and account id is set to the value of the client.
func ResolveARNWithRegion ¶
func ResolveARNWithRegion(service AWSService, resourceID func(resource *schema.Resource) ([]string, error)) schema.ColumnResolver
ResolveARNWithRegion returns a column resolver that will set a field value to a proper ARN based on provided AWS service and resource id value returned by resourceID function. Region is set to the value of the client and account id is left empty.
func ResolveAWSAccount ¶
func ResolveAWSNamespace ¶
func ResolveAWSRegion ¶
func ResolveTagField ¶
func ResolveTags ¶
func ResolveWAFScope ¶
func ServiceAccountRegionMultiplexer ¶
func ServiceAccountRegionMultiplexer(service string) func(meta schema.ClientMeta) []schema.ClientMeta
func ServiceAccountRegionNamespaceMultiplexer ¶
func ServiceAccountRegionNamespaceMultiplexer(service string) func(meta schema.ClientMeta) []schema.ClientMeta
func ServiceAccountRegionScopeMultiplexer ¶
func ServiceAccountRegionScopeMultiplexer(service string) func(meta schema.ClientMeta) []schema.ClientMeta
func StaticValueResolver ¶
func StaticValueResolver(value any) schema.ColumnResolver
func TagsIntoMap ¶
TagsIntoMap expects []T (usually "[]Tag") where T has "Key" and "Value" fields (of type string or *string) and writes them into the given map
Types ¶
type AWSService ¶
type AWSService string
const ( ApigatewayService AWSService = "apigateway" Athena AWSService = "athena" CloudformationService AWSService = "cloudformation" CloudfrontService AWSService = "cloudfront" CognitoIdentityService AWSService = "cognito-identity" DirectConnectService AWSService = "directconnect" DynamoDBService AWSService = "dynamodb" EC2Service AWSService = "ec2" EFSService AWSService = "elasticfilesystem" ElasticLoadBalancingService AWSService = "elasticloadbalancing" GlueService AWSService = "glue" GuardDutyService AWSService = "guardduty" IamService AWSService = "iam" RedshiftService AWSService = "redshift" Route53Service AWSService = "route53" S3Service AWSService = "s3" SESService AWSService = "ses" WAFRegional AWSService = "waf-regional" WorkspacesService AWSService = "workspaces" )
type AssumeRoleAPIClient ¶
type AssumeRoleAPIClient interface {
AssumeRole(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error)
}
type AwsPartition ¶
type AwsPartition struct { Id string `json:"partition"` Name string `json:"partitionName"` Services map[string]*AwsService `json:"services"` }
type AwsService ¶
type Client ¶
type Client struct { // Those are already normalized values after configure and this is why we don't want to hold // config directly. ServicesManager ServicesManager // this is set by table clientList AccountID string Region string AutoscalingNamespace string WAFScope wafv2types.Scope Partition string // contains filtered or unexported fields }
func NewAwsClient ¶
func (*Client) IsAccessDeniedError ¶
IsAccessDeniedError checks if api error should be classified as a permissions issue
func (*Client) IsNotFoundError ¶
IsNotFoundError checks if api error should be ignored
type DetailResolverFunc ¶
type DetailResolverFunc func(ctx context.Context, meta schema.ClientMeta, resultsChan chan<- any, errorChan chan<- error, summary any)
DetailResolveFunc is responsible for grabbing any and all metadata for a resource. All errors should be sent to the error channel.
type ListResolverFunc ¶
type ListResolverFunc func(ctx context.Context, meta schema.ClientMeta, detailChan chan<- any) error
ListResolver is responsible for iterating through entire list of resources that should be grabbed (if API is paginated). It should send list of items via the `resultsChan` so that the DetailResolver can grab the details of each item. All errors should be sent to the error channel.
type NoRateLimiter ¶
type NoRateLimiter struct { }
func (*NoRateLimiter) AddTokens ¶
func (*NoRateLimiter) AddTokens(uint) error
type Services ¶
type Services struct { Accessanalyzer services.AccessanalyzerClient Account services.AccountClient Acm services.AcmClient Apigateway services.ApigatewayClient Apigatewayv2 services.Apigatewayv2Client Applicationautoscaling services.ApplicationautoscalingClient Apprunner services.ApprunnerClient Appstream services.AppstreamClient Appsync services.AppsyncClient Athena services.AthenaClient Autoscaling services.AutoscalingClient Backup services.BackupClient Cloudformation services.CloudformationClient Cloudfront services.CloudfrontClient Cloudhsmv2 services.Cloudhsmv2Client Cloudtrail services.CloudtrailClient Cloudwatch services.CloudwatchClient Cloudwatchlogs services.CloudwatchlogsClient Codebuild services.CodebuildClient Codepipeline services.CodepipelineClient Cognitoidentity services.CognitoidentityClient Cognitoidentityprovider services.CognitoidentityproviderClient Configservice services.ConfigserviceClient Databasemigrationservice services.DatabasemigrationserviceClient Dax services.DaxClient Directconnect services.DirectconnectClient Docdb services.DocdbClient Dynamodb services.DynamodbClient Ec2 services.Ec2Client Ecr services.EcrClient Ecrpublic services.EcrpublicClient Ecs services.EcsClient Efs services.EfsClient Eks services.EksClient Elasticache services.ElasticacheClient Elasticbeanstalk services.ElasticbeanstalkClient Elasticloadbalancing services.ElasticloadbalancingClient Elasticloadbalancingv2 services.Elasticloadbalancingv2Client Elasticsearchservice services.ElasticsearchserviceClient Emr services.EmrClient Eventbridge services.EventbridgeClient Firehose services.FirehoseClient Frauddetector services.FrauddetectorClient Fsx services.FsxClient Glacier services.GlacierClient Glue services.GlueClient Guardduty services.GuarddutyClient Iam services.IamClient Identitystore services.IdentitystoreClient Inspector services.InspectorClient Inspector2 services.Inspector2Client Iot services.IotClient Kafka services.KafkaClient Kinesis services.KinesisClient Kms services.KmsClient Lambda services.LambdaClient Lightsail services.LightsailClient Mq services.MqClient Mwaa services.MwaaClient Neptune services.NeptuneClient Organizations services.OrganizationsClient Qldb services.QldbClient Quicksight services.QuicksightClient Ram services.RamClient Rds services.RdsClient Redshift services.RedshiftClient Resourcegroups services.ResourcegroupsClient Route53 services.Route53Client Route53domains services.Route53domainsClient S3 services.S3Client S3control services.S3controlClient Sagemaker services.SagemakerClient Scheduler services.SchedulerClient Secretsmanager services.SecretsmanagerClient Servicecatalog services.ServicecatalogClient Servicecatalogappregistry services.ServicecatalogappregistryClient Servicequotas services.ServicequotasClient Sesv2 services.Sesv2Client Sfn services.SfnClient Shield services.ShieldClient Sns services.SnsClient Sqs services.SqsClient Ssm services.SsmClient Ssoadmin services.SsoadminClient Timestreamwrite services.TimestreamwriteClient Transfer services.TransferClient Waf services.WafClient Wafregional services.WafregionalClient Wafv2 services.Wafv2Client Workspaces services.WorkspacesClient Xray services.XrayClient S3manager services.S3managerClient }
type ServicesManager ¶
type ServicesManager struct {
// contains filtered or unexported fields
}
ServicesManager will hold the entire map of (account X region) services
func (*ServicesManager) InitServicesForPartitionAccountAndRegion ¶
func (s *ServicesManager) InitServicesForPartitionAccountAndRegion(partition, accountId, region string, svcs Services)
func (*ServicesManager) InitServicesForPartitionAccountAndScope ¶
func (s *ServicesManager) InitServicesForPartitionAccountAndScope(partition, accountId string, svcs Services)
func (*ServicesManager) ServicesByAccountForWAFScope ¶
func (s *ServicesManager) ServicesByAccountForWAFScope(partition, accountId string) *Services
func (*ServicesManager) ServicesByPartitionAccountAndRegion ¶
func (s *ServicesManager) ServicesByPartitionAccountAndRegion(partition, accountId, region string) *Services
type ServicesPartitionAccountRegionMap ¶
func (ServicesPartitionAccountRegionMap) Accounts ¶
func (s ServicesPartitionAccountRegionMap) Accounts() []string
type SupportedServiceRegionsData ¶
type SupportedServiceRegionsData struct { Partitions map[string]AwsPartition `json:"partitions"` // contains filtered or unexported fields }
func ReadSupportedServiceRegions ¶
func ReadSupportedServiceRegions() *SupportedServiceRegionsData
type TestOptions ¶
type TestOptions struct{}