(cmd *cobra.Command, args []string)
| 919 | } |
| 920 | |
| 921 | func runEndpointsCommand(cmd *cobra.Command, args []string) { |
| 922 | for _, profile := range AWSProfiles { |
| 923 | sharedServiceMap := &awsservicemap.AwsServiceMap{ |
| 924 | JsonFileSource: "DOWNLOAD_FROM_AWS", |
| 925 | } |
| 926 | var AWSConfig = internal.AWSConfigFileLoader(profile, cmd.Root().Version, AWSMFAToken) |
| 927 | caller, err := internal.AWSWhoami(profile, cmd.Root().Version, AWSMFAToken) |
| 928 | if err != nil { |
| 929 | continue |
| 930 | } |
| 931 | m := aws.EndpointsModule{ |
| 932 | APIGatewayClient: apigateway.NewFromConfig(AWSConfig), |
| 933 | APIGatewayv2Client: apigatewayv2.NewFromConfig(AWSConfig), |
| 934 | AppRunnerClient: apprunner.NewFromConfig(AWSConfig), |
| 935 | CloudfrontClient: cloudfront.NewFromConfig(AWSConfig), |
| 936 | EKSClient: eks.NewFromConfig(AWSConfig), |
| 937 | ELBClient: elasticloadbalancing.NewFromConfig(AWSConfig), |
| 938 | ELBv2Client: elasticloadbalancingv2.NewFromConfig(AWSConfig), |
| 939 | GrafanaClient: grafana.NewFromConfig(AWSConfig), |
| 940 | LambdaClient: lambda.NewFromConfig(AWSConfig), |
| 941 | LightsailClient: lightsail.NewFromConfig(AWSConfig), |
| 942 | MQClient: mq.NewFromConfig(AWSConfig), |
| 943 | OpenSearchClient: opensearch.NewFromConfig(AWSConfig), |
| 944 | RDSClient: rds.NewFromConfig(AWSConfig), |
| 945 | RedshiftClient: redshift.NewFromConfig(AWSConfig), |
| 946 | S3Client: s3.NewFromConfig(AWSConfig), |
| 947 | |
| 948 | Caller: *caller, |
| 949 | AWSRegions: internal.GetEnabledRegions(profile, cmd.Root().Version, AWSMFAToken), |
| 950 | AWSProfile: profile, |
| 951 | Goroutines: Goroutines, |
| 952 | WrapTable: AWSWrapTable, |
| 953 | AWSOutputType: AWSOutputType, |
| 954 | AWSTableCols: AWSTableCols, |
| 955 | ServiceMap: sharedServiceMap, |
| 956 | } |
| 957 | m.PrintEndpoints(AWSOutputDirectory, Verbosity) |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | func runEnvsCommand(cmd *cobra.Command, args []string) { |
| 962 | for _, profile := range AWSProfiles { |
nothing calls this directly
no test coverage detected