Beispiel #1
0
        public void ElasticFileSystemDescribeTags()
        {
            #region to-describe-the-tags-for-a-file-system-1481850497090

            var client   = new AmazonElasticFileSystemClient();
            var response = client.DescribeTags(new DescribeTagsRequest
            {
                FileSystemId = "fs-01234567"
            });

            List <Tag> tags = response.Tags;

            #endregion
        }
Beispiel #2
0
        public void ElasticFileSystemDescribeMountTargetSecurityGroups()
        {
            #region to-describe-the-security-groups-for-a-mount-target-1481849317823

            var client   = new AmazonElasticFileSystemClient();
            var response = client.DescribeMountTargetSecurityGroups(new DescribeMountTargetSecurityGroupsRequest
            {
                MountTargetId = "fsmt-12340abc"
            });

            List <string> securityGroups = response.SecurityGroups;

            #endregion
        }
Beispiel #3
0
        public void ElasticFileSystemDescribeMountTargets()
        {
            #region to-describe-the-mount-targets-for-a-file-system-1481849958584

            var client   = new AmazonElasticFileSystemClient();
            var response = client.DescribeMountTargets(new DescribeMountTargetsRequest
            {
                FileSystemId = "fs-01234567"
            });

            List <MountTargetDescription> mountTargets = response.MountTargets;

            #endregion
        }
Beispiel #4
0
        public void ElasticFileSystemDescribeLifecycleConfiguration()
        {
            #region to-describe-the-lifecycle-configuration-for-a-file-system-1551200664502

            var client   = new AmazonElasticFileSystemClient();
            var response = client.DescribeLifecycleConfiguration(new DescribeLifecycleConfigurationRequest
            {
                FileSystemId = "fs-01234567"
            });

            List <LifecyclePolicy> lifecyclePolicies = response.LifecyclePolicies;

            #endregion
        }
Beispiel #5
0
        protected IAmazonElasticFileSystem CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonElasticFileSystemConfig {
                RegionEndpoint = region
            };

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

            client.BeforeRequestEvent += RequestEventHandler;
            client.AfterResponseEvent += ResponseEventHandler;
            return(client);
        }
Beispiel #6
0
        public void ElasticFileSystemModifyMountTargetSecurityGroups()
        {
            #region to-modify-the-security-groups-associated-with-a-mount-target-for-a-file-system-1481850772562

            var client   = new AmazonElasticFileSystemClient();
            var response = client.ModifyMountTargetSecurityGroups(new ModifyMountTargetSecurityGroupsRequest
            {
                MountTargetId  = "fsmt-12340abc",
                SecurityGroups = new List <string> {
                    "sg-abcd1234"
                }
            });


            #endregion
        }
Beispiel #7
0
        public void ElasticFileSystemDeleteTags()
        {
            #region to-delete-tags-for-an-efs-file-system-1481848189061

            var client   = new AmazonElasticFileSystemClient();
            var response = client.DeleteTags(new DeleteTagsRequest
            {
                FileSystemId = "fs-01234567",
                TagKeys      = new List <string> {
                    "Name"
                }
            });


            #endregion
        }
Beispiel #8
0
        public void ElasticFileSystemCreateTags()
        {
            #region to-create-a-new-tag-1481843409357

            var client   = new AmazonElasticFileSystemClient();
            var response = client.CreateTags(new CreateTagsRequest
            {
                FileSystemId = "fs-01234567",
                Tags         = new List <Tag> {
                    new Tag {
                        Key   = "Name",
                        Value = "MyFileSystem"
                    }
                }
            });


            #endregion
        }
Beispiel #9
0
        public void ElasticFileSystemPutLifecycleConfiguration()
        {
            #region creates-a-new-lifecycleconfiguration-object-for-a-file-system-1551201594692

            var client   = new AmazonElasticFileSystemClient();
            var response = client.PutLifecycleConfiguration(new PutLifecycleConfigurationRequest
            {
                FileSystemId      = "fs-01234567",
                LifecyclePolicies = new List <LifecyclePolicy> {
                    new LifecyclePolicy {
                        TransitionToIA = "AFTER_30_DAYS"
                    }
                }
            });

            List <LifecyclePolicy> lifecyclePolicies = response.LifecyclePolicies;

            #endregion
        }
Beispiel #10
0
        public void ElasticFileSystemCreateMountTarget()
        {
            #region to-create-a-new-mount-target-1481842289329

            var client   = new AmazonElasticFileSystemClient();
            var response = client.CreateMountTarget(new CreateMountTargetRequest
            {
                FileSystemId = "fs-01234567",
                SubnetId     = "subnet-1234abcd"
            });

            string fileSystemId       = response.FileSystemId;
            string ipAddress          = response.IpAddress;
            string lifeCycleState     = response.LifeCycleState;
            string mountTargetId      = response.MountTargetId;
            string networkInterfaceId = response.NetworkInterfaceId;
            string ownerId            = response.OwnerId;
            string subnetId           = response.SubnetId;

            #endregion
        }