public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonAppConfigConfig config = new AmazonAppConfigConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonAppConfigClient client = new AmazonAppConfigClient(creds, config);

            ListApplicationsResponse resp = new ListApplicationsResponse();

            do
            {
                ListApplicationsRequest req = new ListApplicationsRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.ListApplications(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.Items)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Ejemplo n.º 2
0
        public void AppConfigGetDeployment()
        {
            #region to-retrieve-deployment-details-1633976766883

            var client   = new AmazonAppConfigClient();
            var response = client.GetDeployment(new GetDeploymentRequest
            {
                ApplicationId    = "339ohji",
                DeploymentNumber = 1,
                EnvironmentId    = "54j1r29"
            });

            string   applicationId               = response.ApplicationId;
            DateTime completedAt                 = response.CompletedAt;
            string   configurationLocationUri    = response.ConfigurationLocationUri;
            string   configurationName           = response.ConfigurationName;
            string   configurationProfileId      = response.ConfigurationProfileId;
            string   configurationVersion        = response.ConfigurationVersion;
            int      deploymentDurationInMinutes = response.DeploymentDurationInMinutes;
            int      deploymentNumber            = response.DeploymentNumber;
            string   deploymentStrategyId        = response.DeploymentStrategyId;
            string   environmentId               = response.EnvironmentId;
            List <DeploymentEvent> eventLog      = response.EventLog;
            int      finalBakeTimeInMinutes      = response.FinalBakeTimeInMinutes;
            float    growthFactor                = response.GrowthFactor;
            string   growthType         = response.GrowthType;
            float    percentageComplete = response.PercentageComplete;
            DateTime startedAt          = response.StartedAt;
            string   state = response.State;

            #endregion
        }
 public AwsConfigProviderFactory(Secrets credentials, ConsoleLogger logger)
 {
     _logger                      = logger;
     _client                      = new AmazonAppConfigClient(credentials.AwsKey, credentials.AwsSecret);
     _applicationService          = new AwsAppConfigApplicationService(_client);
     _environmentService          = new AwsAppConfigEnvironmentService(_client);
     _configurationProfileService = new AwsAppConfigConfigurationProfileService(_client);
 }
Ejemplo n.º 4
0
 public DeploymentCommand(AmazonAppConfigClient client)
 {
     _client                      = client;
     _deploymentService           = new DeploymentService(client);
     _applicationService          = new AwsAppConfigApplicationService(client);
     _environmentService          = new AwsAppConfigEnvironmentService(client);
     _configurationProfileService = new AwsAppConfigConfigurationProfileService(client);
 }
Ejemplo n.º 5
0
 public AwsConfigProvider(string clientId, AmazonAppConfigClient client, Application application, Environment environment,
                          ConfigurationProfileSummary configurationProfile, ConsoleLogger logger)
 {
     _clientId             = clientId;
     _application          = application;
     _environment          = environment;
     _configurationProfile = configurationProfile;
     _logger         = logger;
     _client         = client;
     _currentVersion = null;
     _currentConfig  = null;
 }
Ejemplo n.º 6
0
        public void AppConfigDeleteDeploymentStrategy()
        {
            #region to-delete-a-deployment-strategy-1632265473708

            var client   = new AmazonAppConfigClient();
            var response = client.DeleteDeploymentStrategy(new DeleteDeploymentStrategyRequest
            {
                DeploymentStrategyId = "1225qzk"
            });


            #endregion
        }
Ejemplo n.º 7
0
        public void AppConfigListDeploymentStrategies()
        {
            #region to-list-the-available-deployment-strategies-1632267364180

            var client   = new AmazonAppConfigClient();
            var response = client.ListDeploymentStrategies(new ListDeploymentStrategiesRequest
            {
            });

            List <DeploymentStrategy> items = response.Items;

            #endregion
        }
Ejemplo n.º 8
0
        public void AppConfigListApplications()
        {
            #region to-list-the-available-applications-1632267111131

            var client   = new AmazonAppConfigClient();
            var response = client.ListApplications(new ListApplicationsRequest
            {
            });

            List <Application> items = response.Items;

            #endregion
        }
Ejemplo n.º 9
0
        public void AppConfigDeleteApplication()
        {
            #region to-delete-an-application-1632265343951

            var client   = new AmazonAppConfigClient();
            var response = client.DeleteApplication(new DeleteApplicationRequest
            {
                ApplicationId = "339ohji"
            });


            #endregion
        }
Ejemplo n.º 10
0
        public void AppConfigListTagsForResource()
        {
            #region to-list-the-tags-of-an-application-1632328796560

            var client   = new AmazonAppConfigClient();
            var response = client.ListTagsForResource(new ListTagsForResourceRequest
            {
                ResourceArn = "arn:aws:appconfig:us-east-1:111122223333:application/339ohji"
            });

            Dictionary <string, string> tags = response.Tags;

            #endregion
        }
Ejemplo n.º 11
0
        public void AppConfigListConfigurationProfiles()
        {
            #region to-list-the-available-configuration-profiles-1632267193265

            var client   = new AmazonAppConfigClient();
            var response = client.ListConfigurationProfiles(new ListConfigurationProfilesRequest
            {
                ApplicationId = "339ohji"
            });

            List <ConfigurationProfileSummary> items = response.Items;

            #endregion
        }
Ejemplo n.º 12
0
        public void AppConfigDeleteEnvironment()
        {
            #region to-delete-an-environment-1632265641044

            var client   = new AmazonAppConfigClient();
            var response = client.DeleteEnvironment(new DeleteEnvironmentRequest
            {
                ApplicationId = "339ohji",
                EnvironmentId = "54j1r29"
            });


            #endregion
        }
Ejemplo n.º 13
0
        public void AppConfigDeleteConfigurationProfile()
        {
            #region to-delete-a-configuration-profile-1632265401308

            var client   = new AmazonAppConfigClient();
            var response = client.DeleteConfigurationProfile(new DeleteConfigurationProfileRequest
            {
                ApplicationId          = "339ohji",
                ConfigurationProfileId = "ur8hx2f"
            });


            #endregion
        }
Ejemplo n.º 14
0
        public void AppConfigListEnvironments()
        {
            #region to-list-the-available-environments-1632267474389

            var client   = new AmazonAppConfigClient();
            var response = client.ListEnvironments(new ListEnvironmentsRequest
            {
                ApplicationId = "339ohji"
            });

            List <Environment> items = response.Items;

            #endregion
        }
        protected IAmazonAppConfig CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonAppConfigConfig {
                RegionEndpoint = region
            };

            Amazon.PowerShell.Utils.Common.PopulateConfig(this, config);
            this.CustomizeClientConfig(config);
            var client = new AmazonAppConfigClient(credentials, config);

            client.BeforeRequestEvent += RequestEventHandler;
            client.AfterResponseEvent += ResponseEventHandler;
            return(client);
        }
Ejemplo n.º 16
0
        public void AppConfigValidateConfiguration()
        {
            #region to-validate-a-configuration-1632331491365

            var client   = new AmazonAppConfigClient();
            var response = client.ValidateConfiguration(new ValidateConfigurationRequest
            {
                ApplicationId          = "abc1234",
                ConfigurationProfileId = "ur8hx2f",
                ConfigurationVersion   = "1"
            });


            #endregion
        }
Ejemplo n.º 17
0
        public void AppConfigDeleteHostedConfigurationVersion()
        {
            #region to-delete-a-hosted-configuration-version-1632265720740

            var client   = new AmazonAppConfigClient();
            var response = client.DeleteHostedConfigurationVersion(new DeleteHostedConfigurationVersionRequest
            {
                ApplicationId          = "339ohji",
                ConfigurationProfileId = "ur8hx2f",
                VersionNumber          = 1
            });


            #endregion
        }
Ejemplo n.º 18
0
        public void AppConfigListHostedConfigurationVersions()
        {
            #region to-list-the-available-hosted-configuration-versions-1632267647667

            var client   = new AmazonAppConfigClient();
            var response = client.ListHostedConfigurationVersions(new ListHostedConfigurationVersionsRequest
            {
                ApplicationId          = "339ohji",
                ConfigurationProfileId = "ur8hx2f"
            });

            List <HostedConfigurationVersionSummary> items = response.Items;

            #endregion
        }
Ejemplo n.º 19
0
        public void AppConfigListDeployments()
        {
            #region to-list-the-available-deployments-1632267282025

            var client   = new AmazonAppConfigClient();
            var response = client.ListDeployments(new ListDeploymentsRequest
            {
                ApplicationId = "339ohji",
                EnvironmentId = "54j1r29"
            });

            List <DeploymentSummary> items = response.Items;

            #endregion
        }
Ejemplo n.º 20
0
        public void AppConfigGetApplication()
        {
            #region to-list-details-of-an-application-1632265864702

            var client   = new AmazonAppConfigClient();
            var response = client.GetApplication(new GetApplicationRequest
            {
                ApplicationId = "339ohji"
            });

            string id   = response.Id;
            string name = response.Name;

            #endregion
        }
Ejemplo n.º 21
0
        public void AppConfigTagResource()
        {
            #region to-tag-an-application-1632330350645

            var client   = new AmazonAppConfigClient();
            var response = client.TagResource(new TagResourceRequest
            {
                ResourceArn = "arn:aws:appconfig:us-east-1:111122223333:application/339ohji",
                Tags        = new Dictionary <string, string> {
                    { "group1", "1" }
                }
            });


            #endregion
        }
Ejemplo n.º 22
0
        public void AppConfigUntagResource()
        {
            #region to-remove-a-tag-from-an-application-1632330429881

            var client   = new AmazonAppConfigClient();
            var response = client.UntagResource(new UntagResourceRequest
            {
                ResourceArn = "arn:aws:appconfig:us-east-1:111122223333:application/339ohji",
                TagKeys     = new List <string> {
                    "group1"
                }
            });


            #endregion
        }
Ejemplo n.º 23
0
        public void AppConfigCreateApplication()
        {
            #region to-create-an-application-1632264511615

            var client   = new AmazonAppConfigClient();
            var response = client.CreateApplication(new CreateApplicationRequest
            {
                Description = "An application used for creating an example.",
                Name        = "example-application"
            });

            string description = response.Description;
            string id          = response.Id;
            string name        = response.Name;

            #endregion
        }
Ejemplo n.º 24
0
        public void AppConfigCreateEnvironment()
        {
            #region to-create-an-environment-1632265124975

            var client   = new AmazonAppConfigClient();
            var response = client.CreateEnvironment(new CreateEnvironmentRequest
            {
                ApplicationId = "339ohji",
                Name          = "Example-Environment"
            });

            string applicationId = response.ApplicationId;
            string id            = response.Id;
            string name          = response.Name;
            string state         = response.State;

            #endregion
        }
Ejemplo n.º 25
0
        public void AppConfigUpdateApplication()
        {
            #region to-update-an-application-1632330585893

            var client   = new AmazonAppConfigClient();
            var response = client.UpdateApplication(new UpdateApplicationRequest
            {
                ApplicationId = "339ohji",
                Description   = "",
                Name          = "Example-Application"
            });

            string description = response.Description;
            string id          = response.Id;
            string name        = response.Name;

            #endregion
        }
Ejemplo n.º 26
0
        public void AppConfigGetConfiguration()
        {
            #region to-retrieve-configuration-details-1632265954314

            var client   = new AmazonAppConfigClient();
            var response = client.GetConfiguration(new GetConfigurationRequest
            {
                Application   = "example-application",
                ClientId      = "example-id",
                Configuration = "Example-Configuration-Profile",
                Environment   = "Example-Environment"
            });

            string configurationVersion = response.ConfigurationVersion;
            string contentType          = response.ContentType;

            #endregion
        }
Ejemplo n.º 27
0
        public void AppConfigGetEnvironment()
        {
            #region to-retrieve-environment-details-1632266924806

            var client   = new AmazonAppConfigClient();
            var response = client.GetEnvironment(new GetEnvironmentRequest
            {
                ApplicationId = "339ohji",
                EnvironmentId = "54j1r29"
            });

            string applicationId = response.ApplicationId;
            string id            = response.Id;
            string name          = response.Name;
            string state         = response.State;

            #endregion
        }
Ejemplo n.º 28
0
        public void AppConfigGetHostedConfigurationVersion()
        {
            #region to-retrieve-hosted-configuration-details-1632267003527

            var client   = new AmazonAppConfigClient();
            var response = client.GetHostedConfigurationVersion(new GetHostedConfigurationVersionRequest
            {
                ApplicationId          = "339ohji",
                ConfigurationProfileId = "ur8hx2f",
                VersionNumber          = 1
            });

            string applicationId          = response.ApplicationId;
            string configurationProfileId = response.ConfigurationProfileId;
            string contentType            = response.ContentType;
            int    versionNumber          = response.VersionNumber;

            #endregion
        }
Ejemplo n.º 29
0
        public void AppConfigGetConfigurationProfile()
        {
            #region to-retrieve-configuration-profile-details-1632266081013

            var client   = new AmazonAppConfigClient();
            var response = client.GetConfigurationProfile(new GetConfigurationProfileRequest
            {
                ApplicationId          = "339ohji",
                ConfigurationProfileId = "ur8hx2f"
            });

            string applicationId    = response.ApplicationId;
            string id               = response.Id;
            string locationUri      = response.LocationUri;
            string name             = response.Name;
            string retrievalRoleArn = response.RetrievalRoleArn;

            #endregion
        }
Ejemplo n.º 30
0
        public void AppConfigUpdateEnvironment()
        {
            #region to-update-an-environment-1632331382428

            var client   = new AmazonAppConfigClient();
            var response = client.UpdateEnvironment(new UpdateEnvironmentRequest
            {
                ApplicationId = "339ohji",
                Description   = "An environment for examples.",
                EnvironmentId = "54j1r29"
            });

            string applicationId = response.ApplicationId;
            string description   = response.Description;
            string id            = response.Id;
            string name          = response.Name;
            string state         = response.State;

            #endregion
        }