Exemplo n.º 1
0
        public void BatchRegisterJobDefinition()
        {
            #region registerjobdefinition-with-tags-1591290509028

            var client   = new AmazonBatchClient();
            var response = client.RegisterJobDefinition(new RegisterJobDefinitionRequest
            {
                Type = "container",
                ContainerProperties = new ContainerProperties {
                    Command = new List <string> {
                        "sleep",
                        "30"
                    },
                    Image  = "busybox",
                    Memory = 128,
                    Vcpus  = 1
                },
                JobDefinitionName = "sleep30",
                Tags = new Dictionary <string, string> {
                    { "Department", "Engineering" },
                    { "User", "JaneDoe" }
                }
            });

            string jobDefinitionArn  = response.JobDefinitionArn;
            string jobDefinitionName = response.JobDefinitionName;
            int    revision          = response.Revision;

            #endregion
        }
Exemplo n.º 2
0
        public void BatchRegisterJobDefinition()
        {
            #region to-register-a-job-definition-1481154325325

            var client   = new AmazonBatchClient();
            var response = client.RegisterJobDefinition(new RegisterJobDefinitionRequest
            {
                Type = "container",
                ContainerProperties = new ContainerProperties {
                    Command = new List <string> {
                        "sleep",
                        "10"
                    },
                    Image = "busybox",
                    ResourceRequirements = new List <ResourceRequirement> {
                        new ResourceRequirement {
                            Type  = "MEMORY",
                            Value = "128"
                        },
                        new ResourceRequirement {
                            Type  = "VCPU",
                            Value = "1"
                        }
                    }
                },
                JobDefinitionName = "sleep10"
            });

            string jobDefinitionArn  = response.JobDefinitionArn;
            string jobDefinitionName = response.JobDefinitionName;
            int    revision          = response.Revision;

            #endregion
        }
Exemplo n.º 3
0
        public void BatchRegisterJobDefinition()
        {
            #region to-register-a-job-definition-1481154325325

            var client   = new AmazonBatchClient();
            var response = client.RegisterJobDefinition(new RegisterJobDefinitionRequest
            {
                Type = "container",
                ContainerProperties = new ContainerProperties {
                    Command = new List <string> {
                        "sleep",
                        "10"
                    },
                    Image  = "busybox",
                    Memory = 128,
                    Vcpus  = 1
                },
                JobDefinitionName = "sleep10"
            });

            string jobDefinitionArn  = response.JobDefinitionArn;
            string jobDefinitionName = response.JobDefinitionName;
            int    revision          = response.Revision;

            #endregion
        }