diff --git a/builder/alicloud/ecs/access_config_test.go b/builder/alicloud/ecs/access_config_test.go deleted file mode 100644 index 68c23aa14..000000000 --- a/builder/alicloud/ecs/access_config_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package ecs - -import ( - "os" - "testing" -) - -func testAlicloudAccessConfig() *AlicloudAccessConfig { - return &AlicloudAccessConfig{ - AlicloudAccessKey: "ak", - AlicloudSecretKey: "acs", - } - -} - -func TestAlicloudAccessConfigPrepareRegion(t *testing.T) { - c := testAlicloudAccessConfig() - - c.AlicloudRegion = "" - if err := c.Prepare(nil); err == nil { - t.Fatalf("should have err") - } - - c.AlicloudRegion = "cn-beijing" - if err := c.Prepare(nil); err != nil { - t.Fatalf("shouldn't have err: %s", err) - } - - os.Setenv("ALICLOUD_REGION", "cn-hangzhou") - c.AlicloudRegion = "" - if err := c.Prepare(nil); err != nil { - t.Fatalf("shouldn't have err: %s", err) - } - - c.AlicloudAccessKey = "" - if err := c.Prepare(nil); err == nil { - t.Fatalf("should have err") - } - - c.AlicloudProfile = "default" - if err := c.Prepare(nil); err != nil { - t.Fatalf("shouldn't have err: %s", err) - } - - c.AlicloudProfile = "" - os.Setenv("ALICLOUD_PROFILE", "default") - if err := c.Prepare(nil); err != nil { - t.Fatalf("shouldn't have err: %s", err) - } - - c.AlicloudSkipValidation = false -} diff --git a/builder/alicloud/ecs/artifact_test.go b/builder/alicloud/ecs/artifact_test.go deleted file mode 100644 index 2d263d7c7..000000000 --- a/builder/alicloud/ecs/artifact_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package ecs - -import ( - "reflect" - "testing" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" -) - -func TestArtifact_Impl(t *testing.T) { - var _ packersdk.Artifact = new(Artifact) -} - -func TestArtifactId(t *testing.T) { - expected := `east:foo,west:bar` - - ecsImages := make(map[string]string) - ecsImages["east"] = "foo" - ecsImages["west"] = "bar" - - a := &Artifact{ - AlicloudImages: ecsImages, - } - - result := a.Id() - if result != expected { - t.Fatalf("bad: %s", result) - } -} - -func TestArtifactState_atlasMetadata(t *testing.T) { - a := &Artifact{ - AlicloudImages: map[string]string{ - "east": "foo", - "west": "bar", - }, - } - - actual := a.State("atlas.artifact.metadata") - expected := map[string]string{ - "region.east": "foo", - "region.west": "bar", - } - if !reflect.DeepEqual(actual, expected) { - t.Fatalf("bad: %#v", actual) - } -} diff --git a/builder/alicloud/ecs/builder_acc_test.go b/builder/alicloud/ecs/builder_acc_test.go deleted file mode 100644 index f4cf7ef78..000000000 --- a/builder/alicloud/ecs/builder_acc_test.go +++ /dev/null @@ -1,891 +0,0 @@ -package ecs - -import ( - "encoding/json" - "fmt" - "os" - "strings" - "testing" - - "github.com/aliyun/alibaba-cloud-sdk-go/services/ecs" - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - builderT "github.com/hashicorp/packer/acctest" -) - -const defaultTestRegion = "cn-beijing" - -func TestBuilderAcc_validateRegion(t *testing.T) { - t.Parallel() - - if os.Getenv(builderT.TestEnvVar) == "" { - t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", builderT.TestEnvVar)) - return - } - - testAccPreCheck(t) - - access := &AlicloudAccessConfig{AlicloudRegion: "cn-beijing"} - err := access.Config() - if err != nil { - t.Fatalf("init AlicloudAccessConfig failed: %s", err) - } - - err = access.ValidateRegion("cn-hangzhou") - if err != nil { - t.Fatalf("Expect pass with valid region id but failed: %s", err) - } - - err = access.ValidateRegion("invalidRegionId") - if err == nil { - t.Fatal("Expect failure due to invalid region id but passed") - } -} - -func TestBuilderAcc_basic(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccBasic, - }) -} - -const testBuilderAccBasic = ` -{ "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_name": "packer-test-basic_{{timestamp}}" - }] -}` - -func TestBuilderAcc_withDiskSettings(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccWithDiskSettings, - Check: checkImageDisksSettings(), - }) -} - -const testBuilderAccWithDiskSettings = ` -{ "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_name": "packer-test-withDiskSettings_{{timestamp}}", - "system_disk_mapping": { - "disk_size": 60 - }, - "image_disk_mappings": [ - { - "disk_name": "datadisk1", - "disk_size": 25, - "disk_delete_with_instance": true - }, - { - "disk_name": "datadisk2", - "disk_size": 25, - "disk_delete_with_instance": true - } - ] - }] -}` - -func checkImageDisksSettings() builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - imageId := artifact.AlicloudImages[defaultTestRegion] - - // describe the image, get block devices with a snapshot - client, _ := testAliyunClient() - - describeImagesRequest := ecs.CreateDescribeImagesRequest() - describeImagesRequest.RegionId = defaultTestRegion - describeImagesRequest.ImageId = imageId - imagesResponse, err := client.DescribeImages(describeImagesRequest) - if err != nil { - return fmt.Errorf("describe images failed due to %s", err) - } - - if len(imagesResponse.Images.Image) == 0 { - return fmt.Errorf("image %s generated can not be found", imageId) - } - - image := imagesResponse.Images.Image[0] - if image.Size != 60 { - return fmt.Errorf("the size of image %s should be equal to 60G but got %dG", imageId, image.Size) - } - if len(image.DiskDeviceMappings.DiskDeviceMapping) != 3 { - return fmt.Errorf("image %s should contains 3 disks", imageId) - } - - var snapshotIds []string - for _, mapping := range image.DiskDeviceMappings.DiskDeviceMapping { - if mapping.Type == DiskTypeSystem { - if mapping.Size != "60" { - return fmt.Errorf("the system snapshot size of image %s should be equal to 60G but got %sG", imageId, mapping.Size) - } - } else { - if mapping.Size != "25" { - return fmt.Errorf("the data disk size of image %s should be equal to 25G but got %sG", imageId, mapping.Size) - } - - snapshotIds = append(snapshotIds, mapping.SnapshotId) - } - } - - data, _ := json.Marshal(snapshotIds) - - describeSnapshotRequest := ecs.CreateDescribeSnapshotsRequest() - describeSnapshotRequest.RegionId = defaultTestRegion - describeSnapshotRequest.SnapshotIds = string(data) - describeSnapshotsResponse, err := client.DescribeSnapshots(describeSnapshotRequest) - if err != nil { - return fmt.Errorf("describe data snapshots failed due to %s", err) - } - if len(describeSnapshotsResponse.Snapshots.Snapshot) != 2 { - return fmt.Errorf("expect %d data snapshots but got %d", len(snapshotIds), len(describeSnapshotsResponse.Snapshots.Snapshot)) - } - - var dataDiskIds []string - for _, snapshot := range describeSnapshotsResponse.Snapshots.Snapshot { - dataDiskIds = append(dataDiskIds, snapshot.SourceDiskId) - } - data, _ = json.Marshal(dataDiskIds) - - describeDisksRequest := ecs.CreateDescribeDisksRequest() - describeDisksRequest.RegionId = defaultTestRegion - describeDisksRequest.DiskIds = string(data) - describeDisksResponse, err := client.DescribeDisks(describeDisksRequest) - if err != nil { - return fmt.Errorf("describe snapshots failed due to %s", err) - } - if len(describeDisksResponse.Disks.Disk) != 0 { - return fmt.Errorf("data disks should be deleted but %d left", len(describeDisksResponse.Disks.Disk)) - } - - return nil - } -} - -func TestBuilderAcc_withIgnoreDataDisks(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccIgnoreDataDisks, - Check: checkIgnoreDataDisks(), - }) -} - -const testBuilderAccIgnoreDataDisks = ` -{ "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.gn5-c8g1.2xlarge", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_name": "packer-test-ignoreDataDisks_{{timestamp}}", - "image_ignore_data_disks": true - }] -}` - -func checkIgnoreDataDisks() builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - imageId := artifact.AlicloudImages[defaultTestRegion] - - // describe the image, get block devices with a snapshot - client, _ := testAliyunClient() - - describeImagesRequest := ecs.CreateDescribeImagesRequest() - describeImagesRequest.RegionId = defaultTestRegion - describeImagesRequest.ImageId = imageId - imagesResponse, err := client.DescribeImages(describeImagesRequest) - if err != nil { - return fmt.Errorf("describe images failed due to %s", err) - } - - if len(imagesResponse.Images.Image) == 0 { - return fmt.Errorf("image %s generated can not be found", imageId) - } - - image := imagesResponse.Images.Image[0] - if len(image.DiskDeviceMappings.DiskDeviceMapping) != 1 { - return fmt.Errorf("image %s should only contain one disks", imageId) - } - - return nil - } -} - -func TestBuilderAcc_windows(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccWindows, - }) -} - -const testBuilderAccWindows = ` -{ "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"winsvr_64_dtcC_1809_en-us_40G_alibase_20190318.vhd", - "io_optimized":"true", - "communicator": "winrm", - "winrm_port": 5985, - "winrm_username": "Administrator", - "winrm_password": "Test1234", - "image_name": "packer-test-windows_{{timestamp}}", - "user_data_file": "../../../examples/alicloud/basic/winrm_enable_userdata.ps1" - }] -}` - -func TestBuilderAcc_regionCopy(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccRegionCopy, - Check: checkRegionCopy([]string{"cn-hangzhou", "cn-shenzhen"}), - }) -} - -const testBuilderAccRegionCopy = ` -{ - "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_name": "packer-test-regionCopy_{{timestamp}}", - "image_copy_regions": ["cn-hangzhou", "cn-shenzhen"], - "image_copy_names": ["packer-copy-test-hz_{{timestamp}}", "packer-copy-test-sz_{{timestamp}}"] - }] -} -` - -func checkRegionCopy(regions []string) builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - - // Verify that we copied to only the regions given - regionSet := make(map[string]struct{}) - for _, r := range regions { - regionSet[r] = struct{}{} - } - - for r := range artifact.AlicloudImages { - if r == "cn-beijing" { - delete(regionSet, r) - continue - } - - if _, ok := regionSet[r]; !ok { - return fmt.Errorf("region %s is not the target region but found in artifacts", r) - } - - delete(regionSet, r) - } - - if len(regionSet) > 0 { - return fmt.Errorf("following region(s) should be the copying targets but corresponding artifact(s) not found: %#v", regionSet) - } - - client, _ := testAliyunClient() - for regionId, imageId := range artifact.AlicloudImages { - describeImagesRequest := ecs.CreateDescribeImagesRequest() - describeImagesRequest.RegionId = regionId - describeImagesRequest.ImageId = imageId - describeImagesRequest.Status = ImageStatusQueried - describeImagesResponse, err := client.DescribeImages(describeImagesRequest) - if err != nil { - return fmt.Errorf("describe generated image %s failed due to %s", imageId, err) - } - if len(describeImagesResponse.Images.Image) == 0 { - return fmt.Errorf("image %s in artifacts can not be found", imageId) - } - - image := describeImagesResponse.Images.Image[0] - if image.IsCopied && regionId == "cn-hangzhou" && !strings.HasPrefix(image.ImageName, "packer-copy-test-hz") { - return fmt.Errorf("the name of image %s in artifacts should begin with %s but got %s", imageId, "packer-copy-test-hz", image.ImageName) - } - if image.IsCopied && regionId == "cn-shenzhen" && !strings.HasPrefix(image.ImageName, "packer-copy-test-sz") { - return fmt.Errorf("the name of image %s in artifacts should begin with %s but got %s", imageId, "packer-copy-test-sz", image.ImageName) - } - } - - return nil - } -} - -func TestBuilderAcc_forceDelete(t *testing.T) { - t.Parallel() - // Build the same alicloud image twice, with ecs_image_force_delete on the second run - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: buildForceDeregisterConfig("false", "delete"), - SkipArtifactTeardown: true, - }) - - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: buildForceDeregisterConfig("true", "delete"), - }) -} - -func buildForceDeregisterConfig(val, name string) string { - return fmt.Sprintf(testBuilderAccForceDelete, val, name) -} - -const testBuilderAccForceDelete = ` -{ - "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_force_delete": "%s", - "image_name": "packer-test-forceDelete_%s" - }] -} -` - -func TestBuilderAcc_ECSImageSharing(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccSharing, - Check: checkECSImageSharing("1309208528360047"), - }) -} - -const testBuilderAccSharing = ` -{ - "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_name": "packer-test-ECSImageSharing_{{timestamp}}", - "image_share_account":["1309208528360047"] - }] -} -` - -func checkECSImageSharing(uid string) builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - - // describe the image, get block devices with a snapshot - client, _ := testAliyunClient() - - describeImageShareRequest := ecs.CreateDescribeImageSharePermissionRequest() - describeImageShareRequest.RegionId = "cn-beijing" - describeImageShareRequest.ImageId = artifact.AlicloudImages["cn-beijing"] - imageShareResponse, err := client.DescribeImageSharePermission(describeImageShareRequest) - - if err != nil { - return fmt.Errorf("Error retrieving Image Attributes for ECS Image Artifact (%#v) "+ - "in ECS Image Sharing Test: %s", artifact, err) - } - - if len(imageShareResponse.Accounts.Account) != 1 && imageShareResponse.Accounts.Account[0].AliyunId != uid { - return fmt.Errorf("share account is incorrect %d", len(imageShareResponse.Accounts.Account)) - } - - return nil - } -} - -func TestBuilderAcc_forceDeleteSnapshot(t *testing.T) { - t.Parallel() - destImageName := "delete" - - // Build the same alicloud image name twice, with force_delete_snapshot on the second run - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: buildForceDeleteSnapshotConfig("false", destImageName), - SkipArtifactTeardown: true, - }) - - // Get image data by image image name - client, _ := testAliyunClient() - - describeImagesRequest := ecs.CreateDescribeImagesRequest() - describeImagesRequest.RegionId = "cn-beijing" - describeImagesRequest.ImageName = "packer-test-" + destImageName - images, _ := client.DescribeImages(describeImagesRequest) - - image := images.Images.Image[0] - - // Get snapshot ids for image - snapshotIds := []string{} - for _, device := range image.DiskDeviceMappings.DiskDeviceMapping { - if device.Device != "" && device.SnapshotId != "" { - snapshotIds = append(snapshotIds, device.SnapshotId) - } - } - - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: buildForceDeleteSnapshotConfig("true", destImageName), - Check: checkSnapshotsDeleted(snapshotIds), - }) -} - -func buildForceDeleteSnapshotConfig(val, name string) string { - return fmt.Sprintf(testBuilderAccForceDeleteSnapshot, val, val, name) -} - -const testBuilderAccForceDeleteSnapshot = ` -{ - "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_force_delete_snapshots": "%s", - "image_force_delete": "%s", - "image_name": "packer-test-%s" - }] -} -` - -func checkSnapshotsDeleted(snapshotIds []string) builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - // Verify the snapshots are gone - client, _ := testAliyunClient() - data, err := json.Marshal(snapshotIds) - if err != nil { - return fmt.Errorf("Marshal snapshotIds array failed %v", err) - } - - describeSnapshotsRequest := ecs.CreateDescribeSnapshotsRequest() - describeSnapshotsRequest.RegionId = "cn-beijing" - describeSnapshotsRequest.SnapshotIds = string(data) - snapshotResp, err := client.DescribeSnapshots(describeSnapshotsRequest) - if err != nil { - return fmt.Errorf("Query snapshot failed %v", err) - } - snapshots := snapshotResp.Snapshots.Snapshot - if len(snapshots) > 0 { - return fmt.Errorf("Snapshots weren't successfully deleted by " + - "`ecs_image_force_delete_snapshots`") - } - return nil - } -} - -func TestBuilderAcc_imageTags(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccImageTags, - Check: checkImageTags(), - }) -} - -const testBuilderAccImageTags = ` -{ "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "ssh_username": "root", - "io_optimized":"true", - "image_name": "packer-test-imageTags_{{timestamp}}", - "tags": { - "TagKey1": "TagValue1", - "TagKey2": "TagValue2" - } - }] -}` - -func checkImageTags() builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - imageId := artifact.AlicloudImages[defaultTestRegion] - - // describe the image, get block devices with a snapshot - client, _ := testAliyunClient() - - describeImageTagsRequest := ecs.CreateDescribeTagsRequest() - describeImageTagsRequest.RegionId = defaultTestRegion - describeImageTagsRequest.ResourceType = TagResourceImage - describeImageTagsRequest.ResourceId = imageId - imageTagsResponse, err := client.DescribeTags(describeImageTagsRequest) - if err != nil { - return fmt.Errorf("Error retrieving Image Attributes for ECS Image Artifact (%#v) "+ - "in ECS Image Tags Test: %s", artifact, err) - } - - if len(imageTagsResponse.Tags.Tag) != 2 { - return fmt.Errorf("expect 2 tags set on image %s but got %d", imageId, len(imageTagsResponse.Tags.Tag)) - } - - for _, tag := range imageTagsResponse.Tags.Tag { - if tag.TagKey != "TagKey1" && tag.TagKey != "TagKey2" { - return fmt.Errorf("tags on image %s should be within the list of TagKey1 and TagKey2 but got %s", imageId, tag.TagKey) - } - - if tag.TagKey == "TagKey1" && tag.TagValue != "TagValue1" { - return fmt.Errorf("the value for tag %s on image %s should be TagValue1 but got %s", tag.TagKey, imageId, tag.TagValue) - } else if tag.TagKey == "TagKey2" && tag.TagValue != "TagValue2" { - return fmt.Errorf("the value for tag %s on image %s should be TagValue2 but got %s", tag.TagKey, imageId, tag.TagValue) - } - } - - describeImagesRequest := ecs.CreateDescribeImagesRequest() - describeImagesRequest.RegionId = defaultTestRegion - describeImagesRequest.ImageId = imageId - imagesResponse, err := client.DescribeImages(describeImagesRequest) - if err != nil { - return fmt.Errorf("describe images failed due to %s", err) - } - - if len(imagesResponse.Images.Image) == 0 { - return fmt.Errorf("image %s generated can not be found", imageId) - } - - image := imagesResponse.Images.Image[0] - for _, mapping := range image.DiskDeviceMappings.DiskDeviceMapping { - describeSnapshotTagsRequest := ecs.CreateDescribeTagsRequest() - describeSnapshotTagsRequest.RegionId = defaultTestRegion - describeSnapshotTagsRequest.ResourceType = TagResourceSnapshot - describeSnapshotTagsRequest.ResourceId = mapping.SnapshotId - snapshotTagsResponse, err := client.DescribeTags(describeSnapshotTagsRequest) - if err != nil { - return fmt.Errorf("failed to get snapshot tags due to %s", err) - } - - if len(snapshotTagsResponse.Tags.Tag) != 2 { - return fmt.Errorf("expect 2 tags set on snapshot %s but got %d", mapping.SnapshotId, len(snapshotTagsResponse.Tags.Tag)) - } - - for _, tag := range snapshotTagsResponse.Tags.Tag { - if tag.TagKey != "TagKey1" && tag.TagKey != "TagKey2" { - return fmt.Errorf("tags on snapshot %s should be within the list of TagKey1 and TagKey2 but got %s", mapping.SnapshotId, tag.TagKey) - } - - if tag.TagKey == "TagKey1" && tag.TagValue != "TagValue1" { - return fmt.Errorf("the value for tag %s on snapshot %s should be TagValue1 but got %s", tag.TagKey, mapping.SnapshotId, tag.TagValue) - } else if tag.TagKey == "TagKey2" && tag.TagValue != "TagValue2" { - return fmt.Errorf("the value for tag %s on snapshot %s should be TagValue2 but got %s", tag.TagKey, mapping.SnapshotId, tag.TagValue) - } - } - } - - return nil - } -} - -func TestBuilderAcc_dataDiskEncrypted(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccDataDiskEncrypted, - Check: checkDataDiskEncrypted(), - }) -} - -const testBuilderAccDataDiskEncrypted = ` -{ "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_name": "packer-test-dataDiskEncrypted_{{timestamp}}", - "image_disk_mappings": [ - { - "disk_name": "data_disk1", - "disk_size": 25, - "disk_encrypted": true, - "disk_delete_with_instance": true - }, - { - "disk_name": "data_disk2", - "disk_size": 35, - "disk_encrypted": false, - "disk_delete_with_instance": true - }, - { - "disk_name": "data_disk3", - "disk_size": 45, - "disk_delete_with_instance": true - } - ] - }] -}` - -func checkDataDiskEncrypted() builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - imageId := artifact.AlicloudImages[defaultTestRegion] - - // describe the image, get block devices with a snapshot - client, _ := testAliyunClient() - - describeImagesRequest := ecs.CreateDescribeImagesRequest() - describeImagesRequest.RegionId = defaultTestRegion - describeImagesRequest.ImageId = imageId - imagesResponse, err := client.DescribeImages(describeImagesRequest) - if err != nil { - return fmt.Errorf("describe images failed due to %s", err) - } - - if len(imagesResponse.Images.Image) == 0 { - return fmt.Errorf("image %s generated can not be found", imageId) - } - image := imagesResponse.Images.Image[0] - - var snapshotIds []string - for _, mapping := range image.DiskDeviceMappings.DiskDeviceMapping { - snapshotIds = append(snapshotIds, mapping.SnapshotId) - } - - data, _ := json.Marshal(snapshotIds) - - describeSnapshotRequest := ecs.CreateDescribeSnapshotsRequest() - describeSnapshotRequest.RegionId = defaultTestRegion - describeSnapshotRequest.SnapshotIds = string(data) - describeSnapshotsResponse, err := client.DescribeSnapshots(describeSnapshotRequest) - if err != nil { - return fmt.Errorf("describe data snapshots failed due to %s", err) - } - if len(describeSnapshotsResponse.Snapshots.Snapshot) != 4 { - return fmt.Errorf("expect %d data snapshots but got %d", len(snapshotIds), len(describeSnapshotsResponse.Snapshots.Snapshot)) - } - snapshots := describeSnapshotsResponse.Snapshots.Snapshot - for _, snapshot := range snapshots { - if snapshot.SourceDiskType == DiskTypeSystem { - if snapshot.Encrypted != false { - return fmt.Errorf("the system snapshot expected to be non-encrypted but got true") - } - - continue - } - - if snapshot.SourceDiskSize == "25" && snapshot.Encrypted != true { - return fmt.Errorf("the first snapshot expected to be encrypted but got false") - } - - if snapshot.SourceDiskSize == "35" && snapshot.Encrypted != false { - return fmt.Errorf("the second snapshot expected to be non-encrypted but got true") - } - - if snapshot.SourceDiskSize == "45" && snapshot.Encrypted != false { - return fmt.Errorf("the third snapshot expected to be non-encrypted but got true") - } - } - return nil - } -} - -func TestBuilderAcc_systemDiskEncrypted(t *testing.T) { - t.Parallel() - builderT.Test(t, builderT.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Builder: &Builder{}, - Template: testBuilderAccSystemDiskEncrypted, - Check: checkSystemDiskEncrypted(), - }) -} - -const testBuilderAccSystemDiskEncrypted = ` -{ - "builders": [{ - "type": "test", - "region": "cn-beijing", - "instance_type": "ecs.n1.tiny", - "source_image":"ubuntu_18_04_64_20G_alibase_20190509.vhd", - "io_optimized":"true", - "ssh_username":"root", - "image_name": "packer-test_{{timestamp}}", - "image_encrypted": "true" - }] -}` - -func checkSystemDiskEncrypted() builderT.TestCheckFunc { - return func(artifacts []packersdk.Artifact) error { - if len(artifacts) > 1 { - return fmt.Errorf("more than 1 artifact") - } - - // Get the actual *Artifact pointer so we can access the AMIs directly - artifactRaw := artifacts[0] - artifact, ok := artifactRaw.(*Artifact) - if !ok { - return fmt.Errorf("unknown artifact: %#v", artifactRaw) - } - - // describe the image, get block devices with a snapshot - client, _ := testAliyunClient() - imageId := artifact.AlicloudImages[defaultTestRegion] - - describeImagesRequest := ecs.CreateDescribeImagesRequest() - describeImagesRequest.RegionId = defaultTestRegion - describeImagesRequest.ImageId = imageId - describeImagesRequest.Status = ImageStatusQueried - imagesResponse, err := client.DescribeImages(describeImagesRequest) - if err != nil { - return fmt.Errorf("describe images failed due to %s", err) - } - - if len(imagesResponse.Images.Image) == 0 { - return fmt.Errorf("image %s generated can not be found", imageId) - } - - image := imagesResponse.Images.Image[0] - if image.IsCopied == false { - return fmt.Errorf("image %s generated expexted to be copied but false", image.ImageId) - } - - describeSnapshotRequest := ecs.CreateDescribeSnapshotsRequest() - describeSnapshotRequest.RegionId = defaultTestRegion - describeSnapshotRequest.SnapshotIds = fmt.Sprintf("[\"%s\"]", image.DiskDeviceMappings.DiskDeviceMapping[0].SnapshotId) - describeSnapshotsResponse, err := client.DescribeSnapshots(describeSnapshotRequest) - if err != nil { - return fmt.Errorf("describe system snapshots failed due to %s", err) - } - snapshots := describeSnapshotsResponse.Snapshots.Snapshot[0] - - if snapshots.Encrypted != true { - return fmt.Errorf("system snapshot of image %s expected to be encrypted but got false", imageId) - } - - return nil - } -} - -func testAccPreCheck(t *testing.T) { - if v := os.Getenv("ALICLOUD_ACCESS_KEY"); v == "" { - t.Fatal("ALICLOUD_ACCESS_KEY must be set for acceptance tests") - } - - if v := os.Getenv("ALICLOUD_SECRET_KEY"); v == "" { - t.Fatal("ALICLOUD_SECRET_KEY must be set for acceptance tests") - } -} - -func testAliyunClient() (*ClientWrapper, error) { - access := &AlicloudAccessConfig{AlicloudRegion: "cn-beijing"} - err := access.Config() - if err != nil { - return nil, err - } - client, err := access.Client() - if err != nil { - return nil, err - } - - return client, nil -} diff --git a/builder/alicloud/ecs/builder_test.go b/builder/alicloud/ecs/builder_test.go deleted file mode 100644 index 1127dd69b..000000000 --- a/builder/alicloud/ecs/builder_test.go +++ /dev/null @@ -1,237 +0,0 @@ -package ecs - -import ( - "reflect" - "testing" - - packersdk "github.com/hashicorp/packer-plugin-sdk/packer" - helperconfig "github.com/hashicorp/packer-plugin-sdk/template/config" -) - -func testBuilderConfig() map[string]interface{} { - return map[string]interface{}{ - "access_key": "foo", - "secret_key": "bar", - "source_image": "foo", - "instance_type": "ecs.n1.tiny", - "region": "cn-beijing", - "ssh_username": "root", - "image_name": "foo", - "io_optimized": true, - } -} - -func TestBuilder_ImplementsBuilder(t *testing.T) { - var raw interface{} - raw = &Builder{} - if _, ok := raw.(packersdk.Builder); !ok { - t.Fatalf("Builder should be a builder") - } -} - -func TestBuilder_Prepare_BadType(t *testing.T) { - b := &Builder{} - c := map[string]interface{}{ - "access_key": []string{}, - } - - _, warnings, err := b.Prepare(c) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatalf("prepare should fail") - } -} - -func TestBuilderPrepare_ECSImageName(t *testing.T) { - var b Builder - config := testBuilderConfig() - - // Test good - config["image_name"] = "ecs.n1.tiny" - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - // Test bad - config["ecs_image_name"] = "foo {{" - b = Builder{} - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } - - // Test bad - delete(config, "image_name") - b = Builder{} - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_InvalidKey(t *testing.T) { - var b Builder - config := testBuilderConfig() - - // Add a random key - config["i_should_not_be_valid"] = true - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err == nil { - t.Fatal("should have error") - } -} - -func TestBuilderPrepare_Devices(t *testing.T) { - var b Builder - config := testBuilderConfig() - config["system_disk_mapping"] = map[string]interface{}{ - "disk_category": "cloud", - "disk_description": "system disk", - "disk_name": "system_disk", - "disk_size": 60, - } - config["image_disk_mappings"] = []map[string]interface{}{ - { - "disk_category": "cloud_efficiency", - "disk_name": "data_disk1", - "disk_size": 100, - "disk_snapshot_id": "s-1", - "disk_description": "data disk1", - "disk_device": "/dev/xvdb", - "disk_delete_with_instance": false, - }, - { - "disk_name": "data_disk2", - "disk_device": "/dev/xvdc", - }, - } - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - expected := AlicloudDiskDevice{ - DiskCategory: "cloud", - Description: "system disk", - DiskName: "system_disk", - DiskSize: 60, - Encrypted: helperconfig.TriUnset, - } - if !reflect.DeepEqual(b.config.ECSSystemDiskMapping, expected) { - t.Fatalf("system disk is not set properly, actual: %v; expected: %v", b.config.ECSSystemDiskMapping, expected) - } - if !reflect.DeepEqual(b.config.ECSImagesDiskMappings, []AlicloudDiskDevice{ - { - DiskCategory: "cloud_efficiency", - DiskName: "data_disk1", - DiskSize: 100, - SnapshotId: "s-1", - Description: "data disk1", - Device: "/dev/xvdb", - DeleteWithInstance: false, - }, - { - DiskName: "data_disk2", - Device: "/dev/xvdc", - }, - }) { - t.Fatalf("data disks are not set properly, actual: %#v", b.config.ECSImagesDiskMappings) - } -} - -func TestBuilderPrepare_IgnoreDataDisks(t *testing.T) { - var b Builder - config := testBuilderConfig() - - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - if b.config.AlicloudImageIgnoreDataDisks != false { - t.Fatalf("image_ignore_data_disks is not set properly, expect: %t, actual: %t", false, b.config.AlicloudImageIgnoreDataDisks) - } - - config["image_ignore_data_disks"] = "false" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - if b.config.AlicloudImageIgnoreDataDisks != false { - t.Fatalf("image_ignore_data_disks is not set properly, expect: %t, actual: %t", false, b.config.AlicloudImageIgnoreDataDisks) - } - - config["image_ignore_data_disks"] = "true" - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - if b.config.AlicloudImageIgnoreDataDisks != true { - t.Fatalf("image_ignore_data_disks is not set properly, expect: %t, actual: %t", true, b.config.AlicloudImageIgnoreDataDisks) - } -} - -func TestBuilderPrepare_WaitSnapshotReadyTimeout(t *testing.T) { - var b Builder - config := testBuilderConfig() - - _, warnings, err := b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - if b.config.WaitSnapshotReadyTimeout != 0 { - t.Fatalf("wait_snapshot_ready_timeout is not set properly, expect: %d, actual: %d", 0, b.config.WaitSnapshotReadyTimeout) - } - if b.getSnapshotReadyTimeout() != ALICLOUD_DEFAULT_LONG_TIMEOUT { - t.Fatalf("default timeout is not set properly, expect: %d, actual: %d", ALICLOUD_DEFAULT_LONG_TIMEOUT, b.getSnapshotReadyTimeout()) - } - - config["wait_snapshot_ready_timeout"] = ALICLOUD_DEFAULT_TIMEOUT - _, warnings, err = b.Prepare(config) - if len(warnings) > 0 { - t.Fatalf("bad: %#v", warnings) - } - if err != nil { - t.Fatalf("should not have error: %s", err) - } - - if b.config.WaitSnapshotReadyTimeout != ALICLOUD_DEFAULT_TIMEOUT { - t.Fatalf("wait_snapshot_ready_timeout is not set properly, expect: %d, actual: %d", ALICLOUD_DEFAULT_TIMEOUT, b.config.WaitSnapshotReadyTimeout) - } - - if b.getSnapshotReadyTimeout() != ALICLOUD_DEFAULT_TIMEOUT { - t.Fatalf("default timeout is not set properly, expect: %d, actual: %d", ALICLOUD_DEFAULT_TIMEOUT, b.getSnapshotReadyTimeout()) - } -} diff --git a/builder/alicloud/ecs/client_test.go b/builder/alicloud/ecs/client_test.go deleted file mode 100644 index 63b9a6a85..000000000 --- a/builder/alicloud/ecs/client_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package ecs - -import ( - "fmt" - "testing" - "time" - - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" -) - -func TestWaitForExpectedExceedRetryTimes(t *testing.T) { - c := ClientWrapper{} - - iter := 0 - waitDone := make(chan bool, 1) - - go func() { - _, _ = c.WaitForExpected(&WaitForExpectArgs{ - RequestFunc: func() (responses.AcsResponse, error) { - iter++ - return nil, fmt.Errorf("test: let iteration %d failed", iter) - }, - EvalFunc: func(response responses.AcsResponse, err error) WaitForExpectEvalResult { - if err != nil { - fmt.Printf("need retry: %s\n", err) - return WaitForExpectToRetry - } - - return WaitForExpectSuccess - }, - }) - - waitDone <- true - }() - - select { - case <-waitDone: - if iter != defaultRetryTimes { - t.Fatalf("WaitForExpected should terminate at the %d iterations", defaultRetryTimes) - } - } -} - -func TestWaitForExpectedExceedRetryTimeout(t *testing.T) { - c := ClientWrapper{} - - expectTimeout := 10 * time.Second - iter := 0 - waitDone := make(chan bool, 1) - - go func() { - _, _ = c.WaitForExpected(&WaitForExpectArgs{ - RequestFunc: func() (responses.AcsResponse, error) { - iter++ - return nil, fmt.Errorf("test: let iteration %d failed", iter) - }, - EvalFunc: func(response responses.AcsResponse, err error) WaitForExpectEvalResult { - if err != nil { - fmt.Printf("need retry: %s\n", err) - return WaitForExpectToRetry - } - - return WaitForExpectSuccess - }, - RetryTimeout: expectTimeout, - }) - - waitDone <- true - }() - - timeTolerance := 1 * time.Second - select { - case <-waitDone: - if iter > int(expectTimeout/defaultRetryInterval) { - t.Fatalf("WaitForExpected should terminate before the %d iterations", int(expectTimeout/defaultRetryInterval)) - } - case <-time.After(expectTimeout + timeTolerance): - t.Fatalf("WaitForExpected should terminate within %f seconds", (expectTimeout + timeTolerance).Seconds()) - } -} diff --git a/builder/alicloud/ecs/image_config_test.go b/builder/alicloud/ecs/image_config_test.go deleted file mode 100644 index 133c0a409..000000000 --- a/builder/alicloud/ecs/image_config_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package ecs - -import ( - "testing" -) - -func testAlicloudImageConfig() *AlicloudImageConfig { - return &AlicloudImageConfig{ - AlicloudImageName: "foo", - } -} - -func TestECSImageConfigPrepare_name(t *testing.T) { - c := testAlicloudImageConfig() - if err := c.Prepare(nil); err != nil { - t.Fatalf("shouldn't have err: %s", err) - } - - c.AlicloudImageName = "" - if err := c.Prepare(nil); err == nil { - t.Fatal("should have error") - } -} - -func TestAMIConfigPrepare_regions(t *testing.T) { - c := testAlicloudImageConfig() - c.AlicloudImageDestinationRegions = nil - if err := c.Prepare(nil); err != nil { - t.Fatalf("shouldn't have err: %s", err) - } - - c.AlicloudImageDestinationRegions = []string{"cn-beijing", "cn-hangzhou", "eu-central-1"} - if err := c.Prepare(nil); err != nil { - t.Fatalf("bad: %s", err) - } - - c.AlicloudImageDestinationRegions = nil - c.AlicloudImageSkipRegionValidation = true - if err := c.Prepare(nil); err != nil { - t.Fatal("shouldn't have error") - } - c.AlicloudImageSkipRegionValidation = false -} - -func TestECSImageConfigPrepare_imageTags(t *testing.T) { - c := testAlicloudImageConfig() - c.AlicloudImageTags = map[string]string{ - "TagKey1": "TagValue1", - "TagKey2": "TagValue2", - } - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - if len(c.AlicloudImageTags) != 2 || c.AlicloudImageTags["TagKey1"] != "TagValue1" || - c.AlicloudImageTags["TagKey2"] != "TagValue2" { - t.Fatalf("invalid value, expected: %s, actual: %s", map[string]string{ - "TagKey1": "TagValue1", - "TagKey2": "TagValue2", - }, c.AlicloudImageTags) - } -} diff --git a/builder/alicloud/ecs/run_config_test.go b/builder/alicloud/ecs/run_config_test.go deleted file mode 100644 index b7e5411d9..000000000 --- a/builder/alicloud/ecs/run_config_test.go +++ /dev/null @@ -1,178 +0,0 @@ -package ecs - -import ( - "io/ioutil" - "os" - "testing" - - "github.com/hashicorp/packer-plugin-sdk/communicator" -) - -func testConfig() *RunConfig { - return &RunConfig{ - AlicloudSourceImage: "alicloud_images", - InstanceType: "ecs.n1.tiny", - Comm: communicator.Config{ - SSH: communicator.SSH{ - SSHUsername: "alicloud", - }, - }, - } -} - -func TestRunConfigPrepare(t *testing.T) { - c := testConfig() - err := c.Prepare(nil) - if len(err) > 0 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_InstanceType(t *testing.T) { - c := testConfig() - c.InstanceType = "" - if err := c.Prepare(nil); len(err) != 1 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_SourceECSImage(t *testing.T) { - c := testConfig() - c.AlicloudSourceImage = "" - if err := c.Prepare(nil); len(err) != 1 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_SSHPort(t *testing.T) { - c := testConfig() - c.Comm.SSHPort = 0 - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - if c.Comm.SSHPort != 22 { - t.Fatalf("invalid value: %d", c.Comm.SSHPort) - } - - c.Comm.SSHPort = 44 - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - if c.Comm.SSHPort != 44 { - t.Fatalf("invalid value: %d", c.Comm.SSHPort) - } -} - -func TestRunConfigPrepare_UserData(t *testing.T) { - c := testConfig() - tf, err := ioutil.TempFile("", "packer") - if err != nil { - t.Fatalf("err: %s", err) - } - defer os.Remove(tf.Name()) - defer tf.Close() - - c.UserData = "foo" - c.UserDataFile = tf.Name() - if err := c.Prepare(nil); len(err) != 1 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_UserDataFile(t *testing.T) { - c := testConfig() - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - c.UserDataFile = "idontexistidontthink" - if err := c.Prepare(nil); len(err) != 1 { - t.Fatalf("err: %s", err) - } - - tf, err := ioutil.TempFile("", "packer") - if err != nil { - t.Fatalf("err: %s", err) - } - defer os.Remove(tf.Name()) - defer tf.Close() - - c.UserDataFile = tf.Name() - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } -} - -func TestRunConfigPrepare_TemporaryKeyPairName(t *testing.T) { - c := testConfig() - c.Comm.SSHTemporaryKeyPairName = "" - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - if c.Comm.SSHTemporaryKeyPairName == "" { - t.Fatal("keypair name is empty") - } - - c.Comm.SSHTemporaryKeyPairName = "ssh-key-123" - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - - if c.Comm.SSHTemporaryKeyPairName != "ssh-key-123" { - t.Fatal("keypair name does not match") - } -} - -func TestRunConfigPrepare_SSHPrivateIp(t *testing.T) { - c := testConfig() - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - if c.SSHPrivateIp != false { - t.Fatalf("invalid value, expected: %t, actul: %t", false, c.SSHPrivateIp) - } - c.SSHPrivateIp = true - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - if c.SSHPrivateIp != true { - t.Fatalf("invalid value, expected: %t, actul: %t", true, c.SSHPrivateIp) - } - c.SSHPrivateIp = false - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - if c.SSHPrivateIp != false { - t.Fatalf("invalid value, expected: %t, actul: %t", false, c.SSHPrivateIp) - } -} - -func TestRunConfigPrepare_DisableStopInstance(t *testing.T) { - c := testConfig() - - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - if c.DisableStopInstance != false { - t.Fatalf("invalid value, expected: %t, actul: %t", false, c.DisableStopInstance) - } - - c.DisableStopInstance = true - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - if c.DisableStopInstance != true { - t.Fatalf("invalid value, expected: %t, actul: %t", true, c.DisableStopInstance) - } - - c.DisableStopInstance = false - if err := c.Prepare(nil); len(err) != 0 { - t.Fatalf("err: %s", err) - } - if c.DisableStopInstance != false { - t.Fatalf("invalid value, expected: %t, actul: %t", false, c.DisableStopInstance) - } -} diff --git a/builder/alicloud/examples/basic/alicloud.json b/builder/alicloud/examples/basic/alicloud.json deleted file mode 100644 index d0c643f48..000000000 --- a/builder/alicloud/examples/basic/alicloud.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "variables": { - "access_key": "{{env `ALICLOUD_ACCESS_KEY`}}", - "secret_key": "{{env `ALICLOUD_SECRET_KEY`}}" - }, - "builders": [{ - "type":"alicloud-ecs", - "access_key":"{{user `access_key`}}", - "secret_key":"{{user `secret_key`}}", - "region":"cn-beijing", - "image_name":"packer_basic", - "source_image":"centos_7_03_64_20G_alibase_20170818.vhd", - "ssh_username":"root", - "instance_type":"ecs.n1.tiny", - "internet_charge_type":"PayByTraffic", - "io_optimized":"true" - }], - "provisioners": [{ - "type": "shell", - "inline": [ - "sleep 30", - "yum install redis.x86_64 -y" - ] - }] -} diff --git a/builder/alicloud/examples/basic/alicloud_windows.json b/builder/alicloud/examples/basic/alicloud_windows.json deleted file mode 100644 index 21fd98d64..000000000 --- a/builder/alicloud/examples/basic/alicloud_windows.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "variables": { - "access_key": "{{env `ALICLOUD_ACCESS_KEY`}}", - "secret_key": "{{env `ALICLOUD_SECRET_KEY`}}" - }, - "builders": [{ - "type":"alicloud-ecs", - "access_key":"{{user `access_key`}}", - "secret_key":"{{user `secret_key`}}", - "region":"cn-beijing", - "image_name":"packer_test", - "source_image":"winsvr_64_dtcC_1809_en-us_40G_alibase_20190318.vhd", - "instance_type":"ecs.n1.tiny", - "io_optimized":"true", - "internet_charge_type":"PayByTraffic", - "image_force_delete":"true", - "communicator": "winrm", - "winrm_port": 5985, - "winrm_username": "Administrator", - "winrm_password": "Test1234", - "user_data_file": "examples/alicloud/basic/winrm_enable_userdata.ps1" - }], - "provisioners": [{ - "type": "powershell", - "inline": ["dir c:\\"] - }] -} diff --git a/builder/alicloud/examples/basic/alicloud_with_data_disk.json b/builder/alicloud/examples/basic/alicloud_with_data_disk.json deleted file mode 100644 index 06bcf14e2..000000000 --- a/builder/alicloud/examples/basic/alicloud_with_data_disk.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "variables": { - "access_key": "{{env `ALICLOUD_ACCESS_KEY`}}", - "secret_key": "{{env `ALICLOUD_SECRET_KEY`}}" - }, - "builders": [{ - "type":"alicloud-ecs", - "access_key":"{{user `access_key`}}", - "secret_key":"{{user `secret_key`}}", - "region":"cn-beijing", - "image_name":"packer_with_data_disk", - "source_image":"centos_7_03_64_20G_alibase_20170818.vhd", - "ssh_username":"root", - "instance_type":"ecs.n1.tiny", - "internet_charge_type":"PayByTraffic", - "io_optimized":"true", - "image_disk_mappings":[ - { - "disk_name":"data1", - "disk_size":20, - "disk_delete_with_instance": true - },{ - "disk_name":"data2", - "disk_size":20, - "disk_device":"/dev/xvdz", - "disk_delete_with_instance": true - } - ] - }], - "provisioners": [{ - "type": "shell", - "inline": [ - "sleep 30", - "yum install redis.x86_64 -y" - ] - }] -} diff --git a/builder/alicloud/examples/basic/winrm_enable_userdata.ps1 b/builder/alicloud/examples/basic/winrm_enable_userdata.ps1 deleted file mode 100644 index a61d8ec04..000000000 --- a/builder/alicloud/examples/basic/winrm_enable_userdata.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -#powershell -write-output "Running User Data Script" -write-host "(host) Running User Data Script" -Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force -ErrorAction Ignore -# Don't set this before Set-ExecutionPolicy as it throws an error -$ErrorActionPreference = "stop" -# Remove HTTP listener -Remove-Item -Path WSMan:\Localhost\listener\listener* -Recurse -# WinRM -write-output "Setting up WinRM" -write-host "(host) setting up WinRM" -cmd.exe /c winrm quickconfig -q -cmd.exe /c winrm quickconfig '-transport:http' -cmd.exe /c winrm set "winrm/config" '@{MaxTimeoutms="1800000"}' -cmd.exe /c winrm set "winrm/config/winrs" '@{MaxMemoryPerShellMB="10240"}' -cmd.exe /c winrm set "winrm/config/service" '@{AllowUnencrypted="true"}' -cmd.exe /c winrm set "winrm/config/client" '@{AllowUnencrypted="true"}' -cmd.exe /c winrm set "winrm/config/service/auth" '@{Basic="true"}' -cmd.exe /c winrm set "winrm/config/client/auth" '@{Basic="true"}' -cmd.exe /c winrm set "winrm/config/service/auth" '@{CredSSP="true"}' -cmd.exe /c winrm set "winrm/config/listener?Address=*+Transport=HTTP" '@{Port="5985"}' -cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yes -cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985" -cmd.exe /c net stop winrm -cmd.exe /c sc config winrm start= auto -cmd.exe /c net start winrm diff --git a/builder/alicloud/examples/chef/alicloud.json b/builder/alicloud/examples/chef/alicloud.json deleted file mode 100644 index d5d2a6f7a..000000000 --- a/builder/alicloud/examples/chef/alicloud.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "variables": { - "access_key": "{{env `ALICLOUD_ACCESS_KEY`}}", - "secret_key": "{{env `ALICLOUD_SECRET_KEY`}}" - }, - "builders": [{ - "type":"alicloud-ecs", - "access_key":"{{user `access_key`}}", - "secret_key":"{{user `secret_key`}}", - "region":"cn-beijing", - "image_name":"packer_chef2", - "source_image":"ubuntu_18_04_64_20G_alibase_20190223.vhd", - "ssh_username":"root", - "instance_type":"ecs.n1.medium", - "io_optimized":"true", - "image_force_delete":"true", - "internet_charge_type":"PayByTraffic", - "ssh_password":"Test1234", - "user_data_file":"examples/alicloud/chef/user_data.sh" - }], - "provisioners": [{ - "type": "file", - "source": "examples/alicloud/chef/chef.sh", - "destination": "/root/" - },{ - "type": "shell", - "inline": [ - "cd /root/", - "chmod 755 chef.sh", - "./chef.sh", - "chef-server-ctl reconfigure" - ] - }] -} diff --git a/builder/alicloud/examples/chef/chef.sh b/builder/alicloud/examples/chef/chef.sh deleted file mode 100644 index 3e3144561..000000000 --- a/builder/alicloud/examples/chef/chef.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -#if the related deb pkg not found, please replace with it other available repository url -HOSTNAME=`ifconfig eth1|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1` -if [ not $HOSTNAME ] ; then - HOSTNAME=`ifconfig eth0|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1` -fi -CHEF_SERVER_URL='http://dubbo.oss-cn-shenzhen.aliyuncs.com/chef-server-core_12.8.0-1_amd64.deb' -CHEF_CONSOLE_URL='http://dubbo.oss-cn-shenzhen.aliyuncs.com/chef-manage_2.4.3-1_amd64.deb' -CHEF_SERVER_ADMIN='admin' -CHEF_SERVER_ADMIN_PASSWORD='vmADMIN123' -ORGANIZATION='aliyun' -ORGANIZATION_FULL_NAME='Aliyun, Inc' -#specify hostname -hostname $HOSTNAME - -mkdir ~/.pemfile -#install chef server -wget $CHEF_SERVER_URL -sudo dpkg -i chef-server-core_*.deb -sudo chef-server-ctl reconfigure - -#create admin user -sudo chef-server-ctl user-create $CHEF_SERVER_ADMIN $CHEF_SERVER_ADMIN $CHEF_SERVER_ADMIN 641002259@qq.com $CHEF_SERVER_ADMIN_PASSWORD -f ~/.pemfile/admin.pem - -#create aliyun organization -sudo chef-server-ctl org-create $ORGANIZATION $ORGANIZATION_FULL_NAME --association_user $CHEF_SERVER_ADMIN -f ~/.pemfile/aliyun-validator.pem - -#install chef management console -wget $CHEF_CONSOLE_URL -sudo dpkg -i chef-manage_*.deb -sudo chef-server-ctl reconfigure - -type expect >/dev/null 2>&1 || { echo >&2 "Install Expect..."; apt-get -y install expect; } -echo "spawn sudo chef-manage-ctl reconfigure" >> chef-manage-confirm.exp -echo "expect \"*Press any key to continue\"" >> chef-manage-confirm.exp -echo "send \"a\\\n\"" >> chef-manage-confirm.exp -echo "expect \".*chef-manage 2.4.3 license: \\\"Chef-MLSA\\\".*\"" >> chef-manage-confirm.exp -echo "send \"q\"" >> chef-manage-confirm.exp -echo "expect \".*Type 'yes' to accept the software license agreement, or anything else to cancel.\"" >> chef-manage-confirm.exp -echo "send \"yes\\\n\"" >> chef-manage-confirm.exp -echo "interact" >> chef-manage-confirm.exp -expect chef-manage-confirm.exp -rm -f chef-manage-confirm.exp - -#clean -rm -rf chef-manage_2.4.3-1_amd64.deb -rm -rf chef-server-core_12.8.0-1_amd64.deb diff --git a/builder/alicloud/examples/chef/user_data.sh b/builder/alicloud/examples/chef/user_data.sh deleted file mode 100644 index c58826616..000000000 --- a/builder/alicloud/examples/chef/user_data.sh +++ /dev/null @@ -1,6 +0,0 @@ -HOSTNAME=`ifconfig eth1|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1` -if [ not $HOSTNAME ] ; then - HOSTNAME=`ifconfig eth0|grep 'inet addr'|cut -d ":" -f2|cut -d " " -f1` -fi -hostname $HOSTNAME -chef-server-ctl reconfigure diff --git a/builder/alicloud/examples/jenkins/alicloud.json b/builder/alicloud/examples/jenkins/alicloud.json deleted file mode 100644 index 58ac517ab..000000000 --- a/builder/alicloud/examples/jenkins/alicloud.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "variables": { - "access_key": "{{env `ALICLOUD_ACCESS_KEY`}}", - "secret_key": "{{env `ALICLOUD_SECRET_KEY`}}" - }, - "builders": [{ - "type":"alicloud-ecs", - "access_key":"{{user `access_key`}}", - "secret_key":"{{user `secret_key`}}", - "region":"cn-beijing", - "image_name":"packer_jenkins", - "source_image":"ubuntu_18_04_64_20G_alibase_20190223.vhd", - "ssh_username":"root", - "instance_type":"ecs.n1.medium", - "io_optimized":"true", - "internet_charge_type":"PayByTraffic", - "image_force_delete":"true", - "ssh_password":"Test12345" - }], - "provisioners": [{ - "type": "file", - "source": "examples/alicloud/jenkins/jenkins.sh", - "destination": "/root/" - },{ - "type": "shell", - "inline": [ - "cd /root/", - "chmod 755 jenkins.sh", - "./jenkins.sh" - ] - }] -} diff --git a/builder/alicloud/examples/jenkins/jenkins.sh b/builder/alicloud/examples/jenkins/jenkins.sh deleted file mode 100644 index 72972c24e..000000000 --- a/builder/alicloud/examples/jenkins/jenkins.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -JENKINS_URL='http://mirrors.jenkins.io/war-stable/2.32.2/jenkins.war' - -TOMCAT_VERSION='7.0.77' -TOMCAT_NAME="apache-tomcat-$TOMCAT_VERSION" -TOMCAT_PACKAGE="$TOMCAT_NAME.tar.gz" -TOMCAT_URL="http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v$TOMCAT_VERSION/bin/$TOMCAT_PACKAGE" -TOMCAT_PATH="/opt/$TOMCAT_NAME" - -#install jdk -if grep -Eqi "Ubuntu|Debian|Raspbian" /etc/issue || grep -Eq "Ubuntu|Debian|Raspbian" /etc/*-release; then - sudo apt-get update -y - sudo apt-get install -y openjdk-7-jdk -elif grep -Eqi "CentOS|Fedora|Red Hat Enterprise Linux Server" /etc/issue || grep -Eq "CentOS|Fedora|Red Hat Enterprise Linux Server" /etc/*-release; then - sudo yum update -y - sudo yum install -y openjdk-7-jdk -else - echo "Unknown OS type." -fi - -#install jenkins server -mkdir ~/work -cd ~/work - -#install tomcat -wget $TOMCAT_URL -tar -zxvf $TOMCAT_PACKAGE -mv $TOMCAT_NAME /opt - -#install -wget $JENKINS_URL -mv jenkins.war $TOMCAT_PATH/webapps/ - -#set environment -echo "TOMCAT_PATH=\"$TOMCAT_PATH\"">>/etc/profile -echo "JENKINS_HOME=\"$TOMCAT_PATH/webapps/jenkins\"">>/etc/profile -echo PATH="\"\$PATH:\$TOMCAT_PATH:\$JENKINS_HOME\"">>/etc/profile -. /etc/profile - -#start tomcat & jenkins -$TOMCAT_PATH/bin/startup.sh - -#set start on boot -sed -i "/#!\/bin\/sh/a$TOMCAT_PATH/bin/startup.sh" /etc/rc.local - -#clean -rm -rf ~/work diff --git a/builder/alicloud/examples/local/centos.json b/builder/alicloud/examples/local/centos.json deleted file mode 100644 index 59418074f..000000000 --- a/builder/alicloud/examples/local/centos.json +++ /dev/null @@ -1,59 +0,0 @@ -{"variables": { - "box_basename": "centos-6.8", - "build_timestamp": "{{isotime \"20060102150405\"}}", - "cpus": "1", - "disk_size": "4096", - "git_revision": "__unknown_git_revision__", - "headless": "", - "http_proxy": "{{env `http_proxy`}}", - "https_proxy": "{{env `https_proxy`}}", - "iso_checksum": "md5:0ca12fe5f28c2ceed4f4084b41ff8a0b", - "iso_name": "CentOS-6.8-x86_64-minimal.iso", - "ks_path": "centos-6.8/ks.cfg", - "memory": "512", - "metadata": "floppy/dummy_metadata.json", - "mirror": "http://mirrors.aliyun.com/centos", - "mirror_directory": "6.8/isos/x86_64", - "name": "centos-6.8", - "no_proxy": "{{env `no_proxy`}}", - "template": "centos-6.8-x86_64", - "version": "2.1.TIMESTAMP" - }, - "builders":[ - { - "boot_command": [ - " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}" - ], - "boot_wait": "10s", - "disk_size": "{{user `disk_size`}}", - "headless": "{{ user `headless` }}", - "http_directory": "http", - "iso_checksum": "{{user `iso_checksum`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}", - "output_directory": "packer-{{user `template`}}-qemu", - "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p", - "ssh_password": "vagrant", - "ssh_port": 22, - "ssh_username": "root", - "ssh_timeout": "10000s", - "type": "qemu", - "vm_name": "{{ user `template` }}.raw", - "net_device": "virtio-net", - "disk_interface": "virtio", - "format": "raw" - } - ], -"post-processors":[ - { - "type":"alicloud-import", - "oss_bucket_name": "packer", - "image_name": "packer_import", - "image_os_type": "linux", - "image_platform": "CentOS", - "image_architecture": "x86_64", - "image_system_size": "40", - "region":"cn-beijing" - } - ] -} diff --git a/builder/alicloud/examples/local/http/centos-6.8/ks.cfg b/builder/alicloud/examples/local/http/centos-6.8/ks.cfg deleted file mode 100644 index 90864b006..000000000 --- a/builder/alicloud/examples/local/http/centos-6.8/ks.cfg +++ /dev/null @@ -1,69 +0,0 @@ -install -cdrom -lang en_US.UTF-8 -keyboard us -network --bootproto=dhcp -rootpw vagrant -firewall --disabled -selinux --permissive -timezone UTC -unsupported_hardware -bootloader --location=mbr -text -skipx -zerombr -clearpart --all --initlabel -autopart -auth --enableshadow --passalgo=sha512 --kickstart -firstboot --disabled -reboot -user --name=vagrant --plaintext --password vagrant -key --skip - -%packages --nobase --ignoremissing --excludedocs -# vagrant needs this to copy initial files via scp -openssh-clients -sudo -kernel-headers -kernel-devel -gcc -make -perl -wget -nfs-utils --fprintd-pam --intltool - -# unnecessary firmware --aic94xx-firmware --atmel-firmware --b43-openfwwf --bfa-firmware --ipw2100-firmware --ipw2200-firmware --ivtv-firmware --iwl100-firmware --iwl1000-firmware --iwl3945-firmware --iwl4965-firmware --iwl5000-firmware --iwl5150-firmware --iwl6000-firmware --iwl6000g2a-firmware --iwl6050-firmware --libertas-usb8388-firmware --ql2100-firmware --ql2200-firmware --ql23xx-firmware --ql2400-firmware --ql2500-firmware --rt61pci-firmware --rt73usb-firmware --xorg-x11-drv-ati-firmware --zd1211-firmware - -%post -# Force to set SELinux to a permissive mode -sed -i -e 's/\(^SELINUX=\).*$/\1permissive/' /etc/selinux/config -# sudo -echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant diff --git a/builder/alicloud/version/version.go b/builder/alicloud/version/version.go deleted file mode 100644 index c5aac293a..000000000 --- a/builder/alicloud/version/version.go +++ /dev/null @@ -1,13 +0,0 @@ -package version - -import ( - "github.com/hashicorp/packer-plugin-sdk/version" - packerVersion "github.com/hashicorp/packer/version" -) - -var AlicloudPluginVersion *version.PluginVersion - -func init() { - AlicloudPluginVersion = version.InitializePluginVersion( - packerVersion.Version, packerVersion.VersionPrerelease) -} diff --git a/command/plugin.go b/command/plugin.go index 47e6255f8..33e909fac 100644 --- a/command/plugin.go +++ b/command/plugin.go @@ -13,7 +13,6 @@ import ( packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/plugin" - alicloudecsbuilder "github.com/hashicorp/packer/builder/alicloud/ecs" azurearmbuilder "github.com/hashicorp/packer/builder/azure/arm" azurechrootbuilder "github.com/hashicorp/packer/builder/azure/chroot" azuredtlbuilder "github.com/hashicorp/packer/builder/azure/dtl" @@ -39,7 +38,6 @@ import ( uclouduhostbuilder "github.com/hashicorp/packer/builder/ucloud/uhost" vagrantbuilder "github.com/hashicorp/packer/builder/vagrant" yandexbuilder "github.com/hashicorp/packer/builder/yandex" - alicloudimportpostprocessor "github.com/hashicorp/packer/post-processor/alicloud-import" artificepostprocessor "github.com/hashicorp/packer/post-processor/artifice" checksumpostprocessor "github.com/hashicorp/packer/post-processor/checksum" compresspostprocessor "github.com/hashicorp/packer/post-processor/compress" @@ -74,7 +72,6 @@ type PluginCommand struct { } var Builders = map[string]packersdk.Builder{ - "alicloud-ecs": new(alicloudecsbuilder.Builder), "azure-arm": new(azurearmbuilder.Builder), "azure-chroot": new(azurechrootbuilder.Builder), "azure-dtl": new(azuredtlbuilder.Builder), @@ -122,7 +119,6 @@ var Provisioners = map[string]packersdk.Provisioner{ } var PostProcessors = map[string]packersdk.PostProcessor{ - "alicloud-import": new(alicloudimportpostprocessor.PostProcessor), "artifice": new(artificepostprocessor.PostProcessor), "checksum": new(checksumpostprocessor.PostProcessor), "compress": new(compresspostprocessor.PostProcessor), diff --git a/command/vendored_plugins.go b/command/vendored_plugins.go index 1c3347ead..49b36f1e4 100644 --- a/command/vendored_plugins.go +++ b/command/vendored_plugins.go @@ -7,6 +7,8 @@ import ( // still vendored with Packer for now. Importing as library instead of // forcing use of packer init, until packer v1.8.0 exoscaleimportpostprocessor "github.com/exoscale/packer-plugin-exoscale/post-processor/exoscale-import" + alicloudecsbuilder "github.com/hashicorp/packer-plugin-alicloud/builder/ecs" + alicloudimportpostprocessor "github.com/hashicorp/packer-plugin-alicloud/post-processor/alicloud-import" amazonchrootbuilder "github.com/hashicorp/packer-plugin-amazon/builder/chroot" amazonebsbuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebs" amazonebssurrogatebuilder "github.com/hashicorp/packer-plugin-amazon/builder/ebssurrogate" @@ -57,6 +59,7 @@ var VendoredDatasources = map[string]packersdk.Datasource{ // VendoredBuilders are builder components that were once bundled with the // Packer core, but are now being imported from their counterpart plugin repos var VendoredBuilders = map[string]packersdk.Builder{ + "alicloud-ecs": new(alicloudecsbuilder.Builder), "amazon-ebs": new(amazonebsbuilder.Builder), "amazon-chroot": new(amazonchrootbuilder.Builder), "amazon-ebssurrogate": new(amazonebssurrogatebuilder.Builder), @@ -95,6 +98,7 @@ var VendoredProvisioners = map[string]packersdk.Provisioner{ // VendoredPostProcessors are post-processor components that were once bundled with the // Packer core, but are now being imported from their counterpart plugin repos var VendoredPostProcessors = map[string]packersdk.PostProcessor{ + "alicloud-import": new(alicloudimportpostprocessor.PostProcessor), "amazon-import": new(anazibimportpostprocessor.PostProcessor), "docker-import": new(dockerimportpostprocessor.PostProcessor), "docker-push": new(dockerpushpostprocessor.PostProcessor), diff --git a/go.mod b/go.mod index 6525fb661..19e05927e 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,6 @@ require ( github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 github.com/Azure/go-autorest/autorest/date v0.2.0 github.com/Azure/go-autorest/autorest/to v0.3.0 - github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190418113227-25233c783f4e - github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f github.com/approvals/go-approval-tests v0.0.0-20160714161514-ad96e53bea43 github.com/aws/aws-sdk-go v1.38.22 github.com/biogo/hts v0.0.0-20160420073057-50da7d4131a3 @@ -41,6 +39,7 @@ require ( github.com/hashicorp/go-uuid v1.0.2 github.com/hashicorp/go-version v1.3.0 github.com/hashicorp/hcl/v2 v2.9.1 + github.com/hashicorp/packer-plugin-alicloud v0.0.2 github.com/hashicorp/packer-plugin-amazon v0.0.1 github.com/hashicorp/packer-plugin-ansible v0.0.2 github.com/hashicorp/packer-plugin-docker v0.0.7 diff --git a/go.sum b/go.sum index c8eda1c88..ea662b6a3 100644 --- a/go.sum +++ b/go.sum @@ -97,10 +97,12 @@ github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af h1:DBNMBMuMiWYu0b+8KM github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190418113227-25233c783f4e h1:/8wOj52pewmIX/8d5eVO3t7Rr3astkBI/ruyg4WNqRo= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190418113227-25233c783f4e/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA= -github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f h1:jI4DIE5Vf4oRaHfthB0oRhU+yuYuoOTurDzwAlskP00= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.1028 h1:lBif3zUMR6sjgfONVqfnjjjdXIK09S4Lvkze20ApE8w= +github.com/aliyun/alibaba-cloud-sdk-go v1.61.1028/go.mod h1:pUKYbK5JQ+1Dfxk80P0qxGqe5dkxDoabbZS7zOcouyA= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/aliyun/aliyun-oss-go-sdk v2.1.8+incompatible h1:hLUNPbx10wawWW7DeNExvTrlb90db3UnnNTFKHZEFhE= +github.com/aliyun/aliyun-oss-go-sdk v2.1.8+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/antchfx/xpath v0.0.0-20170728053731-b5c552e1acbd/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= github.com/antchfx/xpath v1.1.11 h1:WOFtK8TVAjLm3lbgqeP0arlHpvCEeTANeWZ/csPpJkQ= github.com/antchfx/xpath v1.1.11/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= @@ -160,6 +162,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.1.2 h1:7Kxqov7uQeP8WUEO0iHz3j9Bh0E1r github.com/aws/aws-sdk-go-v2/service/sts v1.1.2/go.mod h1:zu7rotIY9P4Aoc6ytqLP9jeYrECDHUODB5Gbp+BSHl8= github.com/aws/smithy-go v1.2.0 h1:0PoGBWXkXDIyVdPaZW9gMhaGzj3UOAgTdiVoHuuZAFA= github.com/aws/smithy-go v1.2.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA= +github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= @@ -269,6 +273,7 @@ github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 h1:zN2lZNZRflqFyxVaTIU61KNKQ9C0055u9CAfpmqUvo4= github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3/go.mod h1:nPpo7qLxd6XL3hWJG/O60sR8ZKfMCiIoNap5GvD12KU= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -457,6 +462,8 @@ github.com/hashicorp/packer v1.6.7-0.20210217093213-201869d627bf/go.mod h1:+EWPP github.com/hashicorp/packer v1.7.0/go.mod h1:3KRJcwOctl2JaAGpQMI1bWQRArfWNWqcYjO6AOsVVGQ= github.com/hashicorp/packer v1.7.1/go.mod h1:ApnmMINvuhhnfPyTVqZu6jznDWPVYDJUw7e188DFCmo= github.com/hashicorp/packer v1.7.2/go.mod h1:c/QB/DWK5fSdtNWrTb9etWacmbm01UY23ZILpGundCY= +github.com/hashicorp/packer-plugin-alicloud v0.0.2 h1:uBVp53+yOfzbhUjC8WtQ/7uLcfrpboykaNNBxFVkQw4= +github.com/hashicorp/packer-plugin-alicloud v0.0.2/go.mod h1:RCU4CLSJwSqHoNLlA+UghRw1JXqqzCPOE6Pv/EYjtgU= github.com/hashicorp/packer-plugin-amazon v0.0.1 h1:EuyjNK9bL7WhQeIJzhBJxOx8nyc61ai5UbOsb1PIVwI= github.com/hashicorp/packer-plugin-amazon v0.0.1/go.mod h1:12c9msibyHdId+Mk/pCbdRb1KaLIhaNyxeJ6n8bZt30= github.com/hashicorp/packer-plugin-ansible v0.0.2 h1:nvBtCedXhUI5T6Up5+bmhlY7rmk8FjWuFv9A2joK7TU= @@ -490,6 +497,7 @@ github.com/hashicorp/packer-plugin-sdk v0.1.1/go.mod h1:1d3nqB9LUsXMQaNUiL67Q+WY github.com/hashicorp/packer-plugin-sdk v0.1.2/go.mod h1:KRjczE1/c9NV5Re+PXt3myJsVTI/FxEHpZjRjOH0Fug= github.com/hashicorp/packer-plugin-sdk v0.1.3-0.20210407232143-c217d82aefb6/go.mod h1:xePpgQgQYv/bamiypx3hH9ukidxDdcN8q0R0wLi8IEQ= github.com/hashicorp/packer-plugin-sdk v0.1.3/go.mod h1:xePpgQgQYv/bamiypx3hH9ukidxDdcN8q0R0wLi8IEQ= +github.com/hashicorp/packer-plugin-sdk v0.1.4/go.mod h1:xePpgQgQYv/bamiypx3hH9ukidxDdcN8q0R0wLi8IEQ= github.com/hashicorp/packer-plugin-sdk v0.2.0 h1:A4Dq7p4y1vscY4gMzp7GQaXyDJYYhP4ukp4fapPSOY4= github.com/hashicorp/packer-plugin-sdk v0.2.0/go.mod h1:0DiOMEBldmB0HEhp0npFSSygC8bIvW43pphEgWkp2WU= github.com/hashicorp/packer-plugin-virtualbox v0.0.1 h1:vTfy7a10RUVMdNnDLo0EQrCVbAG4rGWkaDTMC7MVBi4= @@ -530,6 +538,7 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joyent/triton-go v0.0.0-20180628001255-830d2b111e62 h1:JHCT6xuyPUrbbgAPE/3dqlvUKzRHMNuTBKKUb6OeR/k= github.com/joyent/triton-go v0.0.0-20180628001255-830d2b111e62/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -709,6 +718,7 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= diff --git a/post-processor/alicloud-import/version/version.go b/post-processor/alicloud-import/version/version.go deleted file mode 100644 index e0aa46d60..000000000 --- a/post-processor/alicloud-import/version/version.go +++ /dev/null @@ -1,13 +0,0 @@ -package version - -import ( - "github.com/hashicorp/packer-plugin-sdk/version" - packerVersion "github.com/hashicorp/packer/version" -) - -var AlicloudImportPluginVersion *version.PluginVersion - -func init() { - AlicloudImportPluginVersion = version.InitializePluginVersion( - packerVersion.Version, packerVersion.VersionPrerelease) -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/LICENSE b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/LICENSE index 261eeb9e9..0c44dcefe 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/LICENSE +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright (c) 2009-present, Alibaba Cloud All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/api_timeout.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/api_timeout.go new file mode 100644 index 000000000..d7968dab7 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/api_timeout.go @@ -0,0 +1,249 @@ +package sdk + +import ( + "encoding/json" + "strings" + "time" +) + +var apiTimeouts = `{ + "ecs": { + "ActivateRouterInterface": 10, + "AddTags": 61, + "AllocateDedicatedHosts": 10, + "AllocateEipAddress": 17, + "AllocatePublicIpAddress": 36, + "ApplyAutoSnapshotPolicy": 10, + "AssignIpv6Addresses": 10, + "AssignPrivateIpAddresses": 10, + "AssociateEipAddress": 17, + "AttachClassicLinkVpc": 14, + "AttachDisk": 36, + "AttachInstanceRamRole": 11, + "AttachKeyPair": 16, + "AttachNetworkInterface": 16, + "AuthorizeSecurityGroupEgress": 16, + "AuthorizeSecurityGroup": 16, + "CancelAutoSnapshotPolicy": 10, + "CancelCopyImage": 10, + "CancelPhysicalConnection": 10, + "CancelSimulatedSystemEvents": 10, + "CancelTask": 10, + "ConnectRouterInterface": 10, + "ConvertNatPublicIpToEip": 12, + "CopyImage": 10, + "CreateAutoSnapshotPolicy": 10, + "CreateCommand": 16, + "CreateDeploymentSet": 16, + "CreateDisk": 36, + "CreateHpcCluster": 10, + "CreateImage": 36, + "CreateInstance": 86, + "CreateKeyPair": 10, + "CreateLaunchTemplate": 10, + "CreateLaunchTemplateVersion": 10, + "CreateNatGateway": 36, + "CreateNetworkInterfacePermission": 13, + "CreateNetworkInterface": 16, + "CreatePhysicalConnection": 10, + "CreateRouteEntry": 17, + "CreateRouterInterface": 10, + "CreateSecurityGroup": 86, + "CreateSimulatedSystemEvents": 10, + "CreateSnapshot": 86, + "CreateVirtualBorderRouter": 10, + "CreateVpc": 16, + "CreateVSwitch": 17, + "DeactivateRouterInterface": 10, + "DeleteAutoSnapshotPolicy": 10, + "DeleteBandwidthPackage": 10, + "DeleteCommand": 16, + "DeleteDeploymentSet": 12, + "DeleteDisk": 16, + "DeleteHpcCluster": 10, + "DeleteImage": 36, + "DeleteInstance": 66, + "DeleteKeyPairs": 10, + "DeleteLaunchTemplate": 10, + "DeleteLaunchTemplateVersion": 10, + "DeleteNatGateway": 10, + "DeleteNetworkInterfacePermission": 10, + "DeleteNetworkInterface": 16, + "DeletePhysicalConnection": 10, + "DeleteRouteEntry": 16, + "DeleteRouterInterface": 10, + "DeleteSecurityGroup": 87, + "DeleteSnapshot": 17, + "DeleteVirtualBorderRouter": 10, + "DeleteVpc": 17, + "DeleteVSwitch": 17, + "DescribeAccessPoints": 10, + "DescribeAccountAttributes": 10, + "DescribeAutoSnapshotPolicyEx": 16, + "DescribeAvailableResource": 10, + "DescribeBandwidthLimitation": 16, + "DescribeBandwidthPackages": 10, + "DescribeClassicLinkInstances": 15, + "DescribeCloudAssistantStatus": 16, + "DescribeClusters": 10, + "DescribeCommands": 16, + "DescribeDedicatedHosts": 10, + "DescribeDedicatedHostTypes": 10, + "DescribeDeploymentSets": 26, + "DescribeDiskMonitorData": 16, + "DescribeDisksFullStatus": 14, + "DescribeDisks": 19, + "DescribeEipAddresses": 16, + "DescribeEipMonitorData": 16, + "DescribeEniMonitorData": 10, + "DescribeHaVips": 10, + "DescribeHpcClusters": 16, + "DescribeImageSharePermission": 10, + "DescribeImages": 38, + "DescribeImageSupportInstanceTypes": 16, + "DescribeInstanceAttribute": 36, + "DescribeInstanceAutoRenewAttribute": 17, + "DescribeInstanceHistoryEvents": 19, + "DescribeInstanceMonitorData": 19, + "DescribeInstancePhysicalAttribute": 10, + "DescribeInstanceRamRole": 11, + "DescribeInstancesFullStatus": 14, + "DescribeInstances": 10, + "DescribeInstanceStatus": 26, + "DescribeInstanceTopology": 12, + "DescribeInstanceTypeFamilies": 17, + "DescribeInstanceTypes": 17, + "DescribeInstanceVncPasswd": 10, + "DescribeInstanceVncUrl": 36, + "DescribeInvocationResults": 16, + "DescribeInvocations": 16, + "DescribeKeyPairs": 12, + "DescribeLaunchTemplates": 16, + "DescribeLaunchTemplateVersions": 16, + "DescribeLimitation": 36, + "DescribeNatGateways": 10, + "DescribeNetworkInterfacePermissions": 13, + "DescribeNetworkInterfaces": 16, + "DescribeNewProjectEipMonitorData": 16, + "DescribePhysicalConnections": 10, + "DescribePrice": 16, + "DescribeRecommendInstanceType": 10, + "DescribeRegions": 19, + "DescribeRenewalPrice": 16, + "DescribeResourceByTags": 10, + "DescribeResourcesModification": 17, + "DescribeRouterInterfaces": 10, + "DescribeRouteTables": 17, + "DescribeSecurityGroupAttribute": 133, + "DescribeSecurityGroupReferences": 16, + "DescribeSecurityGroups": 25, + "DescribeSnapshotLinks": 17, + "DescribeSnapshotMonitorData": 12, + "DescribeSnapshotPackage": 10, + "DescribeSnapshots": 26, + "DescribeSnapshotsUsage": 26, + "DescribeSpotPriceHistory": 22, + "DescribeTags": 17, + "DescribeTaskAttribute": 10, + "DescribeTasks": 11, + "DescribeUserBusinessBehavior": 13, + "DescribeUserData": 10, + "DescribeVirtualBorderRoutersForPhysicalConnection": 10, + "DescribeVirtualBorderRouters": 10, + "DescribeVpcs": 41, + "DescribeVRouters": 17, + "DescribeVSwitches": 17, + "DescribeZones": 103, + "DetachClassicLinkVpc": 14, + "DetachDisk": 17, + "DetachInstanceRamRole": 10, + "DetachKeyPair": 10, + "DetachNetworkInterface": 16, + "EipFillParams": 19, + "EipFillProduct": 13, + "EipNotifyPaid": 10, + "EnablePhysicalConnection": 10, + "ExportImage": 10, + "GetInstanceConsoleOutput": 14, + "GetInstanceScreenshot": 14, + "ImportImage": 29, + "ImportKeyPair": 10, + "InstallCloudAssistant": 10, + "InvokeCommand": 16, + "JoinResourceGroup": 10, + "JoinSecurityGroup": 66, + "LeaveSecurityGroup": 66, + "ModifyAutoSnapshotPolicyEx": 10, + "ModifyBandwidthPackageSpec": 11, + "ModifyCommand": 10, + "ModifyDeploymentSetAttribute": 10, + "ModifyDiskAttribute": 16, + "ModifyDiskChargeType": 13, + "ModifyEipAddressAttribute": 14, + "ModifyImageAttribute": 10, + "ModifyImageSharePermission": 16, + "ModifyInstanceAttribute": 22, + "ModifyInstanceAutoReleaseTime": 15, + "ModifyInstanceAutoRenewAttribute": 16, + "ModifyInstanceChargeType": 22, + "ModifyInstanceDeployment": 10, + "ModifyInstanceNetworkSpec": 36, + "ModifyInstanceSpec": 62, + "ModifyInstanceVncPasswd": 35, + "ModifyInstanceVpcAttribute": 15, + "ModifyLaunchTemplateDefaultVersion": 10, + "ModifyNetworkInterfaceAttribute": 10, + "ModifyPhysicalConnectionAttribute": 10, + "ModifyPrepayInstanceSpec": 13, + "ModifyRouterInterfaceAttribute": 10, + "ModifySecurityGroupAttribute": 10, + "ModifySecurityGroupEgressRule": 10, + "ModifySecurityGroupPolicy": 10, + "ModifySecurityGroupRule": 16, + "ModifySnapshotAttribute": 10, + "ModifyUserBusinessBehavior": 10, + "ModifyVirtualBorderRouterAttribute": 10, + "ModifyVpcAttribute": 10, + "ModifyVRouterAttribute": 10, + "ModifyVSwitchAttribute": 10, + "ReActivateInstances": 10, + "RebootInstance": 27, + "RedeployInstance": 14, + "ReInitDisk": 16, + "ReleaseDedicatedHost": 10, + "ReleaseEipAddress": 16, + "ReleasePublicIpAddress": 10, + "RemoveTags": 10, + "RenewInstance": 19, + "ReplaceSystemDisk": 36, + "ResetDisk": 36, + "ResizeDisk": 11, + "RevokeSecurityGroupEgress": 13, + "RevokeSecurityGroup": 16, + "RunInstances": 86, + "StartInstance": 46, + "StopInstance": 27, + "StopInvocation": 10, + "TerminatePhysicalConnection": 10, + "TerminateVirtualBorderRouter": 10, + "UnassignIpv6Addresses": 10, + "UnassignPrivateIpAddresses": 10, + "UnassociateEipAddress": 16 + } +} +` + +func getAPIMaxTimeout(product, actionName string) (time.Duration, bool) { + timeout := make(map[string]map[string]int) + err := json.Unmarshal([]byte(apiTimeouts), &timeout) + if err != nil { + return 0 * time.Millisecond, false + } + + obj := timeout[strings.ToLower(product)] + if obj != nil && obj[actionName] != 0 { + return time.Duration(obj[actionName]) * time.Second, true + } + + return 0 * time.Millisecond, false +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider/instance_credentials.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider/instance_credentials.go index 1906d21f6..074f6350b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider/instance_credentials.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider/instance_credentials.go @@ -69,7 +69,7 @@ func (p *InstanceCredentialsProvider) Resolve() (auth.Credential, error) { func get(url string) (status int, content []byte, err error) { httpClient := http.DefaultClient - httpClient.Timeout = time.Second * 1 + httpClient.Timeout = 1 * time.Second resp, err := httpClient.Get(url) if err != nil { return diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider/profile_credentials.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider/profile_credentials.go index 8d525c37a..146b97945 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider/profile_credentials.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider/profile_credentials.go @@ -40,7 +40,8 @@ func NewProfileProvider(name ...string) Provider { func (p *ProfileProvider) Resolve() (auth.Credential, error) { path, ok := os.LookupEnv(ENVCredentialFile) if !ok { - path, err := checkDefaultPath() + var err error + path, err = checkDefaultPath() if err != nil { return nil, err } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/roa_signature_composer.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/roa_signature_composer.go index 77fcec231..2a962617f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/roa_signature_composer.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/roa_signature_composer.go @@ -37,12 +37,12 @@ func signRoaRequest(request requests.AcsRequest, signer Signer, regionId string) completeROASignParams(request, signer, regionId) stringToSign := buildRoaStringToSign(request) request.SetStringToSign(stringToSign) - signature := signer.Sign(stringToSign, "") accessKeyId, err := signer.GetAccessKeyId() if err != nil { - return nil + return err } + signature := signer.Sign(stringToSign, "") request.GetHeaders()["Authorization"] = "acs " + accessKeyId + ":" + signature return @@ -77,7 +77,9 @@ func completeROASignParams(request requests.AcsRequest, signer Signer, regionId if request.GetFormParams() != nil && len(request.GetFormParams()) > 0 { formString := utils.GetUrlFormedMap(request.GetFormParams()) request.SetContent([]byte(formString)) - headerParams["Content-Type"] = requests.Form + if headerParams["Content-Type"] == "" { + headerParams["Content-Type"] = requests.Form + } } contentMD5 := utils.GetMD5Base64(request.GetContent()) headerParams["Content-MD5"] = contentMD5 diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/rpc_signature_composer.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/rpc_signature_composer.go index 14ea15ca4..33967b9ef 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/rpc_signature_composer.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/rpc_signature_composer.go @@ -22,7 +22,7 @@ import ( "github.com/aliyun/alibaba-cloud-sdk-go/sdk/utils" ) -var hookGetUUIDV4 = func(fn func() string) string { +var hookGetNonce = func(fn func() string) string { return fn() } @@ -52,7 +52,7 @@ func completeRpcSignParams(request requests.AcsRequest, signer Signer, regionId queryParams["SignatureMethod"] = signer.GetName() queryParams["SignatureType"] = signer.GetType() queryParams["SignatureVersion"] = signer.GetVersion() - queryParams["SignatureNonce"] = hookGetUUIDV4(utils.GetUUIDV4) + queryParams["SignatureNonce"] = hookGetNonce(utils.GetUUID) queryParams["AccessKeyId"], err = signer.GetAccessKeyId() if err != nil { diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/client.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/client.go index 01c2f93ba..8d5cc73e2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/client.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/client.go @@ -22,16 +22,15 @@ import ( "net/http" "net/url" "os" + "regexp" "runtime" "strconv" "strings" - "sync" "time" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" @@ -71,17 +70,23 @@ type Client struct { asyncTaskQueue chan func() readTimeout time.Duration connectTimeout time.Duration - - debug bool - isRunning bool - // void "panic(write to close channel)" cause of addAsync() after Shutdown() - asyncChanLock *sync.RWMutex + EndpointMap map[string]string + EndpointType string + Network string + Domain string + isOpenAsync bool } func (client *Client) Init() (err error) { panic("not support yet") } +func (client *Client) SetEndpointRules(endpointMap map[string]string, endpointType string, netWork string) { + client.EndpointMap = endpointMap + client.Network = netWork + client.EndpointType = endpointType +} + func (client *Client) SetHTTPSInsecure(isInsecure bool) { client.isInsecure = isInsecure } @@ -114,6 +119,13 @@ func (client *Client) GetNoProxy() string { return client.noProxy } +func (client *Client) SetTransport(transport http.RoundTripper) { + if client.httpClient == nil { + client.httpClient = &http.Client{} + } + client.httpClient.Transport = transport +} + // InitWithProviderChain will get credential from the providerChain, // the RsaKeyPairCredential Only applicable to regionID `ap-northeast-1`, // if your providerChain may return a credential type with RsaKeyPairCredential, @@ -128,13 +140,20 @@ func (client *Client) InitWithProviderChain(regionId string, provider provider.P } func (client *Client) InitWithOptions(regionId string, config *Config, credential auth.Credential) (err error) { - client.isRunning = true - client.asyncChanLock = new(sync.RWMutex) + if regionId != "" { + match, _ := regexp.MatchString("^[a-zA-Z0-9_-]+$", regionId) + if !match { + return fmt.Errorf("regionId contains invalid characters") + } + } + client.regionId = regionId client.config = config client.httpClient = &http.Client{} - if config.HttpTransport != nil { + if config.Transport != nil { + client.httpClient.Transport = config.Transport + } else if config.HttpTransport != nil { client.httpClient.Transport = config.HttpTransport } @@ -204,15 +223,20 @@ func (client *Client) getNoProxy(scheme string) []string { // EnableAsync enable the async task queue func (client *Client) EnableAsync(routinePoolSize, maxTaskQueueSize int) { + if client.isOpenAsync { + fmt.Println("warning: Please not call EnableAsync repeatedly") + return + } + client.isOpenAsync = true client.asyncTaskQueue = make(chan func(), maxTaskQueueSize) for i := 0; i < routinePoolSize; i++ { go func() { - for client.isRunning { - select { - case task, notClosed := <-client.asyncTaskQueue: - if notClosed { - task() - } + for { + task, notClosed := <-client.asyncTaskQueue + if !notClosed { + return + } else { + task() } } }() @@ -221,7 +245,7 @@ func (client *Client) EnableAsync(routinePoolSize, maxTaskQueueSize int) { func (client *Client) InitWithAccessKey(regionId, accessKeyId, accessKeySecret string) (err error) { config := client.InitClientConfig() - credential := &credentials.BaseCredential{ + credential := &credentials.AccessKeyCredential{ AccessKeyId: accessKeyId, AccessKeySecret: accessKeySecret, } @@ -299,6 +323,25 @@ func (client *Client) DoAction(request requests.AcsRequest, response responses.A return client.DoActionWithSigner(request, response, nil) } +func (client *Client) GetEndpointRules(regionId string, product string) (endpointRaw string, err error) { + if client.EndpointType == "regional" { + if regionId == "" { + err = fmt.Errorf("RegionId is empty, please set a valid RegionId.") + return "", err + } + endpointRaw = strings.Replace("..aliyuncs.com", "", regionId, 1) + } else { + endpointRaw = ".aliyuncs.com" + } + endpointRaw = strings.Replace(endpointRaw, "", strings.ToLower(product), 1) + if client.Network == "" || client.Network == "public" { + endpointRaw = strings.Replace(endpointRaw, "", "", 1) + } else { + endpointRaw = strings.Replace(endpointRaw, "", "-"+client.Network, 1) + } + return endpointRaw, nil +} + func (client *Client) buildRequestWithSigner(request requests.AcsRequest, signer auth.Signer) (httpRequest *http.Request, err error) { // add clientVersion request.GetHeaders()["x-sdk-core-version"] = Version @@ -309,18 +352,45 @@ func (client *Client) buildRequestWithSigner(request requests.AcsRequest, signer } // resolve endpoint - resolveParam := &endpoints.ResolveParam{ - Domain: request.GetDomain(), - Product: request.GetProduct(), - RegionId: regionId, - LocationProduct: request.GetLocationServiceCode(), - LocationEndpointType: request.GetLocationEndpointType(), - CommonApi: client.ProcessCommonRequest, + endpoint := request.GetDomain() + + if endpoint == "" && client.Domain != "" { + endpoint = client.Domain } - endpoint, err := endpoints.Resolve(resolveParam) - if err != nil { - return + + if endpoint == "" { + endpoint = endpoints.GetEndpointFromMap(regionId, request.GetProduct()) } + + if endpoint == "" && client.EndpointType != "" && + (request.GetProduct() != "Sts" || len(request.GetQueryParams()) == 0) { + if client.EndpointMap != nil && client.Network == "" || client.Network == "public" { + endpoint = client.EndpointMap[regionId] + } + + if endpoint == "" { + endpoint, err = client.GetEndpointRules(regionId, request.GetProduct()) + if err != nil { + return + } + } + } + + if endpoint == "" { + resolveParam := &endpoints.ResolveParam{ + Domain: request.GetDomain(), + Product: request.GetProduct(), + RegionId: regionId, + LocationProduct: request.GetLocationServiceCode(), + LocationEndpointType: request.GetLocationEndpointType(), + CommonApi: client.ProcessCommonRequest, + } + endpoint, err = endpoints.Resolve(resolveParam) + if err != nil { + return + } + } + request.SetDomain(endpoint) if request.GetScheme() == "" { request.SetScheme(client.config.Scheme) @@ -350,7 +420,7 @@ func (client *Client) buildRequestWithSigner(request requests.AcsRequest, signer func getSendUserAgent(configUserAgent string, clientUserAgent, requestUserAgent map[string]string) string { realUserAgent := "" for key1, value1 := range clientUserAgent { - for key2, _ := range requestUserAgent { + for key2 := range requestUserAgent { if key1 == key2 { key1 = "" } @@ -376,7 +446,7 @@ func (client *Client) AppendUserAgent(key, value string) { client.userAgent = make(map[string]string) } if strings.ToLower(key) != "core" && strings.ToLower(key) != "go" { - for tag, _ := range client.userAgent { + for tag := range client.userAgent { if tag == key { client.userAgent[tag] = value newkey = false @@ -403,8 +473,10 @@ func (client *Client) getTimeout(request requests.AcsRequest) (time.Duration, ti readTimeout = reqReadTimeout } else if client.readTimeout != 0*time.Millisecond { readTimeout = client.readTimeout - } else if client.httpClient.Timeout != 0 && client.httpClient.Timeout != 10000000000 { + } else if client.httpClient.Timeout != 0 { readTimeout = client.httpClient.Timeout + } else if timeout, ok := getAPIMaxTimeout(request.GetProduct(), request.GetActionName()); ok { + readTimeout = timeout } if reqConnectTimeout != 0*time.Millisecond { @@ -430,7 +502,7 @@ func (client *Client) setTimeout(request requests.AcsRequest) { if trans, ok := client.httpClient.Transport.(*http.Transport); ok && trans != nil { trans.DialContext = Timeout(connectTimeout) client.httpClient.Transport = trans - } else { + } else if client.httpClient.Transport == nil { client.httpClient.Transport = &http.Transport{ DialContext: Timeout(connectTimeout), } @@ -447,7 +519,12 @@ func (client *Client) getHTTPSInsecure(request requests.AcsRequest) (insecure bo } func (client *Client) DoActionWithSigner(request requests.AcsRequest, response responses.AcsResponse, signer auth.Signer) (err error) { - + if client.Network != "" { + match, _ := regexp.MatchString("^[a-zA-Z0-9_-]+$", client.Network) + if !match { + return fmt.Errorf("netWork contains invalid characters") + } + } fieldMap := make(map[string]string) initLogMsg(fieldMap) defer func() { @@ -468,7 +545,14 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r var flag bool for _, value := range noProxy { - if value == httpRequest.Host { + if strings.HasPrefix(value, "*") { + value = fmt.Sprintf(".%s", value) + } + noProxyReg, err := regexp.Compile(value) + if err != nil { + return err + } + if noProxyReg.MatchString(httpRequest.Host) { flag = true break } @@ -477,8 +561,12 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r // Set whether to ignore certificate validation. // Default InsecureSkipVerify is false. if trans, ok := client.httpClient.Transport.(*http.Transport); ok && trans != nil { - trans.TLSClientConfig = &tls.Config{ - InsecureSkipVerify: client.getHTTPSInsecure(request), + if trans.TLSClientConfig != nil { + trans.TLSClientConfig.InsecureSkipVerify = client.getHTTPSInsecure(request) + } else { + trans.TLSClientConfig = &tls.Config{ + InsecureSkipVerify: client.getHTTPSInsecure(request), + } } if proxy != nil && !flag { trans.Proxy = http.ProxyURL(proxy) @@ -509,7 +597,7 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r startTime := time.Now() fieldMap["{start_time}"] = startTime.Format("2006-01-02 15:04:05") httpResponse, err = hookDo(client.httpClient.Do)(httpRequest) - fieldMap["{cost}"] = time.Now().Sub(startTime).String() + fieldMap["{cost}"] = time.Since(startTime).String() if err == nil { fieldMap["{code}"] = strconv.Itoa(httpResponse.StatusCode) fieldMap["{res_headers}"] = TransToString(httpResponse.Header) @@ -537,6 +625,10 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r return } } + if isCertificateError(err) { + return + } + // if status code >= 500 or timeout, will trigger retry if client.config.AutoRetry && (err != nil || isServerError(httpResponse)) { client.setTimeout(request) @@ -552,6 +644,8 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r } err = responses.Unmarshal(response, httpResponse, request.GetAcceptFormat()) + fieldMap["{res_body}"] = response.GetHttpContentString() + debug("%s", response.GetHttpContentString()) // wrap server errors if serverErr, ok := err.(*errors.ServerError); ok { var wrapInfo = map[string]string{} @@ -561,6 +655,13 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r return } +func isCertificateError(err error) bool { + if err != nil && strings.Contains(err.Error(), "x509: certificate signed by unknown authority") { + return true + } + return false +} + func putMsgToMap(fieldMap map[string]string, request *http.Request) { fieldMap["{host}"] = request.Host fieldMap["{method}"] = request.Method @@ -606,9 +707,7 @@ only block when any one of the following occurs: **/ func (client *Client) AddAsyncTask(task func()) (err error) { if client.asyncTaskQueue != nil { - client.asyncChanLock.RLock() - defer client.asyncChanLock.RUnlock() - if client.isRunning { + if client.isOpenAsync { client.asyncTaskQueue <- task } } else { @@ -621,6 +720,14 @@ func (client *Client) GetConfig() *Config { return client.config } +func (client *Client) GetSigner() auth.Signer { + return client.signer +} + +func (client *Client) SetSigner(signer auth.Signer) { + client.signer = signer +} + func NewClient() (client *Client, err error) { client = &Client{} err = client.Init() @@ -705,13 +812,11 @@ func (client *Client) ProcessCommonRequestWithSigner(request *requests.CommonReq } func (client *Client) Shutdown() { - // lock the addAsync() - client.asyncChanLock.Lock() - defer client.asyncChanLock.Unlock() if client.asyncTaskQueue != nil { close(client.asyncTaskQueue) } - client.isRunning = false + + client.isOpenAsync = false } // Deprecated: Use NewClientWithRamRoleArn in this package instead. diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/config.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/config.go index e8862e0c2..29b7cc35b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/config.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/config.go @@ -22,16 +22,17 @@ import ( ) type Config struct { - AutoRetry bool `default:"true"` - MaxRetryTime int `default:"3"` - UserAgent string `default:""` - Debug bool `default:"false"` - Timeout time.Duration `default:"10000000000"` - HttpTransport *http.Transport `default:""` - EnableAsync bool `default:"false"` - MaxTaskQueueSize int `default:"1000"` - GoRoutinePoolSize int `default:"5"` - Scheme string `default:"HTTP"` + AutoRetry bool `default:"false"` + MaxRetryTime int `default:"3"` + UserAgent string `default:""` + Debug bool `default:"false"` + HttpTransport *http.Transport `default:""` + Transport http.RoundTripper `default:""` + EnableAsync bool `default:"false"` + MaxTaskQueueSize int `default:"1000"` + GoRoutinePoolSize int `default:"5"` + Scheme string `default:"HTTP"` + Timeout time.Duration } func NewConfig() (config *Config) { diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go index 60adf7d45..8ee0ec53f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/endpoints_config.go @@ -1,4 +1,3 @@ - package endpoints import ( @@ -7,109 +6,692 @@ import ( "sync" ) -const endpointsJson =`{ +const endpointsJson = `{ "products": [ { - "code": "ecs", - "document_id": "25484", - "location_service_code": "ecs", + "code": "emr", + "document_id": "28140", + "location_service_code": "emr", "regional_endpoints": [ { - "region": "cn-shanghai", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "ecs.eu-west-1.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "ecs.cn-huhehaote.aliyuncs.com" - }, - { - "region": "me-east-1", - "endpoint": "ecs.me-east-1.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "ecs.ap-southeast-3.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "ecs.ap-southeast-2.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "ecs.ap-south-1.aliyuncs.com" + "region": "cn-qingdao", + "endpoint": "emr.cn-qingdao.aliyuncs.com" }, { "region": "cn-beijing", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" + "endpoint": "emr.aliyuncs.com" }, { "region": "cn-shenzhen", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" + "endpoint": "emr.aliyuncs.com" }, { - "region": "ap-northeast-1", - "endpoint": "ecs.ap-northeast-1.aliyuncs.com" - }, - { - "region": "ap-southeast-5", - "endpoint": "ecs.ap-southeast-5.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "ecs.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "ecs.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" - }, - { - "region": "cn-hongkong", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" + "region": "eu-west-1", + "endpoint": "emr.eu-west-1.aliyuncs.com" }, { "region": "us-west-1", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" + "endpoint": "emr.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "emr.me-east-1.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "emr.ap-northeast-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "emr.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "emr.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "emr.ap-south-1.aliyuncs.com" }, { "region": "us-east-1", - "endpoint": "ecs-cn-hangzhou.aliyuncs.com" - } - ], - "global_endpoint": "ecs-cn-hangzhou.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "chatbot", - "document_id": "60760", - "location_service_code": "beebot", - "regional_endpoints": [ - { - "region": "cn-shanghai", - "endpoint": "chatbot.cn-shanghai.aliyuncs.com" + "endpoint": "emr.us-east-1.aliyuncs.com" }, { "region": "cn-hangzhou", - "endpoint": "chatbot.cn-hangzhou.aliyuncs.com" + "endpoint": "emr.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "emr.cn-hongkong.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "emr.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "emr.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "emr.ap-southeast-3.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "emr.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "emr.ap-southeast-5.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "emr.aliyuncs.com" + } + ], + "global_endpoint": "emr.aliyuncs.com", + "regional_endpoint_pattern": "emr.[RegionId].aliyuncs.com" + }, + { + "code": "petadata", + "document_id": "", + "location_service_code": "petadata", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "petadata.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "petadata.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "petadata.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "petadata.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "petadata.me-east-1.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "petadata.ap-southeast-2.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "petadata.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "petadata.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "petadata.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "petadata.ap-southeast-5.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "petadata.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "petadata.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "petadata.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "petadata.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "petadata.aliyuncs.com" + } + ], + "global_endpoint": "petadata.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "dbs", + "document_id": "", + "location_service_code": "dbs", + "regional_endpoints": [ + { + "region": "cn-shenzhen", + "endpoint": "dbs-api.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "dbs-api.cn-hangzhou.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "dbs-api.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "dbs-api.ap-northeast-1.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "dbs-api.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "dbs-api.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "dbs-api.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "dbs-api.cn-hangzhou.aliyuncs.com" } ], "global_endpoint": "", - "regional_endpoint_pattern": "chatbot.[RegionId].aliyuncs.com" + "regional_endpoint_pattern": "" + }, + { + "code": "alidnsgtm", + "document_id": "", + "location_service_code": "alidnsgtm", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "alidns.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "alidns.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "elasticsearch", + "document_id": "", + "location_service_code": "elasticsearch", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "elasticsearch.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "elasticsearch.cn-shenzhen.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "elasticsearch.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "elasticsearch.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "elasticsearch.cn-hongkong.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "elasticsearch.ap-southeast-3.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "elasticsearch.us-west-1.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "elasticsearch.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "elasticsearch.ap-southeast-5.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "elasticsearch.eu-central-1.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "elasticsearch.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "elasticsearch.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "elasticsearch.cn-qingdao.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "elasticsearch.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "elasticsearch.ap-northeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "baas", + "document_id": "", + "location_service_code": "baas", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "baas.cn-hangzhou.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "baas.ap-northeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "baas.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "baas.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "baas.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "baas.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "cr", + "document_id": "60716", + "location_service_code": "cr", + "regional_endpoints": null, + "global_endpoint": "cr.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "cloudap", + "document_id": "", + "location_service_code": "cloudap", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "cloudwf.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "imagesearch", + "document_id": "", + "location_service_code": "imagesearch", + "regional_endpoints": [ + { + "region": "ap-southeast-2", + "endpoint": "imagesearch.ap-southeast-2.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "imagesearch.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "imagesearch.ap-northeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "imagesearch.ap-southeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "pts", + "document_id": "", + "location_service_code": "pts", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "pts.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ehs", + "document_id": "", + "location_service_code": "ehs", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "ehpc.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "ehpc.cn-hongkong.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "ehpc.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "ehpc.cn-qingdao.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "ehpc.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "ehpc.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "ehpc.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "ehpc.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "ehpc.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "ehpc.cn-shenzhen.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "ehpc.ap-southeast-2.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "polardb", + "document_id": "58764", + "location_service_code": "polardb", + "regional_endpoints": [ + { + "region": "ap-south-1", + "endpoint": "polardb.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "polardb.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "polardb.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "polardb.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "polardb.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "polardb.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "polardb.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "polardb.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "polardb.ap-southeast-5.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "polardb.aliyuncs.com" + }, + { + "code": "r-kvstore", + "document_id": "60831", + "location_service_code": "redisa", + "regional_endpoints": [ + { + "region": "cn-shenzhen", + "endpoint": "r-kvstore.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "r-kvstore.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "r-kvstore.ap-southeast-3.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "r-kvstore.ap-southeast-2.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "r-kvstore.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "r-kvstore.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "r-kvstore.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "r-kvstore.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "r-kvstore.cn-hongkong.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "r-kvstore.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "r-kvstore.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "r-kvstore.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "r-kvstore.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "r-kvstore.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "r-kvstore.eu-west-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "r-kvstore.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "r-kvstore.me-east-1.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "r-kvstore.ap-northeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "r-kvstore.ap-southeast-5.aliyuncs.com" + } + ], + "global_endpoint": "r-kvstore.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "xianzhi", + "document_id": "", + "location_service_code": "xianzhi", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "xianzhi.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "pcdn", + "document_id": "", + "location_service_code": "pcdn", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "pcdn.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "cdn", + "document_id": "27148", + "location_service_code": "cdn", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "cdn.aliyuncs.com" + } + ], + "global_endpoint": "cdn.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "cloudauth", + "document_id": "60687", + "location_service_code": "cloudauth", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "cloudauth.aliyuncs.com" + } + ], + "global_endpoint": "cloudauth.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "nas", + "document_id": "62598", + "location_service_code": "nas", + "regional_endpoints": [ + { + "region": "ap-southeast-2", + "endpoint": "nas.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "nas.ap-south-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "nas.eu-central-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "nas.us-west-1.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "nas.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "nas.cn-qingdao.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "nas.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "nas.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "nas.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "nas.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "nas.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "nas.ap-northeast-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "nas.us-east-1.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "nas.cn-shenzhen.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "nas.ap-southeast-5.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "nas.cn-hongkong.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "nas.ap-southeast-3.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" }, { "code": "alidns", @@ -125,11 +707,1474 @@ const endpointsJson =`{ "regional_endpoint_pattern": "" }, { - "code": "itaas", - "document_id": "55759", - "location_service_code": "itaas", + "code": "dts", + "document_id": "", + "location_service_code": "dts", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "dts.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "dts.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "dts.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "dts.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "dts.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "dts.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "dts.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "dts.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "dts.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "emas", + "document_id": "", + "location_service_code": "emas", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "mhub.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "mhub.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "dysmsapi", + "document_id": "", + "location_service_code": "dysmsapi", + "regional_endpoints": [ + { + "region": "ap-southeast-3", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "dysmsapi.aliyuncs.com" + }, + { + "region": "cn-chengdu", + "endpoint": "dysmsapi.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "dysmsapi.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "dysmsapi.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "dysmsapi.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "dysmsapi.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "dysmsapi.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "dysmsapi.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "dysmsapi.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "cloudwf", + "document_id": "58111", + "location_service_code": "cloudwf", "regional_endpoints": null, - "global_endpoint": "itaas.aliyuncs.com", + "global_endpoint": "cloudwf.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "fc", + "document_id": "", + "location_service_code": "fc", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "cn-beijing.fc.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "ap-southeast-2.fc.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "cn-huhehaote.fc.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "cn-shanghai.fc.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "cn-hangzhou.fc.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "cn-shenzhen.fc.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "saf", + "document_id": "", + "location_service_code": "saf", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "saf.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "saf.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "saf.cn-shenzhen.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "rds", + "document_id": "26223", + "location_service_code": "rds", + "regional_endpoints": [ + { + "region": "ap-northeast-1", + "endpoint": "rds.ap-northeast-1.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "rds.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "rds.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "rds.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "rds.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "rds.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "rds.eu-west-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "rds.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "rds.ap-southeast-3.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "rds.ap-southeast-2.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "rds.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "rds.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "rds.ap-southeast-5.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "rds.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "rds.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "rds.me-east-1.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "rds.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "rds.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "rds.aliyuncs.com" + } + ], + "global_endpoint": "rds.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "vpc", + "document_id": "34962", + "location_service_code": "vpc", + "regional_endpoints": [ + { + "region": "ap-south-1", + "endpoint": "vpc.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "vpc.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "vpc.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "vpc.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "vpc.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "vpc.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "vpc.ap-northeast-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "vpc.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "vpc.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "vpc.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "vpc.cn-huhehaote.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "vpc.me-east-1.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "vpc.ap-southeast-5.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "vpc.ap-southeast-3.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "vpc.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "vpc.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "vpc.eu-west-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "vpc.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "vpc.aliyuncs.com" + } + ], + "global_endpoint": "vpc.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "gpdb", + "document_id": "", + "location_service_code": "gpdb", + "regional_endpoints": [ + { + "region": "ap-southeast-3", + "endpoint": "gpdb.ap-southeast-3.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "gpdb.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "gpdb.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "gpdb.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "gpdb.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "gpdb.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "gpdb.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "gpdb.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "gpdb.ap-southeast-5.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "gpdb.ap-southeast-2.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "gpdb.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "gpdb.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "gpdb.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "gpdb.ap-northeast-1.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "gpdb.eu-west-1.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "gpdb.ap-south-1.aliyuncs.com" + } + ], + "global_endpoint": "gpdb.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "yunmarket", + "document_id": "", + "location_service_code": "yunmarket", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "market.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "pvtz", + "document_id": "", + "location_service_code": "pvtz", + "regional_endpoints": [ + { + "region": "ap-southeast-1", + "endpoint": "pvtz.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "pvtz.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "oss", + "document_id": "", + "location_service_code": "oss", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "oss-cn-beijing.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "oss-cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "oss-cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "oss-cn-hongkong.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "oss-cn-shenzhen.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "oss-ap-southeast-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "oss-us-west-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "oss-cn-qingdao.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "foas", + "document_id": "", + "location_service_code": "foas", + "regional_endpoints": [ + { + "region": "cn-qingdao", + "endpoint": "foas.cn-qingdao.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "foas.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "foas.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "foas.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "foas.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "foas.cn-shenzhen.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "foas.ap-northeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ddos", + "document_id": "", + "location_service_code": "ddos", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ddospro.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "ddospro.cn-hongkong.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "cbn", + "document_id": "", + "location_service_code": "cbn", + "regional_endpoints": [ + { + "region": "ap-southeast-1", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "cbn.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "cbn.aliyuncs.com" + } + ], + "global_endpoint": "cbn.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "nlp", + "document_id": "", + "location_service_code": "nlp", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "nlp.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "hsm", + "document_id": "", + "location_service_code": "hsm", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "hsm.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "hsm.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "hsm.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "hsm.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "hsm.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "hsm.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ons", + "document_id": "44416", + "location_service_code": "ons", + "regional_endpoints": [ + { + "region": "ap-southeast-1", + "endpoint": "ons.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "ons.cn-huhehaote.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "ons.us-east-1.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "ons.cn-hongkong.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "ons.cn-shenzhen.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "ons.ap-southeast-3.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "ons.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "ons.cn-qingdao.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "ons.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "ons.me-east-1.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "ons.ap-northeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "ons.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "ons.cn-hangzhou.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "ons.eu-central-1.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "ons.eu-west-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "ons.us-west-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "ons.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "ons.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "kms", + "document_id": "", + "location_service_code": "kms", + "regional_endpoints": [ + { + "region": "cn-hongkong", + "endpoint": "kms.cn-hongkong.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "kms.cn-hangzhou.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "kms.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "kms.cn-qingdao.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "kms.eu-west-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "kms.us-east-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "kms.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "kms.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "kms.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "kms.ap-southeast-5.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "kms.cn-huhehaote.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "kms.me-east-1.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "kms.cn-shenzhen.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "kms.ap-southeast-3.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "kms.us-west-1.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "kms.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "kms.ap-southeast-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "kms.eu-central-1.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "kms.ap-northeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "cps", + "document_id": "", + "location_service_code": "cps", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "cloudpush.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ensdisk", + "document_id": "", + "location_service_code": "ensdisk", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ens.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "cloudapi", + "document_id": "43590", + "location_service_code": "apigateway", + "regional_endpoints": [ + { + "region": "ap-southeast-2", + "endpoint": "apigateway.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "apigateway.ap-south-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "apigateway.us-east-1.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "apigateway.me-east-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "apigateway.cn-qingdao.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "apigateway.cn-beijing.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "apigateway.ap-southeast-5.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "apigateway.ap-southeast-3.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "apigateway.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "apigateway.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "apigateway.ap-southeast-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "apigateway.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "apigateway.cn-hangzhou.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "apigateway.us-west-1.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "apigateway.cn-shenzhen.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "apigateway.eu-west-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "apigateway.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "apigateway.ap-northeast-1.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "apigateway.cn-hongkong.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "apigateway.[RegionId].aliyuncs.com" + }, + { + "code": "eci", + "document_id": "", + "location_service_code": "eci", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "eci.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "eci.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "eci.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "eci.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "eci.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "eci.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "onsvip", + "document_id": "", + "location_service_code": "onsvip", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "ons.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "ons.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "ons.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "ons.cn-shenzhen.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "ons.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "ons.cn-qingdao.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "linkwan", + "document_id": "", + "location_service_code": "linkwan", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "linkwan.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "linkwan.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ddosdip", + "document_id": "", + "location_service_code": "ddosdip", + "regional_endpoints": [ + { + "region": "ap-southeast-1", + "endpoint": "ddosdip.ap-southeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "batchcompute", + "document_id": "44717", + "location_service_code": "batchcompute", + "regional_endpoints": [ + { + "region": "us-west-1", + "endpoint": "batchcompute.us-west-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "batchcompute.cn-qingdao.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "batchcompute.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "batchcompute.cn-shenzhen.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "batchcompute.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "batchcompute.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "batchcompute.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "batchcompute.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "batchcompute.ap-southeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "batchcompute.[RegionId].aliyuncs.com" + }, + { + "code": "aegis", + "document_id": "28449", + "location_service_code": "vipaegis", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "aegis.cn-hangzhou.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "aegis.ap-southeast-3.aliyuncs.com" + } + ], + "global_endpoint": "aegis.cn-hangzhou.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "arms", + "document_id": "42924", + "location_service_code": "arms", + "regional_endpoints": [ + { + "region": "cn-hongkong", + "endpoint": "arms.cn-hongkong.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "arms.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "arms.cn-shenzhen.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "arms.cn-qingdao.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "arms.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "arms.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "arms.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "arms.[RegionId].aliyuncs.com" + }, + { + "code": "live", + "document_id": "48207", + "location_service_code": "live", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "live.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "live.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "live.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "live.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "live.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "live.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "live.aliyuncs.com" + } + ], + "global_endpoint": "live.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "alimt", + "document_id": "", + "location_service_code": "alimt", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "mt.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "actiontrail", + "document_id": "", + "location_service_code": "actiontrail", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "actiontrail.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "actiontrail.cn-qingdao.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "actiontrail.us-east-1.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "actiontrail.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "actiontrail.ap-southeast-3.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "actiontrail.ap-southeast-5.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "actiontrail.ap-south-1.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "actiontrail.me-east-1.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "actiontrail.cn-hongkong.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "actiontrail.cn-shenzhen.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "actiontrail.cn-hangzhou.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "actiontrail.eu-west-1.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "actiontrail.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "actiontrail.ap-northeast-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "actiontrail.us-west-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "actiontrail.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "actiontrail.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "actiontrail.cn-beijing.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "actiontrail.ap-southeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "smartag", + "document_id": "", + "location_service_code": "smartag", + "regional_endpoints": [ + { + "region": "ap-southeast-3", + "endpoint": "smartag.ap-southeast-3.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "smartag.ap-southeast-5.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "smartag.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "smartag.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "smartag.cn-hongkong.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "smartag.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "smartag.ap-southeast-2.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "vod", + "document_id": "60574", + "location_service_code": "vod", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "vod.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "vod.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "vod.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "vod.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "vod.ap-southeast-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "vod.eu-central-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "domain", + "document_id": "42875", + "location_service_code": "domain", + "regional_endpoints": [ + { + "region": "ap-southeast-1", + "endpoint": "domain-intl.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "domain.aliyuncs.com" + } + ], + "global_endpoint": "domain.aliyuncs.com", + "regional_endpoint_pattern": "domain.aliyuncs.com" + }, + { + "code": "ros", + "document_id": "28899", + "location_service_code": "ros", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ros.aliyuncs.com" + } + ], + "global_endpoint": "ros.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "cloudphoto", + "document_id": "59902", + "location_service_code": "cloudphoto", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "cloudphoto.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "cloudphoto.[RegionId].aliyuncs.com" + }, + { + "code": "rtc", + "document_id": "", + "location_service_code": "rtc", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "rtc.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "odpsmayi", + "document_id": "", + "location_service_code": "odpsmayi", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "bsb.cloud.alipay.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "bsb.cloud.alipay.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ims", + "document_id": "", + "location_service_code": "ims", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ims.aliyuncs.com" + } + ], + "global_endpoint": "", "regional_endpoint_pattern": "" }, { @@ -150,755 +2195,249 @@ const endpointsJson =`{ "regional_endpoint_pattern": "csb.[RegionId].aliyuncs.com" }, { - "code": "slb", - "document_id": "27565", - "location_service_code": "slb", + "code": "cds", + "document_id": "62887", + "location_service_code": "codepipeline", "regional_endpoints": [ { - "region": "cn-hongkong", - "endpoint": "slb.aliyuncs.com" - }, - { - "region": "me-east-1", - "endpoint": "slb.me-east-1.aliyuncs.com" - }, - { - "region": "ap-southeast-5", - "endpoint": "slb.ap-southeast-5.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "slb.ap-southeast-2.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "slb.ap-south-1.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "slb.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "slb.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "slb.eu-west-1.aliyuncs.com" - }, + "region": "cn-beijing", + "endpoint": "cds.cn-beijing.aliyuncs.com" + } + ], + "global_endpoint": "cds.cn-beijing.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "ddosbgp", + "document_id": "", + "location_service_code": "ddosbgp", + "regional_endpoints": [ { "region": "cn-huhehaote", - "endpoint": "slb.cn-huhehaote.aliyuncs.com" + "endpoint": "ddosbgp.cn-hangzhou.aliyuncs.com" }, { - "region": "us-west-1", - "endpoint": "slb.aliyuncs.com" + "region": "cn-beijing", + "endpoint": "ddosbgp.cn-hangzhou.aliyuncs.com" }, { "region": "cn-zhangjiakou", - "endpoint": "slb.cn-zhangjiakou.aliyuncs.com" + "endpoint": "ddosbgp.cn-hangzhou.aliyuncs.com" }, { - "region": "cn-qingdao", - "endpoint": "slb.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "slb.aliyuncs.com" + "region": "cn-hongkong", + "endpoint": "ddosbgp.cn-hongkong.aliyuncs.com" }, { "region": "cn-shenzhen", - "endpoint": "slb.aliyuncs.com" + "endpoint": "ddosbgp.cn-hangzhou.aliyuncs.com" }, { - "region": "us-east-1", - "endpoint": "slb.aliyuncs.com" + "region": "us-west-1", + "endpoint": "ddosbgp.us-west-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "ddosbgp.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "ddosbgp.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "ddosbgp.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "dybaseapi", + "document_id": "", + "location_service_code": "dybaseapi", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "dybaseapi.aliyuncs.com" + }, + { + "region": "cn-chengdu", + "endpoint": "dybaseapi.aliyuncs.com" }, { "region": "ap-southeast-3", - "endpoint": "slb.ap-southeast-3.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "slb.aliyuncs.com" + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { "region": "ap-southeast-1", - "endpoint": "slb.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "slb.ap-northeast-1.aliyuncs.com" - } - ], - "global_endpoint": "slb.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "cloudwf", - "document_id": "58111", - "location_service_code": "cloudwf", - "regional_endpoints": null, - "global_endpoint": "cloudwf.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "cloudphoto", - "document_id": "59902", - "location_service_code": "cloudphoto", - "regional_endpoints": [ - { - "region": "cn-shanghai", - "endpoint": "cloudphoto.cn-shanghai.aliyuncs.com" - } - ], - "global_endpoint": "", - "regional_endpoint_pattern": "cloudphoto.[RegionId].aliyuncs.com" - }, - { - "code": "dds", - "document_id": "61715", - "location_service_code": "dds", - "regional_endpoints": [ - { - "region": "ap-southeast-5", - "endpoint": "mongodb.ap-southeast-5.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "mongodb.aliyuncs.com" - }, - { - "region": "cn-hongkong", - "endpoint": "mongodb.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "mongodb.eu-west-1.aliyuncs.com" + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { "region": "us-west-1", - "endpoint": "mongodb.aliyuncs.com" + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { - "region": "us-east-1", - "endpoint": "mongodb.aliyuncs.com" + "region": "cn-hangzhou", + "endpoint": "dybaseapi.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "dybaseapi.aliyuncs.com" }, { "region": "me-east-1", - "endpoint": "mongodb.me-east-1.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "mongodb.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "mongodb.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "mongodb.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "mongodb.ap-northeast-1.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "mongodb.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "mongodb.ap-southeast-2.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "mongodb.ap-southeast-3.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "mongodb.ap-south-1.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "mongodb.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "mongodb.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "mongodb.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "mongodb.cn-huhehaote.aliyuncs.com" - } - ], - "global_endpoint": "mongodb.aliyuncs.com", - "regional_endpoint_pattern": "mongodb.[RegionId].aliyuncs.com" - }, - { - "code": "dm", - "document_id": "29434", - "location_service_code": "dm", - "regional_endpoints": [ - { - "region": "ap-southeast-2", - "endpoint": "dm.ap-southeast-2.aliyuncs.com" - } - ], - "global_endpoint": "dm.aliyuncs.com", - "regional_endpoint_pattern": "dm.[RegionId].aliyuncs.com" - }, - { - "code": "ons", - "document_id": "44416", - "location_service_code": "ons", - "regional_endpoints": [ - { - "region": "cn-zhangjiakou", - "endpoint": "ons.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "ons.us-west-1.aliyuncs.com" - }, - { - "region": "me-east-1", - "endpoint": "ons.me-east-1.aliyuncs.com" + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { "region": "us-east-1", - "endpoint": "ons.us-east-1.aliyuncs.com" + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { "region": "ap-northeast-1", - "endpoint": "ons.ap-northeast-1.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "ons.ap-southeast-2.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "ons.ap-southeast-1.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "ons.cn-shanghai.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "ons.cn-shenzhen.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "ons.cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "ons.cn-hangzhou.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "ons.eu-central-1.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "ons.eu-west-1.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "ons.cn-beijing.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "ons.ap-southeast-3.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "ons.cn-huhehaote.aliyuncs.com" - }, - { - "region": "cn-hongkong", - "endpoint": "ons.cn-hongkong.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "ons.cn-qingdao.aliyuncs.com" - } - ], - "global_endpoint": "", - "regional_endpoint_pattern": "" - }, - { - "code": "polardb", - "document_id": "58764", - "location_service_code": "polardb", - "regional_endpoints": [ - { - "region": "cn-qingdao", - "endpoint": "polardb.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "polardb.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "polardb.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "polardb.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "polardb.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "polardb.cn-huhehaote.aliyuncs.com" + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { "region": "ap-southeast-5", - "endpoint": "polardb.ap-southeast-5.aliyuncs.com" + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { - "region": "ap-south-1", - "endpoint": "polardb.ap-south-1.aliyuncs.com" - }, - { - "region": "cn-hongkong", - "endpoint": "polardb.aliyuncs.com" - } - ], - "global_endpoint": "", - "regional_endpoint_pattern": "polardb.aliyuncs.com" - }, - { - "code": "batchcompute", - "document_id": "44717", - "location_service_code": "batchcompute", - "regional_endpoints": [ - { - "region": "us-west-1", - "endpoint": "batchcompute.us-west-1.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "batchcompute.cn-beijing.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "batchcompute.cn-hangzhou.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "batchcompute.cn-shanghai.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "batchcompute.ap-southeast-1.aliyuncs.com" + "region": "cn-shenzhen", + "endpoint": "dybaseapi.aliyuncs.com" }, { "region": "cn-huhehaote", - "endpoint": "batchcompute.cn-huhehaote.aliyuncs.com" + "endpoint": "dybaseapi.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "dybaseapi.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { "region": "cn-qingdao", - "endpoint": "batchcompute.cn-qingdao.aliyuncs.com" + "endpoint": "dybaseapi.aliyuncs.com" }, { - "region": "cn-zhangjiakou", - "endpoint": "batchcompute.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "batchcompute.cn-shenzhen.aliyuncs.com" - } - ], - "global_endpoint": "", - "regional_endpoint_pattern": "batchcompute.[RegionId].aliyuncs.com" - }, - { - "code": "cloudauth", - "document_id": "60687", - "location_service_code": "cloudauth", - "regional_endpoints": [ - { - "region": "cn-hangzhou", - "endpoint": "cloudauth.aliyuncs.com" - } - ], - "global_endpoint": "cloudauth.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "vod", - "document_id": "60574", - "location_service_code": "vod", - "regional_endpoints": [ - { - "region": "cn-beijing", - "endpoint": "vod.cn-shanghai.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "vod.ap-southeast-1.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "vod.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "vod.cn-shanghai.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "vod.cn-shanghai.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "vod.cn-shanghai.aliyuncs.com" - } - ], - "global_endpoint": "", - "regional_endpoint_pattern": "" - }, - { - "code": "ram", - "document_id": "28672", - "location_service_code": "ram", - "regional_endpoints": null, - "global_endpoint": "ram.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "ess", - "document_id": "25925", - "location_service_code": "ess", - "regional_endpoints": [ - { - "region": "me-east-1", - "endpoint": "ess.me-east-1.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "ess.ap-northeast-1.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "ess.ap-south-1.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "ess.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "ess.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "ess.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "ess.cn-huhehaote.aliyuncs.com" + "region": "cn-hongkong", + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { "region": "ap-southeast-2", - "endpoint": "ess.ap-southeast-2.aliyuncs.com" + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" }, { - "region": "cn-beijing", - "endpoint": "ess.aliyuncs.com" + "region": "ap-south-1", + "endpoint": "dybaseapi.ap-southeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ecs", + "document_id": "25484", + "location_service_code": "ecs", + "regional_endpoints": [ + { + "region": "cn-huhehaote", + "endpoint": "ecs.cn-huhehaote.aliyuncs.com" }, { - "region": "cn-hongkong", - "endpoint": "ess.aliyuncs.com" + "region": "ap-northeast-1", + "endpoint": "ecs.ap-northeast-1.aliyuncs.com" }, { - "region": "us-west-1", - "endpoint": "ess.aliyuncs.com" + "region": "ap-southeast-2", + "endpoint": "ecs.ap-southeast-2.aliyuncs.com" }, { - "region": "us-east-1", - "endpoint": "ess.aliyuncs.com" + "region": "ap-south-1", + "endpoint": "ecs.ap-south-1.aliyuncs.com" }, { - "region": "ap-southeast-5", - "endpoint": "ess.ap-southeast-5.aliyuncs.com" + "region": "cn-hangzhou", + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" }, { - "region": "cn-qingdao", - "endpoint": "ess.aliyuncs.com" + "region": "cn-shenzhen", + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" }, { "region": "ap-southeast-3", - "endpoint": "ess.ap-southeast-3.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "ess.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "ess.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "ess.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "ess.eu-west-1.aliyuncs.com" - } - ], - "global_endpoint": "ess.aliyuncs.com", - "regional_endpoint_pattern": "ess.[RegionId].aliyuncs.com" - }, - { - "code": "live", - "document_id": "48207", - "location_service_code": "live", - "regional_endpoints": [ - { - "region": "cn-beijing", - "endpoint": "live.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "live.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "live.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "live.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "live.aliyuncs.com" + "endpoint": "ecs.ap-southeast-3.aliyuncs.com" }, { "region": "eu-central-1", - "endpoint": "live.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "live.aliyuncs.com" - } - ], - "global_endpoint": "live.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "hpc", - "document_id": "35201", - "location_service_code": "hpc", - "regional_endpoints": [ - { - "region": "cn-hangzhou", - "endpoint": "hpc.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "hpc.aliyuncs.com" - } - ], - "global_endpoint": "hpc.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "rds", - "document_id": "26223", - "location_service_code": "rds", - "regional_endpoints": [ - { - "region": "me-east-1", - "endpoint": "rds.me-east-1.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "rds.ap-south-1.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "rds.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "rds.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "rds.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "rds.ap-southeast-3.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "rds.ap-southeast-2.aliyuncs.com" + "endpoint": "ecs.eu-central-1.aliyuncs.com" }, { "region": "cn-zhangjiakou", - "endpoint": "rds.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "rds.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "rds.aliyuncs.com" - }, - { - "region": "us-east-1", - "endpoint": "rds.aliyuncs.com" - }, - { - "region": "ap-southeast-5", - "endpoint": "rds.ap-southeast-5.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "rds.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "rds.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "rds.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "rds.eu-west-1.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "rds.cn-huhehaote.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "rds.ap-northeast-1.aliyuncs.com" + "endpoint": "ecs.cn-zhangjiakou.aliyuncs.com" }, { "region": "cn-hongkong", - "endpoint": "rds.aliyuncs.com" - } - ], - "global_endpoint": "rds.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "cloudapi", - "document_id": "43590", - "location_service_code": "apigateway", - "regional_endpoints": [ - { - "region": "cn-beijing", - "endpoint": "apigateway.cn-beijing.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "apigateway.ap-southeast-2.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "apigateway.ap-south-1.aliyuncs.com" - }, - { - "region": "us-east-1", - "endpoint": "apigateway.us-east-1.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "apigateway.cn-shanghai.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "apigateway.us-west-1.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "apigateway.ap-southeast-1.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "apigateway.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "apigateway.cn-qingdao.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "apigateway.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "apigateway.cn-huhehaote.aliyuncs.com" + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" }, { "region": "eu-west-1", - "endpoint": "apigateway.eu-west-1.aliyuncs.com" + "endpoint": "ecs.eu-west-1.aliyuncs.com" }, { "region": "me-east-1", - "endpoint": "apigateway.me-east-1.aliyuncs.com" + "endpoint": "ecs.me-east-1.aliyuncs.com" }, { - "region": "cn-hangzhou", - "endpoint": "apigateway.cn-hangzhou.aliyuncs.com" + "region": "cn-qingdao", + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" }, { - "region": "ap-northeast-1", - "endpoint": "apigateway.ap-northeast-1.aliyuncs.com" + "region": "cn-shanghai", + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" }, { "region": "ap-southeast-5", - "endpoint": "apigateway.ap-southeast-5.aliyuncs.com" + "endpoint": "ecs.ap-southeast-5.aliyuncs.com" }, { - "region": "cn-hongkong", - "endpoint": "apigateway.cn-hongkong.aliyuncs.com" + "region": "cn-beijing", + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" }, { - "region": "cn-shenzhen", - "endpoint": "apigateway.cn-shenzhen.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "apigateway.ap-southeast-3.aliyuncs.com" + "region": "ap-southeast-1", + "endpoint": "ecs-cn-hangzhou.aliyuncs.com" } ], - "global_endpoint": "", - "regional_endpoint_pattern": "apigateway.[RegionId].aliyuncs.com" + "global_endpoint": "ecs-cn-hangzhou.aliyuncs.com", + "regional_endpoint_pattern": "" }, { - "code": "sas-api", - "document_id": "28498", - "location_service_code": "sas", + "code": "ccc", + "document_id": "63027", + "location_service_code": "ccc", "regional_endpoints": [ { "region": "cn-hangzhou", - "endpoint": "sas.aliyuncs.com" + "endpoint": "ccc.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "ccc.cn-shanghai.aliyuncs.com" } ], "global_endpoint": "", - "regional_endpoint_pattern": "" + "regional_endpoint_pattern": "ccc.[RegionId].aliyuncs.com" }, { "code": "cs", @@ -909,114 +2448,137 @@ const endpointsJson =`{ "regional_endpoint_pattern": "" }, { - "code": "jaq", - "document_id": "35037", - "location_service_code": "jaq", - "regional_endpoints": null, - "global_endpoint": "jaq.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "r-kvstore", - "document_id": "60831", - "location_service_code": "redisa", + "code": "drdspre", + "document_id": "", + "location_service_code": "drdspre", "regional_endpoints": [ { - "region": "cn-huhehaote", - "endpoint": "r-kvstore.cn-huhehaote.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "r-kvstore.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "r-kvstore.aliyuncs.com" + "region": "cn-hangzhou", + "endpoint": "drds.cn-hangzhou.aliyuncs.com" }, { "region": "cn-shanghai", - "endpoint": "r-kvstore.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "r-kvstore.ap-south-1.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "r-kvstore.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "r-kvstore.aliyuncs.com" + "endpoint": "drds.cn-shanghai.aliyuncs.com" }, { "region": "cn-shenzhen", - "endpoint": "r-kvstore.aliyuncs.com" - }, - { - "region": "me-east-1", - "endpoint": "r-kvstore.me-east-1.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "r-kvstore.ap-northeast-1.aliyuncs.com" + "endpoint": "drds.cn-shenzhen.aliyuncs.com" }, { "region": "cn-hongkong", - "endpoint": "r-kvstore.cn-hongkong.aliyuncs.com" + "endpoint": "drds.cn-hangzhou.aliyuncs.com" }, - { - "region": "ap-southeast-2", - "endpoint": "r-kvstore.ap-southeast-2.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "r-kvstore.eu-west-1.aliyuncs.com" - }, - { - "region": "ap-southeast-5", - "endpoint": "r-kvstore.ap-southeast-5.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "r-kvstore.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "r-kvstore.ap-southeast-1.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "r-kvstore.ap-southeast-3.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "r-kvstore.aliyuncs.com" - }, - { - "region": "us-east-1", - "endpoint": "r-kvstore.aliyuncs.com" - } - ], - "global_endpoint": "r-kvstore.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "drds", - "document_id": "51111", - "location_service_code": "drds", - "regional_endpoints": [ { "region": "ap-southeast-1", "endpoint": "drds.ap-southeast-1.aliyuncs.com" }, { - "region": "cn-hangzhou", - "endpoint": "drds.cn-hangzhou.aliyuncs.com" + "region": "cn-qingdao", + "endpoint": "drds.cn-qingdao.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "drds.cn-beijing.aliyuncs.com" } ], - "global_endpoint": "drds.aliyuncs.com", - "regional_endpoint_pattern": "drds.aliyuncs.com" + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "dcdn", + "document_id": "", + "location_service_code": "dcdn", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "dcdn.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "dcdn.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "linkedmall", + "document_id": "", + "location_service_code": "linkedmall", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "linkedmall.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "linkedmall.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "trademark", + "document_id": "", + "location_service_code": "trademark", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "trademark.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "openanalytics", + "document_id": "", + "location_service_code": "openanalytics", + "regional_endpoints": [ + { + "region": "cn-shenzhen", + "endpoint": "openanalytics.cn-shenzhen.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "openanalytics.eu-west-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "openanalytics.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "openanalytics.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "openanalytics.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "openanalytics.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "openanalytics.ap-southeast-3.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "openanalytics.cn-zhangjiakou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "sts", + "document_id": "28756", + "location_service_code": "sts", + "regional_endpoints": null, + "global_endpoint": "sts.aliyuncs.com", + "regional_endpoint_pattern": "" }, { "code": "waf", @@ -1032,57 +2594,476 @@ const endpointsJson =`{ "regional_endpoint_pattern": "" }, { - "code": "sts", - "document_id": "28756", - "location_service_code": "sts", - "regional_endpoints": null, - "global_endpoint": "sts.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "cr", - "document_id": "60716", - "location_service_code": "cr", - "regional_endpoints": null, - "global_endpoint": "cr.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "arms", - "document_id": "42924", - "location_service_code": "arms", + "code": "ots", + "document_id": "", + "location_service_code": "ots", "regional_endpoints": [ { - "region": "cn-hangzhou", - "endpoint": "arms.cn-hangzhou.aliyuncs.com" + "region": "me-east-1", + "endpoint": "ots.me-east-1.aliyuncs.com" }, { - "region": "cn-shanghai", - "endpoint": "arms.cn-shanghai.aliyuncs.com" + "region": "ap-southeast-5", + "endpoint": "ots.ap-southeast-5.aliyuncs.com" }, { - "region": "cn-hongkong", - "endpoint": "arms.cn-hongkong.aliyuncs.com" + "region": "eu-west-1", + "endpoint": "ots.eu-west-1.aliyuncs.com" }, { - "region": "ap-southeast-1", - "endpoint": "arms.ap-southeast-1.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "arms.cn-shenzhen.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "arms.cn-qingdao.aliyuncs.com" + "region": "cn-huhehaote", + "endpoint": "ots.cn-huhehaote.aliyuncs.com" }, { "region": "cn-beijing", - "endpoint": "arms.cn-beijing.aliyuncs.com" + "endpoint": "ots.cn-beijing.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "ots.ap-southeast-2.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "ots.us-west-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "ots.us-east-1.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "ots.ap-south-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "ots.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "ots.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "ots.cn-hangzhou.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "ots.ap-northeast-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "ots.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "ots.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "ots.ap-southeast-3.aliyuncs.com" } ], "global_endpoint": "", - "regional_endpoint_pattern": "arms.[RegionId].aliyuncs.com" + "regional_endpoint_pattern": "" + }, + { + "code": "cloudfirewall", + "document_id": "", + "location_service_code": "cloudfirewall", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "cloudfw.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "dm", + "document_id": "29434", + "location_service_code": "dm", + "regional_endpoints": [ + { + "region": "ap-southeast-2", + "endpoint": "dm.ap-southeast-2.aliyuncs.com" + } + ], + "global_endpoint": "dm.aliyuncs.com", + "regional_endpoint_pattern": "dm.[RegionId].aliyuncs.com" + }, + { + "code": "oas", + "document_id": "", + "location_service_code": "oas", + "regional_endpoints": [ + { + "region": "cn-shenzhen", + "endpoint": "cn-shenzhen.oas.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "cn-beijing.oas.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "cn-hangzhou.oas.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ddoscoo", + "document_id": "", + "location_service_code": "ddoscoo", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ddoscoo.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "jaq", + "document_id": "35037", + "location_service_code": "jaq", + "regional_endpoints": null, + "global_endpoint": "jaq.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "iovcc", + "document_id": "", + "location_service_code": "iovcc", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "iovcc.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "sas-api", + "document_id": "28498", + "location_service_code": "sas", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "sas.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "chatbot", + "document_id": "60760", + "location_service_code": "beebot", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "chatbot.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "chatbot.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "chatbot.[RegionId].aliyuncs.com" + }, + { + "code": "airec", + "document_id": "", + "location_service_code": "airec", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "airec.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "airec.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "airec.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "dmsenterprise", + "document_id": "", + "location_service_code": "dmsenterprise", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "dms-enterprise.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "dms-enterprise.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "dms-enterprise.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "dms-enterprise.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "dms-enterprise.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "dms-enterprise.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ivision", + "document_id": "", + "location_service_code": "ivision", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ivision.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "ivision.cn-beijing.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "odpsplusmayi", + "document_id": "", + "location_service_code": "odpsplusmayi", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "bsb.cloud.alipay.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "bsb.cloud.alipay.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "bsb.cloud.alipay.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "gameshield", + "document_id": "", + "location_service_code": "gameshield", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "gameshield.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "gameshield.cn-zhangjiakou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "scdn", + "document_id": "", + "location_service_code": "scdn", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "scdn.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "hitsdb", + "document_id": "", + "location_service_code": "hitsdb", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "hitsdb.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "hdm", + "document_id": "", + "location_service_code": "hdm", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "hdm-api.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "slb", + "document_id": "27565", + "location_service_code": "slb", + "regional_endpoints": [ + { + "region": "cn-shenzhen", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "slb.eu-west-1.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "slb.ap-northeast-1.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "slb.ap-southeast-2.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "slb.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "slb.ap-south-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "slb.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "slb.ap-southeast-5.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "slb.ap-southeast-3.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "slb.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "slb.me-east-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "slb.cn-zhangjiakou.aliyuncs.com" + } + ], + "global_endpoint": "slb.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "green", + "document_id": "28427", + "location_service_code": "green", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "green.cn-beijing.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "green.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "green.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "green.cn-hangzhou.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "green.us-west-1.aliyuncs.com" + } + ], + "global_endpoint": "green.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "cccvn", + "document_id": "", + "location_service_code": "cccvn", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "voicenavigator.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ddosrewards", + "document_id": "", + "location_service_code": "ddosrewards", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ddosright.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" }, { "code": "iot", @@ -1118,135 +3099,416 @@ const endpointsJson =`{ "regional_endpoint_pattern": "iot.[RegionId].aliyuncs.com" }, { - "code": "vpc", - "document_id": "34962", - "location_service_code": "vpc", + "code": "bssopenapi", + "document_id": "", + "location_service_code": "bssopenapi", "regional_endpoints": [ - { - "region": "us-west-1", - "endpoint": "vpc.aliyuncs.com" - }, - { - "region": "us-east-1", - "endpoint": "vpc.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "vpc.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "vpc.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "vpc.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "vpc.cn-huhehaote.aliyuncs.com" - }, - { - "region": "me-east-1", - "endpoint": "vpc.me-east-1.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "vpc.ap-northeast-1.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "vpc.ap-southeast-3.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "vpc.eu-central-1.aliyuncs.com" - }, - { - "region": "ap-southeast-5", - "endpoint": "vpc.ap-southeast-5.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "vpc.ap-south-1.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "vpc.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "vpc.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "vpc.ap-southeast-2.aliyuncs.com" - }, - { - "region": "cn-qingdao", - "endpoint": "vpc.aliyuncs.com" - }, { "region": "cn-shanghai", - "endpoint": "vpc.aliyuncs.com" + "endpoint": "business.aliyuncs.com" }, { "region": "cn-hongkong", - "endpoint": "vpc.aliyuncs.com" + "endpoint": "business.aliyuncs.com" }, { - "region": "eu-west-1", - "endpoint": "vpc.eu-west-1.aliyuncs.com" - } - ], - "global_endpoint": "vpc.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "aegis", - "document_id": "28449", - "location_service_code": "vipaegis", - "regional_endpoints": [ + "region": "ap-southeast-2", + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, { "region": "ap-southeast-3", - "endpoint": "aegis.ap-southeast-3.aliyuncs.com" + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "business.aliyuncs.com" }, { "region": "cn-hangzhou", - "endpoint": "aegis.cn-hangzhou.aliyuncs.com" - } - ], - "global_endpoint": "aegis.cn-hangzhou.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "domain", - "document_id": "42875", - "location_service_code": "domain", - "regional_endpoints": [ + "endpoint": "business.aliyuncs.com" + }, { - "region": "cn-hangzhou", - "endpoint": "domain.aliyuncs.com" + "region": "ap-southeast-5", + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "business.aliyuncs.com" }, { "region": "ap-southeast-1", - "endpoint": "domain-intl.aliyuncs.com" + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "business.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "business.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "business.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "business.ap-southeast-1.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "business.ap-southeast-1.aliyuncs.com" } ], - "global_endpoint": "domain.aliyuncs.com", - "regional_endpoint_pattern": "domain.aliyuncs.com" + "global_endpoint": "", + "regional_endpoint_pattern": "" }, { - "code": "cdn", - "document_id": "27148", - "location_service_code": "cdn", + "code": "sca", + "document_id": "", + "location_service_code": "sca", "regional_endpoints": [ { "region": "cn-hangzhou", - "endpoint": "cdn.aliyuncs.com" + "endpoint": "qualitycheck.cn-hangzhou.aliyuncs.com" } ], - "global_endpoint": "cdn.aliyuncs.com", + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "luban", + "document_id": "", + "location_service_code": "luban", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "luban.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "luban.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "drdspost", + "document_id": "", + "location_service_code": "drdspost", + "regional_endpoints": [ + { + "region": "cn-shanghai", + "endpoint": "drds.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "drds.cn-hangzhou.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "drds.ap-southeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "drds", + "document_id": "51111", + "location_service_code": "drds", + "regional_endpoints": [ + { + "region": "ap-southeast-1", + "endpoint": "drds.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "drds.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "drds.aliyuncs.com", + "regional_endpoint_pattern": "drds.aliyuncs.com" + }, + { + "code": "httpdns", + "document_id": "52679", + "location_service_code": "httpdns", + "regional_endpoints": null, + "global_endpoint": "httpdns-api.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "cas", + "document_id": "", + "location_service_code": "cas", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "cas.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "cas.ap-southeast-2.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "cas.ap-northeast-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "cas.eu-central-1.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "cas.me-east-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "hpc", + "document_id": "35201", + "location_service_code": "hpc", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "hpc.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "hpc.aliyuncs.com" + } + ], + "global_endpoint": "hpc.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "ddosbasic", + "document_id": "", + "location_service_code": "ddosbasic", + "regional_endpoints": [ + { + "region": "ap-south-1", + "endpoint": "antiddos-openapi.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "antiddos-openapi.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "antiddos-openapi.ap-southeast-3.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "antiddos-openapi.me-east-1.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "antiddos-openapi.ap-southeast-5.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "antiddos-openapi.ap-southeast-2.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "antiddos-openapi.eu-west-1.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "antiddos-openapi.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "antiddos-openapi.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "antiddos.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "antiddos-openapi.ap-northeast-1.aliyuncs.com" + } + ], + "global_endpoint": "antiddos.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "clouddesktop", + "document_id": "", + "location_service_code": "clouddesktop", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "clouddesktop.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "clouddesktop.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "clouddesktop.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "clouddesktop.cn-shenzhen.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "uis", + "document_id": "", + "location_service_code": "uis", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "uis.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "imm", + "document_id": "", + "location_service_code": "imm", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "imm.cn-beijing.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "imm.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "imm.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "imm.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "imm.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "imm.cn-shenzhen.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ens", + "document_id": "", + "location_service_code": "ens", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ens.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ram", + "document_id": "28672", + "location_service_code": "ram", + "regional_endpoints": null, + "global_endpoint": "ram.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "hcs_mgw", + "document_id": "", + "location_service_code": "hcs_mgw", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "mgw.cn-hangzhou.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "mgw.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "mgw.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "itaas", + "document_id": "55759", + "location_service_code": "itaas", + "regional_endpoints": null, + "global_endpoint": "itaas.aliyuncs.com", "regional_endpoint_pattern": "" }, { @@ -1263,96 +3525,384 @@ const endpointsJson =`{ "regional_endpoint_pattern": "" }, { - "code": "emr", - "document_id": "28140", - "location_service_code": "emr", + "code": "alikafka", + "document_id": "", + "location_service_code": "alikafka", "regional_endpoints": [ - { - "region": "us-east-1", - "endpoint": "emr.us-east-1.aliyuncs.com" - }, - { - "region": "ap-southeast-5", - "endpoint": "emr.ap-southeast-5.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "emr.eu-central-1.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "emr.eu-west-1.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "emr.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "emr.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "emr.ap-south-1.aliyuncs.com" - }, - { - "region": "me-east-1", - "endpoint": "emr.me-east-1.aliyuncs.com" - }, { "region": "cn-beijing", - "endpoint": "emr.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "emr.aliyuncs.com" - }, - { - "region": "cn-hongkong", - "endpoint": "emr.cn-hongkong.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "emr.cn-huhehaote.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "emr.ap-northeast-1.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "emr.ap-southeast-3.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "emr.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "emr.ap-southeast-2.aliyuncs.com" + "endpoint": "alikafka.cn-beijing.aliyuncs.com" }, { "region": "cn-zhangjiakou", - "endpoint": "emr.cn-zhangjiakou.aliyuncs.com" + "endpoint": "alikafka.cn-zhangjiakou.aliyuncs.com" }, { - "region": "cn-qingdao", - "endpoint": "emr.cn-qingdao.aliyuncs.com" + "region": "cn-huhehaote", + "endpoint": "alikafka.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "alikafka.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "alikafka.cn-shanghai.aliyuncs.com" }, { "region": "cn-shenzhen", - "endpoint": "emr.aliyuncs.com" + "endpoint": "alikafka.cn-shenzhen.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "alikafka.cn-hongkong.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "alikafka.cn-qingdao.aliyuncs.com" } ], - "global_endpoint": "emr.aliyuncs.com", - "regional_endpoint_pattern": "emr.[RegionId].aliyuncs.com" + "global_endpoint": "", + "regional_endpoint_pattern": "" }, { - "code": "httpdns", - "document_id": "52679", - "location_service_code": "httpdns", + "code": "faas", + "document_id": "", + "location_service_code": "faas", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "faas.cn-hangzhou.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "faas.cn-shenzhen.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "faas.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "faas.cn-beijing.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "alidfs", + "document_id": "", + "location_service_code": "alidfs", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "dfs.cn-beijing.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "dfs.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "cms", + "document_id": "28615", + "location_service_code": "cms", + "regional_endpoints": [ + { + "region": "ap-southeast-3", + "endpoint": "metrics.ap-southeast-3.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "metrics.ap-southeast-5.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "metrics.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "metrics.cn-hangzhou.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "metrics.eu-west-1.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "metrics.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "metrics.ap-northeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "domain-intl", + "document_id": "", + "location_service_code": "domain-intl", "regional_endpoints": null, - "global_endpoint": "httpdns-api.aliyuncs.com", + "global_endpoint": "domain-intl.aliyuncs.com", + "regional_endpoint_pattern": "domain-intl.aliyuncs.com" + }, + { + "code": "kvstore", + "document_id": "", + "location_service_code": "kvstore", + "regional_endpoints": [ + { + "region": "ap-northeast-1", + "endpoint": "r-kvstore.ap-northeast-1.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ccs", + "document_id": "", + "location_service_code": "ccs", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "ccs.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "ess", + "document_id": "25925", + "location_service_code": "ess", + "regional_endpoints": [ + { + "region": "cn-huhehaote", + "endpoint": "ess.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "ess.ap-southeast-2.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "ess.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "ess.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "ess.eu-west-1.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "ess.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "ess.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "ess.ap-southeast-5.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "ess.ap-southeast-3.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "ess.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "ess.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "ess.aliyuncs.com" + }, + { + "region": "me-east-1", + "endpoint": "ess.me-east-1.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "ess.ap-northeast-1.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "ess.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "ess.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "ess.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "ess.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "ess.aliyuncs.com" + } + ], + "global_endpoint": "ess.aliyuncs.com", + "regional_endpoint_pattern": "ess.[RegionId].aliyuncs.com" + }, + { + "code": "dds", + "document_id": "61715", + "location_service_code": "dds", + "regional_endpoints": [ + { + "region": "me-east-1", + "endpoint": "mongodb.me-east-1.aliyuncs.com" + }, + { + "region": "ap-southeast-3", + "endpoint": "mongodb.ap-southeast-3.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "mongodb.ap-southeast-5.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "mongodb.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "mongodb.ap-northeast-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "mongodb.eu-central-1.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "mongodb.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "mongodb.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "mongodb.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "mongodb.eu-west-1.aliyuncs.com" + }, + { + "region": "us-east-1", + "endpoint": "mongodb.aliyuncs.com" + }, + { + "region": "cn-huhehaote", + "endpoint": "mongodb.cn-huhehaote.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "mongodb.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "mongodb.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "mongodb.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "mongodb.ap-southeast-2.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "mongodb.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "mongodb.ap-south-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "mongodb.aliyuncs.com" + } + ], + "global_endpoint": "mongodb.aliyuncs.com", + "regional_endpoint_pattern": "mongodb.[RegionId].aliyuncs.com" + }, + { + "code": "mts", + "document_id": "29212", + "location_service_code": "mts", + "regional_endpoints": [ + { + "region": "cn-beijing", + "endpoint": "mts.cn-beijing.aliyuncs.com" + }, + { + "region": "ap-northeast-1", + "endpoint": "mts.ap-northeast-1.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "mts.cn-hongkong.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "mts.cn-shenzhen.aliyuncs.com" + }, + { + "region": "cn-zhangjiakou", + "endpoint": "mts.cn-zhangjiakou.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "mts.ap-south-1.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "mts.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "mts.ap-southeast-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "mts.us-west-1.aliyuncs.com" + }, + { + "region": "eu-central-1", + "endpoint": "mts.eu-central-1.aliyuncs.com" + }, + { + "region": "eu-west-1", + "endpoint": "mts.eu-west-1.aliyuncs.com" + }, + { + "region": "cn-hangzhou", + "endpoint": "mts.cn-hangzhou.aliyuncs.com" + } + ], + "global_endpoint": "", "regional_endpoint_pattern": "" }, { @@ -1364,291 +3914,148 @@ const endpointsJson =`{ "regional_endpoint_pattern": "" }, { - "code": "cms", - "document_id": "28615", - "location_service_code": "cms", + "code": "hcs_sgw", + "document_id": "", + "location_service_code": "hcs_sgw", "regional_endpoints": [ { - "region": "cn-qingdao", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" + "region": "eu-central-1", + "endpoint": "sgw.eu-central-1.aliyuncs.com" }, { "region": "cn-hangzhou", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "metrics.eu-west-1.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "metrics.ap-northeast-1.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "metrics.ap-south-1.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-southeast-2", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-southeast-5", - "endpoint": "metrics.ap-southeast-5.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "metrics.cn-huhehaote.aliyuncs.com" + "endpoint": "sgw.cn-shanghai.aliyuncs.com" }, { "region": "cn-zhangjiakou", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" + "endpoint": "sgw.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "sgw.ap-southeast-1.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "sgw.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-hongkong", + "endpoint": "sgw.cn-shanghai.aliyuncs.com" + }, + { + "region": "ap-southeast-2", + "endpoint": "sgw.ap-southeast-2.aliyuncs.com" + }, + { + "region": "cn-shanghai", + "endpoint": "sgw.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-qingdao", + "endpoint": "sgw.cn-shanghai.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "sgw.cn-shanghai.aliyuncs.com" + } + ], + "global_endpoint": "", + "regional_endpoint_pattern": "" + }, + { + "code": "hbase", + "document_id": "", + "location_service_code": "hbase", + "regional_endpoints": [ + { + "region": "cn-huhehaote", + "endpoint": "hbase.cn-huhehaote.aliyuncs.com" + }, + { + "region": "ap-south-1", + "endpoint": "hbase.ap-south-1.aliyuncs.com" + }, + { + "region": "us-west-1", + "endpoint": "hbase.aliyuncs.com" }, { "region": "me-east-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" + "endpoint": "hbase.me-east-1.aliyuncs.com" }, { - "region": "ap-southeast-3", - "endpoint": "metrics.ap-southeast-3.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "cn-hongkong", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - }, - { - "region": "us-east-1", - "endpoint": "metrics.cn-hangzhou.aliyuncs.com" - } - ], - "global_endpoint": "metrics.cn-hangzhou.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "nas", - "document_id": "62598", - "location_service_code": "nas", - "regional_endpoints": [ - { - "region": "ap-southeast-5", - "endpoint": "nas.ap-southeast-5.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "nas.ap-south-1.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "nas.us-west-1.aliyuncs.com" - }, - { - "region": "ap-southeast-3", - "endpoint": "nas.ap-southeast-3.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "nas.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "ap-northeast-1", - "endpoint": "nas.ap-northeast-1.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "nas.cn-hangzhou.aliyuncs.com" + "region": "eu-central-1", + "endpoint": "hbase.eu-central-1.aliyuncs.com" }, { "region": "cn-qingdao", - "endpoint": "nas.cn-qingdao.aliyuncs.com" + "endpoint": "hbase.aliyuncs.com" }, { - "region": "cn-beijing", - "endpoint": "nas.cn-beijing.aliyuncs.com" + "region": "cn-shanghai", + "endpoint": "hbase.aliyuncs.com" + }, + { + "region": "cn-shenzhen", + "endpoint": "hbase.aliyuncs.com" }, { "region": "ap-southeast-2", - "endpoint": "nas.ap-southeast-2.aliyuncs.com" + "endpoint": "hbase.ap-southeast-2.aliyuncs.com" }, { - "region": "cn-shenzhen", - "endpoint": "nas.cn-shenzhen.aliyuncs.com" + "region": "ap-southeast-3", + "endpoint": "hbase.ap-southeast-3.aliyuncs.com" }, { - "region": "eu-central-1", - "endpoint": "nas.eu-central-1.aliyuncs.com" - }, - { - "region": "cn-huhehaote", - "endpoint": "nas.cn-huhehaote.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "nas.cn-shanghai.aliyuncs.com" - }, - { - "region": "cn-hongkong", - "endpoint": "nas.cn-hongkong.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "nas.ap-southeast-1.aliyuncs.com" + "region": "cn-hangzhou", + "endpoint": "hbase.aliyuncs.com" }, { "region": "us-east-1", - "endpoint": "nas.us-east-1.aliyuncs.com" + "endpoint": "hbase.aliyuncs.com" + }, + { + "region": "ap-southeast-5", + "endpoint": "hbase.ap-southeast-5.aliyuncs.com" + }, + { + "region": "cn-beijing", + "endpoint": "hbase.aliyuncs.com" + }, + { + "region": "ap-southeast-1", + "endpoint": "hbase.aliyuncs.com" + } + ], + "global_endpoint": "hbase.aliyuncs.com", + "regional_endpoint_pattern": "" + }, + { + "code": "bastionhost", + "document_id": "", + "location_service_code": "bastionhost", + "regional_endpoints": [ + { + "region": "cn-hangzhou", + "endpoint": "yundun-bastionhost.aliyuncs.com" } ], "global_endpoint": "", "regional_endpoint_pattern": "" }, { - "code": "cds", - "document_id": "62887", - "location_service_code": "codepipeline", + "code": "vs", + "document_id": "", + "location_service_code": "vs", "regional_endpoints": [ { - "region": "cn-beijing", - "endpoint": "cds.cn-beijing.aliyuncs.com" - } - ], - "global_endpoint": "cds.cn-beijing.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "green", - "document_id": "28427", - "location_service_code": "green", - "regional_endpoints": [ - { - "region": "us-west-1", - "endpoint": "green.us-west-1.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "green.cn-beijing.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "green.ap-southeast-1.aliyuncs.com" + "region": "cn-hangzhou", + "endpoint": "vs.cn-hangzhou.aliyuncs.com" }, { "region": "cn-shanghai", - "endpoint": "green.cn-shanghai.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "green.cn-hangzhou.aliyuncs.com" - } - ], - "global_endpoint": "green.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "ccc", - "document_id": "63027", - "location_service_code": "ccc", - "regional_endpoints": [ - { - "region": "cn-shanghai", - "endpoint": "ccc.cn-shanghai.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "ccc.cn-hangzhou.aliyuncs.com" - } - ], - "global_endpoint": "", - "regional_endpoint_pattern": "ccc.[RegionId].aliyuncs.com" - }, - { - "code": "ros", - "document_id": "28899", - "location_service_code": "ros", - "regional_endpoints": [ - { - "region": "cn-hangzhou", - "endpoint": "ros.aliyuncs.com" - } - ], - "global_endpoint": "ros.aliyuncs.com", - "regional_endpoint_pattern": "" - }, - { - "code": "mts", - "document_id": "29212", - "location_service_code": "mts", - "regional_endpoints": [ - { - "region": "ap-northeast-1", - "endpoint": "mts.ap-northeast-1.aliyuncs.com" - }, - { - "region": "cn-shanghai", - "endpoint": "mts.cn-shanghai.aliyuncs.com" - }, - { - "region": "cn-hongkong", - "endpoint": "mts.cn-hongkong.aliyuncs.com" - }, - { - "region": "cn-shenzhen", - "endpoint": "mts.cn-shenzhen.aliyuncs.com" - }, - { - "region": "us-west-1", - "endpoint": "mts.us-west-1.aliyuncs.com" - }, - { - "region": "cn-zhangjiakou", - "endpoint": "mts.cn-zhangjiakou.aliyuncs.com" - }, - { - "region": "eu-west-1", - "endpoint": "mts.eu-west-1.aliyuncs.com" - }, - { - "region": "ap-south-1", - "endpoint": "mts.ap-south-1.aliyuncs.com" - }, - { - "region": "cn-beijing", - "endpoint": "mts.cn-beijing.aliyuncs.com" - }, - { - "region": "cn-hangzhou", - "endpoint": "mts.cn-hangzhou.aliyuncs.com" - }, - { - "region": "ap-southeast-1", - "endpoint": "mts.ap-southeast-1.aliyuncs.com" - }, - { - "region": "eu-central-1", - "endpoint": "mts.eu-central-1.aliyuncs.com" + "endpoint": "vs.cn-shanghai.aliyuncs.com" } ], "global_endpoint": "", @@ -1656,6 +4063,7 @@ const endpointsJson =`{ } ] }` + var initOnce sync.Once var data interface{} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/mapping_resolver.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/mapping_resolver.go index e39f53367..a415a169a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/mapping_resolver.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/mapping_resolver.go @@ -17,32 +17,33 @@ package endpoints import ( "fmt" "strings" + "sync" ) const keyFormatter = "%s::%s" -var endpointMapping = make(map[string]string) +type EndpointMapping struct { + sync.RWMutex + endpoint map[string]string +} -// AddEndpointMapping Use product id and region id as key to store the endpoint into inner map +var endpointMapping = EndpointMapping{endpoint: make(map[string]string)} + +// AddEndpointMapping use productId and regionId as key to store the endpoint into inner map +// when using the same productId and regionId as key, the endpoint will be covered. func AddEndpointMapping(regionId, productId, endpoint string) (err error) { key := fmt.Sprintf(keyFormatter, strings.ToLower(regionId), strings.ToLower(productId)) - endpointMapping[key] = endpoint + endpointMapping.Lock() + endpointMapping.endpoint[key] = endpoint + endpointMapping.Unlock() return nil } -// MappingResolver the mapping resolver type -type MappingResolver struct { -} - -// GetName get the resolver name: "mapping resolver" -func (resolver *MappingResolver) GetName() (name string) { - name = "mapping resolver" - return -} - -// TryResolve use Product and RegionId as key to find endpoint from inner map -func (resolver *MappingResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error) { - key := fmt.Sprintf(keyFormatter, strings.ToLower(param.RegionId), strings.ToLower(param.Product)) - endpoint, contains := endpointMapping[key] - return endpoint, contains, nil +// GetEndpointFromMap use Product and RegionId as key to find endpoint from inner map +func GetEndpointFromMap(regionId, productId string) string { + key := fmt.Sprintf(keyFormatter, strings.ToLower(regionId), strings.ToLower(productId)) + endpointMapping.RLock() + endpoint := endpointMapping.endpoint[key] + endpointMapping.RUnlock() + return endpoint } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/resolver.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/resolver.go index 5e1e30530..a73b8b137 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/resolver.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/resolver.go @@ -70,8 +70,6 @@ func Resolve(param *ResolveParam) (endpoint string, err error) { func getAllResolvers() []Resolver { once.Do(func() { resolvers = []Resolver{ - &SimpleHostResolver{}, - &MappingResolver{}, &LocationResolver{}, &LocalRegionalResolver{}, &LocalGlobalResolver{}, diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/simple_host_resolver.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/simple_host_resolver.go deleted file mode 100644 index 9ba2346c6..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/endpoints/simple_host_resolver.go +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package endpoints - -// SimpleHostResolver the simple host resolver type -type SimpleHostResolver struct { -} - -// GetName get the resolver name: "simple host resolver" -func (resolver *SimpleHostResolver) GetName() (name string) { - name = "simple host resolver" - return -} - -// TryResolve if the Domain exist in param, use it as endpoint -func (resolver *SimpleHostResolver) TryResolve(param *ResolveParam) (endpoint string, support bool, err error) { - if support = len(param.Domain) > 0; support { - endpoint = param.Domain - } - return -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/logger.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/logger.go index 04f033935..a01a7bbc9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/logger.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/logger.go @@ -21,7 +21,7 @@ type Logger struct { } var defaultLoggerTemplate = `{time} {channel}: "{method} {uri} HTTP/{version}" {code} {cost} {hostname}` -var loggerParam = []string{"{time}", "{start_time}", "{ts}", "{channel}", "{pid}", "{host}", "{method}", "{uri}", "{version}", "{target}", "{hostname}", "{code}", "{error}", "{req_headers}", "{res_headers}", "{cost}"} +var loggerParam = []string{"{time}", "{start_time}", "{ts}", "{channel}", "{pid}", "{host}", "{method}", "{uri}", "{version}", "{target}", "{hostname}", "{code}", "{error}", "{req_headers}", "{res_body}", "{res_headers}", "{cost}"} func initLogMsg(fieldMap map[string]string) { for _, value := range loggerParam { diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/acs_request.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/acs_request.go index 725b20b91..5cd7cd1a6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/acs_request.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/acs_request.go @@ -39,6 +39,7 @@ const ( PUT = "PUT" POST = "POST" DELETE = "DELETE" + PATCH = "PATCH" HEAD = "HEAD" OPTIONS = "OPTIONS" @@ -70,6 +71,7 @@ type AcsRequest interface { GetStyle() string GetProduct() string GetVersion() string + SetVersion(version string) GetActionName() string GetAcceptFormat() string GetLocationServiceCode() string @@ -166,6 +168,10 @@ func (request *baseRequest) GetContent() []byte { return request.Content } +func (request *baseRequest) SetVersion(version string) { + request.version = version +} + func (request *baseRequest) GetVersion() string { return request.version } @@ -317,6 +323,9 @@ func flatRepeatedList(dataValue reflect.Value, request AcsRequest, position, pre if dataValue.Field(i).Kind().String() == "map" { byt, _ := json.Marshal(dataValue.Field(i).Interface()) value = string(byt) + if value == "null" { + value = "" + } } err = addParam(request, fieldPosition, key, value) if err != nil { @@ -324,23 +333,84 @@ func flatRepeatedList(dataValue reflect.Value, request AcsRequest, position, pre } } else if typeTag == "Repeated" { // repeated param - repeatedFieldValue := dataValue.Field(i) - if repeatedFieldValue.Kind() != reflect.Slice { - // possible value: {"[]string", "*[]struct"}, we must call Elem() in the last condition - repeatedFieldValue = repeatedFieldValue.Elem() + err = handleRepeatedParams(request, dataValue, prefix, name, fieldPosition, i) + if err != nil { + return } - if repeatedFieldValue.IsValid() && !repeatedFieldValue.IsNil() { - for m := 0; m < repeatedFieldValue.Len(); m++ { - elementValue := repeatedFieldValue.Index(m) - key := prefix + name + "." + strconv.Itoa(m+1) - if elementValue.Type().Kind().String() == "string" { - value := elementValue.String() - err = addParam(request, fieldPosition, key, value) - if err != nil { - return - } - } else { - err = flatRepeatedList(elementValue, request, fieldPosition, key+".") + } else if typeTag == "Struct" { + err = handleStruct(request, dataValue, prefix, name, fieldPosition, i) + if err != nil { + return + } + } + } + } + return +} + +func handleRepeatedParams(request AcsRequest, dataValue reflect.Value, prefix, name, fieldPosition string, index int) (err error) { + repeatedFieldValue := dataValue.Field(index) + if repeatedFieldValue.Kind() != reflect.Slice { + // possible value: {"[]string", "*[]struct"}, we must call Elem() in the last condition + repeatedFieldValue = repeatedFieldValue.Elem() + } + if repeatedFieldValue.IsValid() && !repeatedFieldValue.IsNil() { + for m := 0; m < repeatedFieldValue.Len(); m++ { + elementValue := repeatedFieldValue.Index(m) + key := prefix + name + "." + strconv.Itoa(m+1) + if elementValue.Type().Kind().String() == "string" { + value := elementValue.String() + err = addParam(request, fieldPosition, key, value) + if err != nil { + return + } + } else { + err = flatRepeatedList(elementValue, request, fieldPosition, key+".") + if err != nil { + return + } + } + } + } + return nil +} + +func handleStruct(request AcsRequest, dataValue reflect.Value, prefix, name, fieldPosition string, index int) (err error) { + valueField := dataValue.Field(index) + if valueField.IsValid() && valueField.String() != "" { + valueFieldType := valueField.Type() + for m := 0; m < valueFieldType.NumField(); m++ { + fieldName := valueFieldType.Field(m).Name + elementValue := valueField.FieldByName(fieldName) + key := prefix + name + "." + fieldName + if elementValue.Type().String() == "[]string" { + if elementValue.IsNil() { + continue + } + for j := 0; j < elementValue.Len(); j++ { + err = addParam(request, fieldPosition, key+"."+strconv.Itoa(j+1), elementValue.Index(j).String()) + if err != nil { + return + } + } + } else { + if elementValue.Type().Kind().String() == "string" { + value := elementValue.String() + err = addParam(request, fieldPosition, key, value) + if err != nil { + return + } + } else if elementValue.Type().Kind().String() == "struct" { + err = flatRepeatedList(elementValue, request, fieldPosition, key+".") + if err != nil { + return + } + } else if !elementValue.IsNil() { + repeatedFieldValue := elementValue.Elem() + if repeatedFieldValue.IsValid() && !repeatedFieldValue.IsNil() { + for m := 0; m < repeatedFieldValue.Len(); m++ { + elementValue := repeatedFieldValue.Index(m) + err = flatRepeatedList(elementValue, request, fieldPosition, key+"."+strconv.Itoa(m+1)+".") if err != nil { return } @@ -350,7 +420,7 @@ func flatRepeatedList(dataValue reflect.Value, request AcsRequest, position, pre } } } - return + return nil } func addParam(request AcsRequest, position, name, value string) (err error) { diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/common_request.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/common_request.go index 80c170097..a27f82c00 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/common_request.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/common_request.go @@ -11,10 +11,11 @@ import ( type CommonRequest struct { *baseRequest - Version string - ApiName string - Product string - ServiceCode string + Version string + ApiName string + Product string + ServiceCode string + EndpointType string // roa params PathPattern string @@ -82,7 +83,10 @@ func (request *CommonRequest) TransToAcsRequest() { rpcRequest.product = request.Product rpcRequest.version = request.Version rpcRequest.locationServiceCode = request.ServiceCode + rpcRequest.locationEndpointType = request.EndpointType rpcRequest.actionName = request.ApiName + rpcRequest.Headers["x-acs-version"] = request.Version + rpcRequest.Headers["x-acs-action"] = request.ApiName request.Ontology = rpcRequest } } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/roa_request.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/roa_request.go index 8159aa377..4f52345b5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/roa_request.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/roa_request.go @@ -88,7 +88,6 @@ func (request *RoaRequest) buildQueries() string { } } result := urlBuilder.String() - result = popStandardUrlencode(result) return result } @@ -102,13 +101,6 @@ func (request *RoaRequest) buildQueryString() string { return q.Encode() } -func popStandardUrlencode(stringToSign string) (result string) { - result = strings.Replace(stringToSign, "+", "%20", -1) - result = strings.Replace(result, "*", "%2A", -1) - result = strings.Replace(result, "%7E", "~", -1) - return -} - func (request *RoaRequest) BuildUrl() string { // for network trans, need url encoded scheme := strings.ToLower(request.Scheme) @@ -131,12 +123,13 @@ func (request *RoaRequest) InitWithApiInfo(product, version, action, uriPattern, request.baseRequest = defaultBaseRequest() request.PathParams = make(map[string]string) request.Headers["x-acs-version"] = version + request.Headers["x-acs-action"] = action request.pathPattern = uriPattern request.locationServiceCode = serviceCode request.locationEndpointType = endpointType request.product = product //request.version = version - //request.actionName = action + request.actionName = action } func (request *RoaRequest) initWithCommonRequest(commonRequest *CommonRequest) { @@ -145,7 +138,10 @@ func (request *RoaRequest) initWithCommonRequest(commonRequest *CommonRequest) { request.product = commonRequest.Product //request.version = commonRequest.Version request.Headers["x-acs-version"] = commonRequest.Version - //request.actionName = commonRequest.ApiName + if commonRequest.ApiName != "" { + request.Headers["x-acs-action"] = commonRequest.ApiName + } + request.actionName = commonRequest.ApiName request.pathPattern = commonRequest.PathPattern request.locationServiceCode = commonRequest.ServiceCode request.locationEndpointType = "" diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/rpc_request.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/rpc_request.go index 01be6fd04..a04765e94 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/rpc_request.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests/rpc_request.go @@ -76,4 +76,6 @@ func (request *RpcRequest) InitWithApiInfo(product, version, action, serviceCode request.actionName = action request.locationServiceCode = serviceCode request.locationEndpointType = endpointType + request.Headers["x-acs-version"] = version + request.Headers["x-acs-action"] = action } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses/json_parser.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses/json_parser.go index 4c9570198..cd66316d7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses/json_parser.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses/json_parser.go @@ -4,12 +4,13 @@ import ( "encoding/json" "io" "math" + "reflect" "strconv" "strings" - "sync" "unsafe" jsoniter "github.com/json-iterator/go" + "github.com/modern-go/reflect2" ) const maxUint = ^uint(0) @@ -17,145 +18,145 @@ const maxInt = int(maxUint >> 1) const minInt = -maxInt - 1 var jsonParser jsoniter.API -var initJson = &sync.Once{} -func initJsonParserOnce() { - initJson.Do(func() { - registerBetterFuzzyDecoder() - jsonParser = jsoniter.Config{ - EscapeHTML: true, - SortMapKeys: true, - ValidateJsonRawMessage: true, - CaseSensitive: true, - }.Froze() - }) +func init() { + jsonParser = jsoniter.Config{ + EscapeHTML: true, + SortMapKeys: true, + ValidateJsonRawMessage: true, + CaseSensitive: true, + }.Froze() + + jsonParser.RegisterExtension(newBetterFuzzyExtension()) } -func registerBetterFuzzyDecoder() { - jsoniter.RegisterTypeDecoder("string", &nullableFuzzyStringDecoder{}) - jsoniter.RegisterTypeDecoder("bool", &fuzzyBoolDecoder{}) - jsoniter.RegisterTypeDecoder("float32", &nullableFuzzyFloat32Decoder{}) - jsoniter.RegisterTypeDecoder("float64", &nullableFuzzyFloat64Decoder{}) - jsoniter.RegisterTypeDecoder("int", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(maxInt) || val < float64(minInt) { - iter.ReportError("fuzzy decode int", "exceed range") - return +func newBetterFuzzyExtension() jsoniter.DecoderExtension { + return jsoniter.DecoderExtension{ + reflect2.DefaultTypeOfKind(reflect.String): &nullableFuzzyStringDecoder{}, + reflect2.DefaultTypeOfKind(reflect.Bool): &fuzzyBoolDecoder{}, + reflect2.DefaultTypeOfKind(reflect.Float32): &nullableFuzzyFloat32Decoder{}, + reflect2.DefaultTypeOfKind(reflect.Float64): &nullableFuzzyFloat64Decoder{}, + reflect2.DefaultTypeOfKind(reflect.Int): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(maxInt) || val < float64(minInt) { + iter.ReportError("fuzzy decode int", "exceed range") + return + } + *((*int)(ptr)) = int(val) + } else { + *((*int)(ptr)) = iter.ReadInt() } - *((*int)(ptr)) = int(val) - } else { - *((*int)(ptr)) = iter.ReadInt() - } - }}) - jsoniter.RegisterTypeDecoder("uint", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(maxUint) || val < 0 { - iter.ReportError("fuzzy decode uint", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Uint): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(maxUint) || val < 0 { + iter.ReportError("fuzzy decode uint", "exceed range") + return + } + *((*uint)(ptr)) = uint(val) + } else { + *((*uint)(ptr)) = iter.ReadUint() } - *((*uint)(ptr)) = uint(val) - } else { - *((*uint)(ptr)) = iter.ReadUint() - } - }}) - jsoniter.RegisterTypeDecoder("int8", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(math.MaxInt8) || val < float64(math.MinInt8) { - iter.ReportError("fuzzy decode int8", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Int8): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxInt8) || val < float64(math.MinInt8) { + iter.ReportError("fuzzy decode int8", "exceed range") + return + } + *((*int8)(ptr)) = int8(val) + } else { + *((*int8)(ptr)) = iter.ReadInt8() } - *((*int8)(ptr)) = int8(val) - } else { - *((*int8)(ptr)) = iter.ReadInt8() - } - }}) - jsoniter.RegisterTypeDecoder("uint8", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(math.MaxUint8) || val < 0 { - iter.ReportError("fuzzy decode uint8", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Uint8): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxUint8) || val < 0 { + iter.ReportError("fuzzy decode uint8", "exceed range") + return + } + *((*uint8)(ptr)) = uint8(val) + } else { + *((*uint8)(ptr)) = iter.ReadUint8() } - *((*uint8)(ptr)) = uint8(val) - } else { - *((*uint8)(ptr)) = iter.ReadUint8() - } - }}) - jsoniter.RegisterTypeDecoder("int16", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(math.MaxInt16) || val < float64(math.MinInt16) { - iter.ReportError("fuzzy decode int16", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Int16): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxInt16) || val < float64(math.MinInt16) { + iter.ReportError("fuzzy decode int16", "exceed range") + return + } + *((*int16)(ptr)) = int16(val) + } else { + *((*int16)(ptr)) = iter.ReadInt16() } - *((*int16)(ptr)) = int16(val) - } else { - *((*int16)(ptr)) = iter.ReadInt16() - } - }}) - jsoniter.RegisterTypeDecoder("uint16", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(math.MaxUint16) || val < 0 { - iter.ReportError("fuzzy decode uint16", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Uint16): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxUint16) || val < 0 { + iter.ReportError("fuzzy decode uint16", "exceed range") + return + } + *((*uint16)(ptr)) = uint16(val) + } else { + *((*uint16)(ptr)) = iter.ReadUint16() } - *((*uint16)(ptr)) = uint16(val) - } else { - *((*uint16)(ptr)) = iter.ReadUint16() - } - }}) - jsoniter.RegisterTypeDecoder("int32", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(math.MaxInt32) || val < float64(math.MinInt32) { - iter.ReportError("fuzzy decode int32", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Int32): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxInt32) || val < float64(math.MinInt32) { + iter.ReportError("fuzzy decode int32", "exceed range") + return + } + *((*int32)(ptr)) = int32(val) + } else { + *((*int32)(ptr)) = iter.ReadInt32() } - *((*int32)(ptr)) = int32(val) - } else { - *((*int32)(ptr)) = iter.ReadInt32() - } - }}) - jsoniter.RegisterTypeDecoder("uint32", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(math.MaxUint32) || val < 0 { - iter.ReportError("fuzzy decode uint32", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Uint32): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxUint32) || val < 0 { + iter.ReportError("fuzzy decode uint32", "exceed range") + return + } + *((*uint32)(ptr)) = uint32(val) + } else { + *((*uint32)(ptr)) = iter.ReadUint32() } - *((*uint32)(ptr)) = uint32(val) - } else { - *((*uint32)(ptr)) = iter.ReadUint32() - } - }}) - jsoniter.RegisterTypeDecoder("int64", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(math.MaxInt64) || val < float64(math.MinInt64) { - iter.ReportError("fuzzy decode int64", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Int64): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxInt64) || val < float64(math.MinInt64) { + iter.ReportError("fuzzy decode int64", "exceed range") + return + } + *((*int64)(ptr)) = int64(val) + } else { + *((*int64)(ptr)) = iter.ReadInt64() } - *((*int64)(ptr)) = int64(val) - } else { - *((*int64)(ptr)) = iter.ReadInt64() - } - }}) - jsoniter.RegisterTypeDecoder("uint64", &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { - if isFloat { - val := iter.ReadFloat64() - if val > float64(math.MaxUint64) || val < 0 { - iter.ReportError("fuzzy decode uint64", "exceed range") - return + }}, + reflect2.DefaultTypeOfKind(reflect.Uint64): &nullableFuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxUint64) || val < 0 { + iter.ReportError("fuzzy decode uint64", "exceed range") + return + } + *((*uint64)(ptr)) = uint64(val) + } else { + *((*uint64)(ptr)) = iter.ReadUint64() } - *((*uint64)(ptr)) = uint64(val) - } else { - *((*uint64)(ptr)) = iter.ReadUint64() - } - }}) + }}, + } } type nullableFuzzyStringDecoder struct { diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses/response.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses/response.go index dd6ae5b4c..53a156b71 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses/response.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses/response.go @@ -23,7 +23,6 @@ import ( "strings" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/errors" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/utils" ) type AcsResponse interface { @@ -36,11 +35,6 @@ type AcsResponse interface { parseFromHttpResponse(httpResponse *http.Response) error } -var debug utils.Debug - -func init() { - debug = utils.Init("sdk") -} // Unmarshal object from http response body to target Response func Unmarshal(response AcsResponse, httpResponse *http.Response, format string) (err error) { err = response.parseFromHttpResponse(httpResponse) @@ -62,7 +56,6 @@ func Unmarshal(response AcsResponse, httpResponse *http.Response, format string) } if strings.ToUpper(format) == "JSON" { - initJsonParserOnce() err = jsonParser.Unmarshal(response.GetHttpContentBytes(), response) if err != nil { err = errors.NewClientError(errors.JsonUnmarshalErrorCode, errors.JsonUnmarshalErrorMessage, err) @@ -115,7 +108,6 @@ func (baseResponse *BaseResponse) parseFromHttpResponse(httpResponse *http.Respo if err != nil { return } - debug("%s", string(body)) baseResponse.httpStatus = httpResponse.StatusCode baseResponse.httpHeaders = httpResponse.Header baseResponse.httpContentBytes = body diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/utils/utils.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/utils/utils.go index 378e50106..f8a3ad384 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/utils/utils.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/sdk/utils/utils.go @@ -16,22 +16,35 @@ package utils import ( "crypto/md5" + "crypto/rand" "encoding/base64" "encoding/hex" + "hash" + rand2 "math/rand" "net/url" "reflect" "strconv" "time" - - "github.com/satori/go.uuid" ) -func GetUUIDV4() (uuidHex string) { - uuidV4 := uuid.NewV4() - uuidHex = hex.EncodeToString(uuidV4.Bytes()) +type UUID [16]byte + +const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + +func GetUUID() (uuidHex string) { + uuid := NewUUID() + uuidHex = hex.EncodeToString(uuid[:]) return } +func RandStringBytes(n int) string { + b := make([]byte, n) + for i := range b { + b[i] = letterBytes[rand2.Intn(len(letterBytes))] + } + return string(b) +} + func GetMD5Base64(bytes []byte) (base64Value string) { md5Ctx := md5.New() md5Ctx.Write(bytes) @@ -85,3 +98,44 @@ func InitStructWithDefaultTag(bean interface{}) { } } } + +func NewUUID() UUID { + ns := UUID{} + safeRandom(ns[:]) + u := newFromHash(md5.New(), ns, RandStringBytes(16)) + u[6] = (u[6] & 0x0f) | (byte(2) << 4) + u[8] = (u[8]&(0xff>>2) | (0x02 << 6)) + + return u +} + +func newFromHash(h hash.Hash, ns UUID, name string) UUID { + u := UUID{} + h.Write(ns[:]) + h.Write([]byte(name)) + copy(u[:], h.Sum(nil)) + + return u +} + +func safeRandom(dest []byte) { + if _, err := rand.Read(dest); err != nil { + panic(err) + } +} + +func (u UUID) String() string { + buf := make([]byte, 36) + + hex.Encode(buf[0:8], u[0:4]) + buf[8] = '-' + hex.Encode(buf[9:13], u[4:6]) + buf[13] = '-' + hex.Encode(buf[14:18], u[6:8]) + buf[18] = '-' + hex.Encode(buf[19:23], u[8:10]) + buf[23] = '-' + hex.Encode(buf[24:], u[10:]) + + return string(buf) +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/accept_inquired_system_event.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/accept_inquired_system_event.go index 5bcd8d0ee..9fbc03d2f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/accept_inquired_system_event.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/accept_inquired_system_event.go @@ -21,7 +21,6 @@ import ( ) // AcceptInquiredSystemEvent invokes the ecs.AcceptInquiredSystemEvent API synchronously -// api document: https://help.aliyun.com/api/ecs/acceptinquiredsystemevent.html func (client *Client) AcceptInquiredSystemEvent(request *AcceptInquiredSystemEventRequest) (response *AcceptInquiredSystemEventResponse, err error) { response = CreateAcceptInquiredSystemEventResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AcceptInquiredSystemEvent(request *AcceptInquiredSystemEve } // AcceptInquiredSystemEventWithChan invokes the ecs.AcceptInquiredSystemEvent API asynchronously -// api document: https://help.aliyun.com/api/ecs/acceptinquiredsystemevent.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AcceptInquiredSystemEventWithChan(request *AcceptInquiredSystemEventRequest) (<-chan *AcceptInquiredSystemEventResponse, <-chan error) { responseChan := make(chan *AcceptInquiredSystemEventResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AcceptInquiredSystemEventWithChan(request *AcceptInquiredS } // AcceptInquiredSystemEventWithCallback invokes the ecs.AcceptInquiredSystemEvent API asynchronously -// api document: https://help.aliyun.com/api/ecs/acceptinquiredsystemevent.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AcceptInquiredSystemEventWithCallback(request *AcceptInquiredSystemEventRequest, callback func(response *AcceptInquiredSystemEventResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateAcceptInquiredSystemEventRequest() (request *AcceptInquiredSystemEven RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AcceptInquiredSystemEvent", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/activate_router_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/activate_router_interface.go index 31e54c500..f0e19e62b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/activate_router_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/activate_router_interface.go @@ -21,7 +21,6 @@ import ( ) // ActivateRouterInterface invokes the ecs.ActivateRouterInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/activaterouterinterface.html func (client *Client) ActivateRouterInterface(request *ActivateRouterInterfaceRequest) (response *ActivateRouterInterfaceResponse, err error) { response = CreateActivateRouterInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ActivateRouterInterface(request *ActivateRouterInterfaceRe } // ActivateRouterInterfaceWithChan invokes the ecs.ActivateRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/activaterouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ActivateRouterInterfaceWithChan(request *ActivateRouterInterfaceRequest) (<-chan *ActivateRouterInterfaceResponse, <-chan error) { responseChan := make(chan *ActivateRouterInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ActivateRouterInterfaceWithChan(request *ActivateRouterInt } // ActivateRouterInterfaceWithCallback invokes the ecs.ActivateRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/activaterouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ActivateRouterInterfaceWithCallback(request *ActivateRouterInterfaceRequest, callback func(response *ActivateRouterInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -94,6 +89,7 @@ func CreateActivateRouterInterfaceRequest() (request *ActivateRouterInterfaceReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ActivateRouterInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/add_bandwidth_package_ips.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/add_bandwidth_package_ips.go index f8ed2b008..640e8163a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/add_bandwidth_package_ips.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/add_bandwidth_package_ips.go @@ -21,7 +21,6 @@ import ( ) // AddBandwidthPackageIps invokes the ecs.AddBandwidthPackageIps API synchronously -// api document: https://help.aliyun.com/api/ecs/addbandwidthpackageips.html func (client *Client) AddBandwidthPackageIps(request *AddBandwidthPackageIpsRequest) (response *AddBandwidthPackageIpsResponse, err error) { response = CreateAddBandwidthPackageIpsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AddBandwidthPackageIps(request *AddBandwidthPackageIpsRequ } // AddBandwidthPackageIpsWithChan invokes the ecs.AddBandwidthPackageIps API asynchronously -// api document: https://help.aliyun.com/api/ecs/addbandwidthpackageips.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AddBandwidthPackageIpsWithChan(request *AddBandwidthPackageIpsRequest) (<-chan *AddBandwidthPackageIpsResponse, <-chan error) { responseChan := make(chan *AddBandwidthPackageIpsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AddBandwidthPackageIpsWithChan(request *AddBandwidthPackag } // AddBandwidthPackageIpsWithCallback invokes the ecs.AddBandwidthPackageIps API asynchronously -// api document: https://help.aliyun.com/api/ecs/addbandwidthpackageips.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AddBandwidthPackageIpsWithCallback(request *AddBandwidthPackageIpsRequest, callback func(response *AddBandwidthPackageIpsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) AddBandwidthPackageIpsWithCallback(request *AddBandwidthPa type AddBandwidthPackageIpsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` BandwidthPackageId string `position:"Query" name:"BandwidthPackageId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ClientToken string `position:"Query" name:"ClientToken"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` IpCount string `position:"Query" name:"IpCount"` @@ -97,6 +92,7 @@ func CreateAddBandwidthPackageIpsRequest() (request *AddBandwidthPackageIpsReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AddBandwidthPackageIps", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/add_tags.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/add_tags.go index 4a3ea0243..3400d23e4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/add_tags.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/add_tags.go @@ -21,7 +21,6 @@ import ( ) // AddTags invokes the ecs.AddTags API synchronously -// api document: https://help.aliyun.com/api/ecs/addtags.html func (client *Client) AddTags(request *AddTagsRequest) (response *AddTagsResponse, err error) { response = CreateAddTagsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AddTags(request *AddTagsRequest) (response *AddTagsRespons } // AddTagsWithChan invokes the ecs.AddTags API asynchronously -// api document: https://help.aliyun.com/api/ecs/addtags.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AddTagsWithChan(request *AddTagsRequest) (<-chan *AddTagsResponse, <-chan error) { responseChan := make(chan *AddTagsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AddTagsWithChan(request *AddTagsRequest) (<-chan *AddTagsR } // AddTagsWithCallback invokes the ecs.AddTags API asynchronously -// api document: https://help.aliyun.com/api/ecs/addtags.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AddTagsWithCallback(request *AddTagsRequest, callback func(response *AddTagsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) AddTagsWithCallback(request *AddTagsRequest, callback func type AddTagsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Tag *[]AddTagsTag `position:"Query" name:"Tag" type:"Repeated"` ResourceId string `position:"Query" name:"ResourceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - Tag *[]AddTagsTag `position:"Query" name:"Tag" type:"Repeated"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` ResourceType string `position:"Query" name:"ResourceType"` } @@ -102,6 +97,7 @@ func CreateAddTagsRequest() (request *AddTagsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AddTags", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_dedicated_hosts.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_dedicated_hosts.go index 4a8de37dc..234615d6d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_dedicated_hosts.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_dedicated_hosts.go @@ -21,7 +21,6 @@ import ( ) // AllocateDedicatedHosts invokes the ecs.AllocateDedicatedHosts API synchronously -// api document: https://help.aliyun.com/api/ecs/allocatededicatedhosts.html func (client *Client) AllocateDedicatedHosts(request *AllocateDedicatedHostsRequest) (response *AllocateDedicatedHostsResponse, err error) { response = CreateAllocateDedicatedHostsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AllocateDedicatedHosts(request *AllocateDedicatedHostsRequ } // AllocateDedicatedHostsWithChan invokes the ecs.AllocateDedicatedHosts API asynchronously -// api document: https://help.aliyun.com/api/ecs/allocatededicatedhosts.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AllocateDedicatedHostsWithChan(request *AllocateDedicatedHostsRequest) (<-chan *AllocateDedicatedHostsResponse, <-chan error) { responseChan := make(chan *AllocateDedicatedHostsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AllocateDedicatedHostsWithChan(request *AllocateDedicatedH } // AllocateDedicatedHostsWithCallback invokes the ecs.AllocateDedicatedHosts API asynchronously -// api document: https://help.aliyun.com/api/ecs/allocatededicatedhosts.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AllocateDedicatedHostsWithCallback(request *AllocateDedicatedHostsRequest, callback func(response *AllocateDedicatedHostsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -79,8 +74,11 @@ type AllocateDedicatedHostsRequest struct { ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ClientToken string `position:"Query" name:"ClientToken"` Description string `position:"Query" name:"Description"` + CpuOverCommitRatio requests.Float `position:"Query" name:"CpuOverCommitRatio"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + MinQuantity requests.Integer `position:"Query" name:"MinQuantity"` ActionOnMaintenance string `position:"Query" name:"ActionOnMaintenance"` + DedicatedHostClusterId string `position:"Query" name:"DedicatedHostClusterId"` Tag *[]AllocateDedicatedHostsTag `position:"Query" name:"Tag" type:"Repeated"` DedicatedHostType string `position:"Query" name:"DedicatedHostType"` AutoRenewPeriod requests.Integer `position:"Query" name:"AutoRenewPeriod"` @@ -95,6 +93,7 @@ type AllocateDedicatedHostsRequest struct { AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` NetworkAttributesSlbUdpTimeout requests.Integer `position:"Query" name:"NetworkAttributes.SlbUdpTimeout"` ZoneId string `position:"Query" name:"ZoneId"` + AutoPlacement string `position:"Query" name:"AutoPlacement"` ChargeType string `position:"Query" name:"ChargeType"` NetworkAttributesUdpTimeout requests.Integer `position:"Query" name:"NetworkAttributes.UdpTimeout"` } @@ -118,6 +117,7 @@ func CreateAllocateDedicatedHostsRequest() (request *AllocateDedicatedHostsReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AllocateDedicatedHosts", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_eip_address.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_eip_address.go index 2cc3f4174..f314c1e91 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_eip_address.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_eip_address.go @@ -21,7 +21,6 @@ import ( ) // AllocateEipAddress invokes the ecs.AllocateEipAddress API synchronously -// api document: https://help.aliyun.com/api/ecs/allocateeipaddress.html func (client *Client) AllocateEipAddress(request *AllocateEipAddressRequest) (response *AllocateEipAddressResponse, err error) { response = CreateAllocateEipAddressResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AllocateEipAddress(request *AllocateEipAddressRequest) (re } // AllocateEipAddressWithChan invokes the ecs.AllocateEipAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/allocateeipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AllocateEipAddressWithChan(request *AllocateEipAddressRequest) (<-chan *AllocateEipAddressResponse, <-chan error) { responseChan := make(chan *AllocateEipAddressResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AllocateEipAddressWithChan(request *AllocateEipAddressRequ } // AllocateEipAddressWithCallback invokes the ecs.AllocateEipAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/allocateeipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AllocateEipAddressWithCallback(request *AllocateEipAddressRequest, callback func(response *AllocateEipAddressResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,14 @@ func (client *Client) AllocateEipAddressWithCallback(request *AllocateEipAddress type AllocateEipAddressRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + ISP string `position:"Query" name:"ISP"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` Bandwidth string `position:"Query" name:"Bandwidth"` - ClientToken string `position:"Query" name:"ClientToken"` - InternetChargeType string `position:"Query" name:"InternetChargeType"` - ISP string `position:"Query" name:"ISP"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ActivityId requests.Integer `position:"Query" name:"ActivityId"` + InternetChargeType string `position:"Query" name:"InternetChargeType"` } // AllocateEipAddressResponse is the response struct for api AllocateEipAddress @@ -100,6 +96,7 @@ func CreateAllocateEipAddressRequest() (request *AllocateEipAddressRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AllocateEipAddress", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_public_ip_address.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_public_ip_address.go index 0e6f34e23..1db2a15b6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_public_ip_address.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/allocate_public_ip_address.go @@ -21,7 +21,6 @@ import ( ) // AllocatePublicIpAddress invokes the ecs.AllocatePublicIpAddress API synchronously -// api document: https://help.aliyun.com/api/ecs/allocatepublicipaddress.html func (client *Client) AllocatePublicIpAddress(request *AllocatePublicIpAddressRequest) (response *AllocatePublicIpAddressResponse, err error) { response = CreateAllocatePublicIpAddressResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AllocatePublicIpAddress(request *AllocatePublicIpAddressRe } // AllocatePublicIpAddressWithChan invokes the ecs.AllocatePublicIpAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/allocatepublicipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AllocatePublicIpAddressWithChan(request *AllocatePublicIpAddressRequest) (<-chan *AllocatePublicIpAddressResponse, <-chan error) { responseChan := make(chan *AllocatePublicIpAddressResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AllocatePublicIpAddressWithChan(request *AllocatePublicIpA } // AllocatePublicIpAddressWithCallback invokes the ecs.AllocatePublicIpAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/allocatepublicipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AllocatePublicIpAddressWithCallback(request *AllocatePublicIpAddressRequest, callback func(response *AllocatePublicIpAddressResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,11 +73,11 @@ type AllocatePublicIpAddressRequest struct { *requests.RpcRequest IpAddress string `position:"Query" name:"IpAddress"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` VlanId string `position:"Query" name:"VlanId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // AllocatePublicIpAddressResponse is the response struct for api AllocatePublicIpAddress @@ -98,6 +93,7 @@ func CreateAllocatePublicIpAddressRequest() (request *AllocatePublicIpAddressReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AllocatePublicIpAddress", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/apply_auto_snapshot_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/apply_auto_snapshot_policy.go index ab2af4b9f..60c8d816c 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/apply_auto_snapshot_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/apply_auto_snapshot_policy.go @@ -21,7 +21,6 @@ import ( ) // ApplyAutoSnapshotPolicy invokes the ecs.ApplyAutoSnapshotPolicy API synchronously -// api document: https://help.aliyun.com/api/ecs/applyautosnapshotpolicy.html func (client *Client) ApplyAutoSnapshotPolicy(request *ApplyAutoSnapshotPolicyRequest) (response *ApplyAutoSnapshotPolicyResponse, err error) { response = CreateApplyAutoSnapshotPolicyResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ApplyAutoSnapshotPolicy(request *ApplyAutoSnapshotPolicyRe } // ApplyAutoSnapshotPolicyWithChan invokes the ecs.ApplyAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/applyautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ApplyAutoSnapshotPolicyWithChan(request *ApplyAutoSnapshotPolicyRequest) (<-chan *ApplyAutoSnapshotPolicyResponse, <-chan error) { responseChan := make(chan *ApplyAutoSnapshotPolicyResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ApplyAutoSnapshotPolicyWithChan(request *ApplyAutoSnapshot } // ApplyAutoSnapshotPolicyWithCallback invokes the ecs.ApplyAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/applyautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ApplyAutoSnapshotPolicyWithCallback(request *ApplyAutoSnapshotPolicyRequest, callback func(response *ApplyAutoSnapshotPolicyResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) ApplyAutoSnapshotPolicyWithCallback(request *ApplyAutoSnap type ApplyAutoSnapshotPolicyRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` AutoSnapshotPolicyId string `position:"Query" name:"autoSnapshotPolicyId"` DiskIds string `position:"Query" name:"diskIds"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -95,6 +90,7 @@ func CreateApplyAutoSnapshotPolicyRequest() (request *ApplyAutoSnapshotPolicyReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ApplyAutoSnapshotPolicy", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/assign_ipv6_addresses.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/assign_ipv6_addresses.go index 927cad5fd..748dd4f53 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/assign_ipv6_addresses.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/assign_ipv6_addresses.go @@ -21,7 +21,6 @@ import ( ) // AssignIpv6Addresses invokes the ecs.AssignIpv6Addresses API synchronously -// api document: https://help.aliyun.com/api/ecs/assignipv6addresses.html func (client *Client) AssignIpv6Addresses(request *AssignIpv6AddressesRequest) (response *AssignIpv6AddressesResponse, err error) { response = CreateAssignIpv6AddressesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AssignIpv6Addresses(request *AssignIpv6AddressesRequest) ( } // AssignIpv6AddressesWithChan invokes the ecs.AssignIpv6Addresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/assignipv6addresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AssignIpv6AddressesWithChan(request *AssignIpv6AddressesRequest) (<-chan *AssignIpv6AddressesResponse, <-chan error) { responseChan := make(chan *AssignIpv6AddressesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AssignIpv6AddressesWithChan(request *AssignIpv6AddressesRe } // AssignIpv6AddressesWithCallback invokes the ecs.AssignIpv6Addresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/assignipv6addresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AssignIpv6AddressesWithCallback(request *AssignIpv6AddressesRequest, callback func(response *AssignIpv6AddressesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -97,6 +92,7 @@ func CreateAssignIpv6AddressesRequest() (request *AssignIpv6AddressesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AssignIpv6Addresses", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/assign_private_ip_addresses.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/assign_private_ip_addresses.go index b26f7eeca..a796779e0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/assign_private_ip_addresses.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/assign_private_ip_addresses.go @@ -21,7 +21,6 @@ import ( ) // AssignPrivateIpAddresses invokes the ecs.AssignPrivateIpAddresses API synchronously -// api document: https://help.aliyun.com/api/ecs/assignprivateipaddresses.html func (client *Client) AssignPrivateIpAddresses(request *AssignPrivateIpAddressesRequest) (response *AssignPrivateIpAddressesResponse, err error) { response = CreateAssignPrivateIpAddressesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AssignPrivateIpAddresses(request *AssignPrivateIpAddresses } // AssignPrivateIpAddressesWithChan invokes the ecs.AssignPrivateIpAddresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/assignprivateipaddresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AssignPrivateIpAddressesWithChan(request *AssignPrivateIpAddressesRequest) (<-chan *AssignPrivateIpAddressesResponse, <-chan error) { responseChan := make(chan *AssignPrivateIpAddressesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AssignPrivateIpAddressesWithChan(request *AssignPrivateIpA } // AssignPrivateIpAddressesWithCallback invokes the ecs.AssignPrivateIpAddresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/assignprivateipaddresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AssignPrivateIpAddressesWithCallback(request *AssignPrivateIpAddressesRequest, callback func(response *AssignPrivateIpAddressesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,6 +72,7 @@ func (client *Client) AssignPrivateIpAddressesWithCallback(request *AssignPrivat type AssignPrivateIpAddressesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` SecondaryPrivateIpAddressCount requests.Integer `position:"Query" name:"SecondaryPrivateIpAddressCount"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` @@ -88,7 +84,8 @@ type AssignPrivateIpAddressesRequest struct { // AssignPrivateIpAddressesResponse is the response struct for api AssignPrivateIpAddresses type AssignPrivateIpAddressesResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` + RequestId string `json:"RequestId" xml:"RequestId"` + AssignedPrivateIpAddressesSet AssignedPrivateIpAddressesSet `json:"AssignedPrivateIpAddressesSet" xml:"AssignedPrivateIpAddressesSet"` } // CreateAssignPrivateIpAddressesRequest creates a request to invoke AssignPrivateIpAddresses API @@ -97,6 +94,7 @@ func CreateAssignPrivateIpAddressesRequest() (request *AssignPrivateIpAddressesR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AssignPrivateIpAddresses", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/associate_eip_address.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/associate_eip_address.go index cf7e9978f..f30fd2e7a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/associate_eip_address.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/associate_eip_address.go @@ -21,7 +21,6 @@ import ( ) // AssociateEipAddress invokes the ecs.AssociateEipAddress API synchronously -// api document: https://help.aliyun.com/api/ecs/associateeipaddress.html func (client *Client) AssociateEipAddress(request *AssociateEipAddressRequest) (response *AssociateEipAddressResponse, err error) { response = CreateAssociateEipAddressResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AssociateEipAddress(request *AssociateEipAddressRequest) ( } // AssociateEipAddressWithChan invokes the ecs.AssociateEipAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/associateeipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AssociateEipAddressWithChan(request *AssociateEipAddressRequest) (<-chan *AssociateEipAddressResponse, <-chan error) { responseChan := make(chan *AssociateEipAddressResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AssociateEipAddressWithChan(request *AssociateEipAddressRe } // AssociateEipAddressWithCallback invokes the ecs.AssociateEipAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/associateeipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AssociateEipAddressWithCallback(request *AssociateEipAddressRequest, callback func(response *AssociateEipAddressResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) AssociateEipAddressWithCallback(request *AssociateEipAddre type AssociateEipAddressRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + AllocationId string `position:"Query" name:"AllocationId"` + InstanceType string `position:"Query" name:"InstanceType"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - InstanceType string `position:"Query" name:"InstanceType"` - AllocationId string `position:"Query" name:"AllocationId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // AssociateEipAddressResponse is the response struct for api AssociateEipAddress @@ -97,6 +92,7 @@ func CreateAssociateEipAddressRequest() (request *AssociateEipAddressRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AssociateEipAddress", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/associate_ha_vip.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/associate_ha_vip.go index b153aa8c5..71abdbd58 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/associate_ha_vip.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/associate_ha_vip.go @@ -21,7 +21,6 @@ import ( ) // AssociateHaVip invokes the ecs.AssociateHaVip API synchronously -// api document: https://help.aliyun.com/api/ecs/associatehavip.html func (client *Client) AssociateHaVip(request *AssociateHaVipRequest) (response *AssociateHaVipResponse, err error) { response = CreateAssociateHaVipResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AssociateHaVip(request *AssociateHaVipRequest) (response * } // AssociateHaVipWithChan invokes the ecs.AssociateHaVip API asynchronously -// api document: https://help.aliyun.com/api/ecs/associatehavip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AssociateHaVipWithChan(request *AssociateHaVipRequest) (<-chan *AssociateHaVipResponse, <-chan error) { responseChan := make(chan *AssociateHaVipResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AssociateHaVipWithChan(request *AssociateHaVipRequest) (<- } // AssociateHaVipWithCallback invokes the ecs.AssociateHaVip API asynchronously -// api document: https://help.aliyun.com/api/ecs/associatehavip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AssociateHaVipWithCallback(request *AssociateHaVipRequest, callback func(response *AssociateHaVipResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,13 +71,13 @@ func (client *Client) AssociateHaVipWithCallback(request *AssociateHaVipRequest, // AssociateHaVipRequest is the request struct for api AssociateHaVip type AssociateHaVipRequest struct { *requests.RpcRequest - HaVipId string `position:"Query" name:"HaVipId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` + HaVipId string `position:"Query" name:"HaVipId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // AssociateHaVipResponse is the response struct for api AssociateHaVip @@ -97,6 +92,7 @@ func CreateAssociateHaVipRequest() (request *AssociateHaVipRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AssociateHaVip", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_classic_link_vpc.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_classic_link_vpc.go index d07a41575..6797d497a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_classic_link_vpc.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_classic_link_vpc.go @@ -21,7 +21,6 @@ import ( ) // AttachClassicLinkVpc invokes the ecs.AttachClassicLinkVpc API synchronously -// api document: https://help.aliyun.com/api/ecs/attachclassiclinkvpc.html func (client *Client) AttachClassicLinkVpc(request *AttachClassicLinkVpcRequest) (response *AttachClassicLinkVpcResponse, err error) { response = CreateAttachClassicLinkVpcResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AttachClassicLinkVpc(request *AttachClassicLinkVpcRequest) } // AttachClassicLinkVpcWithChan invokes the ecs.AttachClassicLinkVpc API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachclassiclinkvpc.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachClassicLinkVpcWithChan(request *AttachClassicLinkVpcRequest) (<-chan *AttachClassicLinkVpcResponse, <-chan error) { responseChan := make(chan *AttachClassicLinkVpcResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AttachClassicLinkVpcWithChan(request *AttachClassicLinkVpc } // AttachClassicLinkVpcWithCallback invokes the ecs.AttachClassicLinkVpc API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachclassiclinkvpc.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachClassicLinkVpcWithCallback(request *AttachClassicLinkVpcRequest, callback func(response *AttachClassicLinkVpcResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) AttachClassicLinkVpcWithCallback(request *AttachClassicLin type AttachClassicLinkVpcRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - VpcId string `position:"Query" name:"VpcId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + VpcId string `position:"Query" name:"VpcId"` } // AttachClassicLinkVpcResponse is the response struct for api AttachClassicLinkVpc @@ -95,6 +90,7 @@ func CreateAttachClassicLinkVpcRequest() (request *AttachClassicLinkVpcRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AttachClassicLinkVpc", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_disk.go index 452f73f27..7a37bc2ea 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_disk.go @@ -21,7 +21,6 @@ import ( ) // AttachDisk invokes the ecs.AttachDisk API synchronously -// api document: https://help.aliyun.com/api/ecs/attachdisk.html func (client *Client) AttachDisk(request *AttachDiskRequest) (response *AttachDiskResponse, err error) { response = CreateAttachDiskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AttachDisk(request *AttachDiskRequest) (response *AttachDi } // AttachDiskWithChan invokes the ecs.AttachDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachDiskWithChan(request *AttachDiskRequest) (<-chan *AttachDiskResponse, <-chan error) { responseChan := make(chan *AttachDiskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AttachDiskWithChan(request *AttachDiskRequest) (<-chan *At } // AttachDiskWithCallback invokes the ecs.AttachDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachDiskWithCallback(request *AttachDiskRequest, callback func(response *AttachDiskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,16 @@ func (client *Client) AttachDiskWithCallback(request *AttachDiskRequest, callbac type AttachDiskRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + KeyPairName string `position:"Query" name:"KeyPairName"` + Bootable requests.Boolean `position:"Query" name:"Bootable"` + Password string `position:"Query" name:"Password"` + DiskId string `position:"Query" name:"DiskId"` + DeleteWithInstance requests.Boolean `position:"Query" name:"DeleteWithInstance"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - DiskId string `position:"Query" name:"DiskId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` Device string `position:"Query" name:"Device"` - DeleteWithInstance requests.Boolean `position:"Query" name:"DeleteWithInstance"` } // AttachDiskResponse is the response struct for api AttachDisk @@ -98,6 +96,7 @@ func CreateAttachDiskRequest() (request *AttachDiskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AttachDisk", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_instance_ram_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_instance_ram_role.go index 7a697f522..a5645b959 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_instance_ram_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_instance_ram_role.go @@ -21,7 +21,6 @@ import ( ) // AttachInstanceRamRole invokes the ecs.AttachInstanceRamRole API synchronously -// api document: https://help.aliyun.com/api/ecs/attachinstanceramrole.html func (client *Client) AttachInstanceRamRole(request *AttachInstanceRamRoleRequest) (response *AttachInstanceRamRoleResponse, err error) { response = CreateAttachInstanceRamRoleResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AttachInstanceRamRole(request *AttachInstanceRamRoleReques } // AttachInstanceRamRoleWithChan invokes the ecs.AttachInstanceRamRole API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachinstanceramrole.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachInstanceRamRoleWithChan(request *AttachInstanceRamRoleRequest) (<-chan *AttachInstanceRamRoleResponse, <-chan error) { responseChan := make(chan *AttachInstanceRamRoleResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AttachInstanceRamRoleWithChan(request *AttachInstanceRamRo } // AttachInstanceRamRoleWithCallback invokes the ecs.AttachInstanceRamRole API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachinstanceramrole.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachInstanceRamRoleWithCallback(request *AttachInstanceRamRoleRequest, callback func(response *AttachInstanceRamRoleResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,11 @@ func (client *Client) AttachInstanceRamRoleWithCallback(request *AttachInstanceR type AttachInstanceRamRoleRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Policy string `position:"Query" name:"Policy"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - InstanceIds string `position:"Query" name:"InstanceIds"` RamRoleName string `position:"Query" name:"RamRoleName"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceIds string `position:"Query" name:"InstanceIds"` } // AttachInstanceRamRoleResponse is the response struct for api AttachInstanceRamRole @@ -99,6 +95,7 @@ func CreateAttachInstanceRamRoleRequest() (request *AttachInstanceRamRoleRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AttachInstanceRamRole", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_key_pair.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_key_pair.go index 275410fbb..cca0c903b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_key_pair.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_key_pair.go @@ -21,7 +21,6 @@ import ( ) // AttachKeyPair invokes the ecs.AttachKeyPair API synchronously -// api document: https://help.aliyun.com/api/ecs/attachkeypair.html func (client *Client) AttachKeyPair(request *AttachKeyPairRequest) (response *AttachKeyPairResponse, err error) { response = CreateAttachKeyPairResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AttachKeyPair(request *AttachKeyPairRequest) (response *At } // AttachKeyPairWithChan invokes the ecs.AttachKeyPair API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachkeypair.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachKeyPairWithChan(request *AttachKeyPairRequest) (<-chan *AttachKeyPairResponse, <-chan error) { responseChan := make(chan *AttachKeyPairResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AttachKeyPairWithChan(request *AttachKeyPairRequest) (<-ch } // AttachKeyPairWithCallback invokes the ecs.AttachKeyPair API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachkeypair.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachKeyPairWithCallback(request *AttachKeyPairRequest, callback func(response *AttachKeyPairResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) AttachKeyPairWithCallback(request *AttachKeyPairRequest, c type AttachKeyPairRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - InstanceIds string `position:"Query" name:"InstanceIds"` KeyPairName string `position:"Query" name:"KeyPairName"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceIds string `position:"Query" name:"InstanceIds"` } // AttachKeyPairResponse is the response struct for api AttachKeyPair @@ -99,6 +94,7 @@ func CreateAttachKeyPairRequest() (request *AttachKeyPairRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AttachKeyPair", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_network_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_network_interface.go index a65ec4e76..137585f78 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_network_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/attach_network_interface.go @@ -21,7 +21,6 @@ import ( ) // AttachNetworkInterface invokes the ecs.AttachNetworkInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/attachnetworkinterface.html func (client *Client) AttachNetworkInterface(request *AttachNetworkInterfaceRequest) (response *AttachNetworkInterfaceResponse, err error) { response = CreateAttachNetworkInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AttachNetworkInterface(request *AttachNetworkInterfaceRequ } // AttachNetworkInterfaceWithChan invokes the ecs.AttachNetworkInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachnetworkinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachNetworkInterfaceWithChan(request *AttachNetworkInterfaceRequest) (<-chan *AttachNetworkInterfaceResponse, <-chan error) { responseChan := make(chan *AttachNetworkInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AttachNetworkInterfaceWithChan(request *AttachNetworkInter } // AttachNetworkInterfaceWithCallback invokes the ecs.AttachNetworkInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/attachnetworkinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AttachNetworkInterfaceWithCallback(request *AttachNetworkInterfaceRequest, callback func(response *AttachNetworkInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,12 +71,14 @@ func (client *Client) AttachNetworkInterfaceWithCallback(request *AttachNetworkI // AttachNetworkInterfaceRequest is the request struct for api AttachNetworkInterface type AttachNetworkInterfaceRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + TrunkNetworkInstanceId string `position:"Query" name:"TrunkNetworkInstanceId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + WaitForNetworkConfigurationReady requests.Boolean `position:"Query" name:"WaitForNetworkConfigurationReady"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` } // AttachNetworkInterfaceResponse is the response struct for api AttachNetworkInterface @@ -96,6 +93,7 @@ func CreateAttachNetworkInterfaceRequest() (request *AttachNetworkInterfaceReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AttachNetworkInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/authorize_security_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/authorize_security_group.go index b1d7269b9..090660101 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/authorize_security_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/authorize_security_group.go @@ -21,7 +21,6 @@ import ( ) // AuthorizeSecurityGroup invokes the ecs.AuthorizeSecurityGroup API synchronously -// api document: https://help.aliyun.com/api/ecs/authorizesecuritygroup.html func (client *Client) AuthorizeSecurityGroup(request *AuthorizeSecurityGroupRequest) (response *AuthorizeSecurityGroupResponse, err error) { response = CreateAuthorizeSecurityGroupResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AuthorizeSecurityGroup(request *AuthorizeSecurityGroupRequ } // AuthorizeSecurityGroupWithChan invokes the ecs.AuthorizeSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/authorizesecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AuthorizeSecurityGroupWithChan(request *AuthorizeSecurityGroupRequest) (<-chan *AuthorizeSecurityGroupResponse, <-chan error) { responseChan := make(chan *AuthorizeSecurityGroupResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AuthorizeSecurityGroupWithChan(request *AuthorizeSecurityG } // AuthorizeSecurityGroupWithCallback invokes the ecs.AuthorizeSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/authorizesecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AuthorizeSecurityGroupWithCallback(request *AuthorizeSecurityGroupRequest, callback func(response *AuthorizeSecurityGroupResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -110,6 +105,7 @@ func CreateAuthorizeSecurityGroupRequest() (request *AuthorizeSecurityGroupReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AuthorizeSecurityGroup", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/authorize_security_group_egress.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/authorize_security_group_egress.go index 379e0c354..229bf92ec 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/authorize_security_group_egress.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/authorize_security_group_egress.go @@ -21,7 +21,6 @@ import ( ) // AuthorizeSecurityGroupEgress invokes the ecs.AuthorizeSecurityGroupEgress API synchronously -// api document: https://help.aliyun.com/api/ecs/authorizesecuritygroupegress.html func (client *Client) AuthorizeSecurityGroupEgress(request *AuthorizeSecurityGroupEgressRequest) (response *AuthorizeSecurityGroupEgressResponse, err error) { response = CreateAuthorizeSecurityGroupEgressResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) AuthorizeSecurityGroupEgress(request *AuthorizeSecurityGro } // AuthorizeSecurityGroupEgressWithChan invokes the ecs.AuthorizeSecurityGroupEgress API asynchronously -// api document: https://help.aliyun.com/api/ecs/authorizesecuritygroupegress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AuthorizeSecurityGroupEgressWithChan(request *AuthorizeSecurityGroupEgressRequest) (<-chan *AuthorizeSecurityGroupEgressResponse, <-chan error) { responseChan := make(chan *AuthorizeSecurityGroupEgressResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) AuthorizeSecurityGroupEgressWithChan(request *AuthorizeSec } // AuthorizeSecurityGroupEgressWithCallback invokes the ecs.AuthorizeSecurityGroupEgress API asynchronously -// api document: https://help.aliyun.com/api/ecs/authorizesecuritygroupegress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) AuthorizeSecurityGroupEgressWithCallback(request *AuthorizeSecurityGroupEgressRequest, callback func(response *AuthorizeSecurityGroupEgressResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -110,6 +105,7 @@ func CreateAuthorizeSecurityGroupEgressRequest() (request *AuthorizeSecurityGrou RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "AuthorizeSecurityGroupEgress", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_auto_snapshot_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_auto_snapshot_policy.go index 46fa77189..0aa7ce374 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_auto_snapshot_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_auto_snapshot_policy.go @@ -21,7 +21,6 @@ import ( ) // CancelAutoSnapshotPolicy invokes the ecs.CancelAutoSnapshotPolicy API synchronously -// api document: https://help.aliyun.com/api/ecs/cancelautosnapshotpolicy.html func (client *Client) CancelAutoSnapshotPolicy(request *CancelAutoSnapshotPolicyRequest) (response *CancelAutoSnapshotPolicyResponse, err error) { response = CreateCancelAutoSnapshotPolicyResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CancelAutoSnapshotPolicy(request *CancelAutoSnapshotPolicy } // CancelAutoSnapshotPolicyWithChan invokes the ecs.CancelAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/cancelautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelAutoSnapshotPolicyWithChan(request *CancelAutoSnapshotPolicyRequest) (<-chan *CancelAutoSnapshotPolicyResponse, <-chan error) { responseChan := make(chan *CancelAutoSnapshotPolicyResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CancelAutoSnapshotPolicyWithChan(request *CancelAutoSnapsh } // CancelAutoSnapshotPolicyWithCallback invokes the ecs.CancelAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/cancelautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelAutoSnapshotPolicyWithCallback(request *CancelAutoSnapshotPolicyRequest, callback func(response *CancelAutoSnapshotPolicyResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,8 +72,8 @@ func (client *Client) CancelAutoSnapshotPolicyWithCallback(request *CancelAutoSn type CancelAutoSnapshotPolicyRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` DiskIds string `position:"Query" name:"diskIds"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -94,6 +89,7 @@ func CreateCancelAutoSnapshotPolicyRequest() (request *CancelAutoSnapshotPolicyR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CancelAutoSnapshotPolicy", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_copy_image.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_copy_image.go index c00421461..2f3ccd828 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_copy_image.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_copy_image.go @@ -21,7 +21,6 @@ import ( ) // CancelCopyImage invokes the ecs.CancelCopyImage API synchronously -// api document: https://help.aliyun.com/api/ecs/cancelcopyimage.html func (client *Client) CancelCopyImage(request *CancelCopyImageRequest) (response *CancelCopyImageResponse, err error) { response = CreateCancelCopyImageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CancelCopyImage(request *CancelCopyImageRequest) (response } // CancelCopyImageWithChan invokes the ecs.CancelCopyImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/cancelcopyimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelCopyImageWithChan(request *CancelCopyImageRequest) (<-chan *CancelCopyImageResponse, <-chan error) { responseChan := make(chan *CancelCopyImageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CancelCopyImageWithChan(request *CancelCopyImageRequest) ( } // CancelCopyImageWithCallback invokes the ecs.CancelCopyImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/cancelcopyimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelCopyImageWithCallback(request *CancelCopyImageRequest, callback func(response *CancelCopyImageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateCancelCopyImageRequest() (request *CancelCopyImageRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CancelCopyImage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_image_pipeline_execution.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_image_pipeline_execution.go new file mode 100644 index 000000000..eca4700c5 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_image_pipeline_execution.go @@ -0,0 +1,110 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CancelImagePipelineExecution invokes the ecs.CancelImagePipelineExecution API synchronously +func (client *Client) CancelImagePipelineExecution(request *CancelImagePipelineExecutionRequest) (response *CancelImagePipelineExecutionResponse, err error) { + response = CreateCancelImagePipelineExecutionResponse() + err = client.DoAction(request, response) + return +} + +// CancelImagePipelineExecutionWithChan invokes the ecs.CancelImagePipelineExecution API asynchronously +func (client *Client) CancelImagePipelineExecutionWithChan(request *CancelImagePipelineExecutionRequest) (<-chan *CancelImagePipelineExecutionResponse, <-chan error) { + responseChan := make(chan *CancelImagePipelineExecutionResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CancelImagePipelineExecution(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CancelImagePipelineExecutionWithCallback invokes the ecs.CancelImagePipelineExecution API asynchronously +func (client *Client) CancelImagePipelineExecutionWithCallback(request *CancelImagePipelineExecutionRequest, callback func(response *CancelImagePipelineExecutionResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CancelImagePipelineExecutionResponse + var err error + defer close(result) + response, err = client.CancelImagePipelineExecution(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CancelImagePipelineExecutionRequest is the request struct for api CancelImagePipelineExecution +type CancelImagePipelineExecutionRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ExecutionId string `position:"Query" name:"ExecutionId"` + TemplateTag *[]CancelImagePipelineExecutionTemplateTag `position:"Query" name:"TemplateTag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// CancelImagePipelineExecutionTemplateTag is a repeated param struct in CancelImagePipelineExecutionRequest +type CancelImagePipelineExecutionTemplateTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// CancelImagePipelineExecutionResponse is the response struct for api CancelImagePipelineExecution +type CancelImagePipelineExecutionResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateCancelImagePipelineExecutionRequest creates a request to invoke CancelImagePipelineExecution API +func CreateCancelImagePipelineExecutionRequest() (request *CancelImagePipelineExecutionRequest) { + request = &CancelImagePipelineExecutionRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CancelImagePipelineExecution", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCancelImagePipelineExecutionResponse creates a response to parse from CancelImagePipelineExecution response +func CreateCancelImagePipelineExecutionResponse() (response *CancelImagePipelineExecutionResponse) { + response = &CancelImagePipelineExecutionResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_physical_connection.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_physical_connection.go index df2beb5a2..afd7090a4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_physical_connection.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_physical_connection.go @@ -21,7 +21,6 @@ import ( ) // CancelPhysicalConnection invokes the ecs.CancelPhysicalConnection API synchronously -// api document: https://help.aliyun.com/api/ecs/cancelphysicalconnection.html func (client *Client) CancelPhysicalConnection(request *CancelPhysicalConnectionRequest) (response *CancelPhysicalConnectionResponse, err error) { response = CreateCancelPhysicalConnectionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CancelPhysicalConnection(request *CancelPhysicalConnection } // CancelPhysicalConnectionWithChan invokes the ecs.CancelPhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/cancelphysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelPhysicalConnectionWithChan(request *CancelPhysicalConnectionRequest) (<-chan *CancelPhysicalConnectionResponse, <-chan error) { responseChan := make(chan *CancelPhysicalConnectionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CancelPhysicalConnectionWithChan(request *CancelPhysicalCo } // CancelPhysicalConnectionWithCallback invokes the ecs.CancelPhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/cancelphysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelPhysicalConnectionWithCallback(request *CancelPhysicalConnectionRequest, callback func(response *CancelPhysicalConnectionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) CancelPhysicalConnectionWithCallback(request *CancelPhysic type CancelPhysicalConnectionRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` } // CancelPhysicalConnectionResponse is the response struct for api CancelPhysicalConnection @@ -97,6 +92,7 @@ func CreateCancelPhysicalConnectionRequest() (request *CancelPhysicalConnectionR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CancelPhysicalConnection", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_simulated_system_events.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_simulated_system_events.go index b77f86d5c..8613b1eaa 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_simulated_system_events.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_simulated_system_events.go @@ -21,7 +21,6 @@ import ( ) // CancelSimulatedSystemEvents invokes the ecs.CancelSimulatedSystemEvents API synchronously -// api document: https://help.aliyun.com/api/ecs/cancelsimulatedsystemevents.html func (client *Client) CancelSimulatedSystemEvents(request *CancelSimulatedSystemEventsRequest) (response *CancelSimulatedSystemEventsResponse, err error) { response = CreateCancelSimulatedSystemEventsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CancelSimulatedSystemEvents(request *CancelSimulatedSystem } // CancelSimulatedSystemEventsWithChan invokes the ecs.CancelSimulatedSystemEvents API asynchronously -// api document: https://help.aliyun.com/api/ecs/cancelsimulatedsystemevents.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelSimulatedSystemEventsWithChan(request *CancelSimulatedSystemEventsRequest) (<-chan *CancelSimulatedSystemEventsResponse, <-chan error) { responseChan := make(chan *CancelSimulatedSystemEventsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CancelSimulatedSystemEventsWithChan(request *CancelSimulat } // CancelSimulatedSystemEventsWithCallback invokes the ecs.CancelSimulatedSystemEvents API asynchronously -// api document: https://help.aliyun.com/api/ecs/cancelsimulatedsystemevents.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelSimulatedSystemEventsWithCallback(request *CancelSimulatedSystemEventsRequest, callback func(response *CancelSimulatedSystemEventsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateCancelSimulatedSystemEventsRequest() (request *CancelSimulatedSystemE RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CancelSimulatedSystemEvents", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_task.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_task.go index 1f83b02b1..70d6b4aff 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_task.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/cancel_task.go @@ -21,7 +21,6 @@ import ( ) // CancelTask invokes the ecs.CancelTask API synchronously -// api document: https://help.aliyun.com/api/ecs/canceltask.html func (client *Client) CancelTask(request *CancelTaskRequest) (response *CancelTaskResponse, err error) { response = CreateCancelTaskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CancelTask(request *CancelTaskRequest) (response *CancelTa } // CancelTaskWithChan invokes the ecs.CancelTask API asynchronously -// api document: https://help.aliyun.com/api/ecs/canceltask.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelTaskWithChan(request *CancelTaskRequest) (<-chan *CancelTaskResponse, <-chan error) { responseChan := make(chan *CancelTaskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CancelTaskWithChan(request *CancelTaskRequest) (<-chan *Ca } // CancelTaskWithCallback invokes the ecs.CancelTask API asynchronously -// api document: https://help.aliyun.com/api/ecs/canceltask.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CancelTaskWithCallback(request *CancelTaskRequest, callback func(response *CancelTaskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) CancelTaskWithCallback(request *CancelTaskRequest, callbac type CancelTaskRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + TaskId string `position:"Query" name:"TaskId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - TaskId string `position:"Query" name:"TaskId"` } // CancelTaskResponse is the response struct for api CancelTask @@ -94,6 +89,7 @@ func CreateCancelTaskRequest() (request *CancelTaskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CancelTask", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/client.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/client.go index f2a10a3a5..e7ffd52e2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/client.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/client.go @@ -16,8 +16,11 @@ package ecs // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "reflect" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider" ) // Client is the sdk client struct, each func corresponds to an OpenAPI @@ -25,10 +28,40 @@ type Client struct { sdk.Client } +// SetClientProperty Set Property by Reflect +func SetClientProperty(client *Client, propertyName string, propertyValue interface{}) { + v := reflect.ValueOf(client).Elem() + if v.FieldByName(propertyName).IsValid() && v.FieldByName(propertyName).CanSet() { + v.FieldByName(propertyName).Set(reflect.ValueOf(propertyValue)) + } +} + +// SetEndpointDataToClient Set EndpointMap and ENdpointType +func SetEndpointDataToClient(client *Client) { + SetClientProperty(client, "EndpointMap", GetEndpointMap()) + SetClientProperty(client, "EndpointType", GetEndpointType()) +} + // NewClient creates a sdk client with environment variables func NewClient() (client *Client, err error) { client = &Client{} err = client.Init() + SetEndpointDataToClient(client) + return +} + +// NewClientWithProvider creates a sdk client with providers +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) { + client = &Client{} + var pc provider.Provider + if len(providers) == 0 { + pc = provider.DefaultChain + } else { + pc = provider.NewProviderChain(providers) + } + err = client.InitWithProviderChain(regionId, pc) + SetEndpointDataToClient(client) return } @@ -37,45 +70,60 @@ func NewClient() (client *Client, err error) { func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) { client = &Client{} err = client.InitWithOptions(regionId, config, credential) + SetEndpointDataToClient(client) return } // NewClientWithAccessKey is a shortcut to create sdk client with accesskey -// usage: https://help.aliyun.com/document_detail/66217.html +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) { client = &Client{} err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret) + SetEndpointDataToClient(client) return } // NewClientWithStsToken is a shortcut to create sdk client with sts token -// usage: https://help.aliyun.com/document_detail/66222.html +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) { client = &Client{} err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken) + SetEndpointDataToClient(client) return } // NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn -// usage: https://help.aliyun.com/document_detail/66222.html +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) { client = &Client{} err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName) + SetEndpointDataToClient(client) + return +} + +// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) { + client = &Client{} + err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy) + SetEndpointDataToClient(client) return } // NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role -// usage: https://help.aliyun.com/document_detail/66223.html +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) { client = &Client{} err = client.InitWithEcsRamRole(regionId, roleName) + SetEndpointDataToClient(client) return } // NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair -// attention: rsa key pair auth is only Japan regions available +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) { client = &Client{} err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration) + SetEndpointDataToClient(client) return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/connect_router_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/connect_router_interface.go index 46adafce6..301a93cf0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/connect_router_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/connect_router_interface.go @@ -21,7 +21,6 @@ import ( ) // ConnectRouterInterface invokes the ecs.ConnectRouterInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/connectrouterinterface.html func (client *Client) ConnectRouterInterface(request *ConnectRouterInterfaceRequest) (response *ConnectRouterInterfaceResponse, err error) { response = CreateConnectRouterInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ConnectRouterInterface(request *ConnectRouterInterfaceRequ } // ConnectRouterInterfaceWithChan invokes the ecs.ConnectRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/connectrouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ConnectRouterInterfaceWithChan(request *ConnectRouterInterfaceRequest) (<-chan *ConnectRouterInterfaceResponse, <-chan error) { responseChan := make(chan *ConnectRouterInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ConnectRouterInterfaceWithChan(request *ConnectRouterInter } // ConnectRouterInterfaceWithCallback invokes the ecs.ConnectRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/connectrouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ConnectRouterInterfaceWithCallback(request *ConnectRouterInterfaceRequest, callback func(response *ConnectRouterInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -94,6 +89,7 @@ func CreateConnectRouterInterfaceRequest() (request *ConnectRouterInterfaceReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ConnectRouterInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/convert_nat_public_ip_to_eip.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/convert_nat_public_ip_to_eip.go index 1934e1675..9be9c7a8a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/convert_nat_public_ip_to_eip.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/convert_nat_public_ip_to_eip.go @@ -21,7 +21,6 @@ import ( ) // ConvertNatPublicIpToEip invokes the ecs.ConvertNatPublicIpToEip API synchronously -// api document: https://help.aliyun.com/api/ecs/convertnatpubliciptoeip.html func (client *Client) ConvertNatPublicIpToEip(request *ConvertNatPublicIpToEipRequest) (response *ConvertNatPublicIpToEipResponse, err error) { response = CreateConvertNatPublicIpToEipResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ConvertNatPublicIpToEip(request *ConvertNatPublicIpToEipRe } // ConvertNatPublicIpToEipWithChan invokes the ecs.ConvertNatPublicIpToEip API asynchronously -// api document: https://help.aliyun.com/api/ecs/convertnatpubliciptoeip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ConvertNatPublicIpToEipWithChan(request *ConvertNatPublicIpToEipRequest) (<-chan *ConvertNatPublicIpToEipResponse, <-chan error) { responseChan := make(chan *ConvertNatPublicIpToEipResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ConvertNatPublicIpToEipWithChan(request *ConvertNatPublicI } // ConvertNatPublicIpToEipWithCallback invokes the ecs.ConvertNatPublicIpToEip API asynchronously -// api document: https://help.aliyun.com/api/ecs/convertnatpubliciptoeip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ConvertNatPublicIpToEipWithCallback(request *ConvertNatPublicIpToEipRequest, callback func(response *ConvertNatPublicIpToEipResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -94,6 +89,7 @@ func CreateConvertNatPublicIpToEipRequest() (request *ConvertNatPublicIpToEipReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ConvertNatPublicIpToEip", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/copy_image.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/copy_image.go index 74e26d4d5..de2d874bf 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/copy_image.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/copy_image.go @@ -21,7 +21,6 @@ import ( ) // CopyImage invokes the ecs.CopyImage API synchronously -// api document: https://help.aliyun.com/api/ecs/copyimage.html func (client *Client) CopyImage(request *CopyImageRequest) (response *CopyImageResponse, err error) { response = CreateCopyImageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CopyImage(request *CopyImageRequest) (response *CopyImageR } // CopyImageWithChan invokes the ecs.CopyImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/copyimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CopyImageWithChan(request *CopyImageRequest) (<-chan *CopyImageResponse, <-chan error) { responseChan := make(chan *CopyImageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CopyImageWithChan(request *CopyImageRequest) (<-chan *Copy } // CopyImageWithCallback invokes the ecs.CopyImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/copyimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CopyImageWithCallback(request *CopyImageRequest, callback func(response *CopyImageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,13 +73,16 @@ type CopyImageRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ImageId string `position:"Query" name:"ImageId"` + EncryptAlgorithm string `position:"Query" name:"EncryptAlgorithm"` + DestinationRegionId string `position:"Query" name:"DestinationRegionId"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + Tag *[]CopyImageTag `position:"Query" name:"Tag" type:"Repeated"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` DestinationImageName string `position:"Query" name:"DestinationImageName"` - DestinationRegionId string `position:"Query" name:"DestinationRegionId"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` Encrypted requests.Boolean `position:"Query" name:"Encrypted"` - Tag *[]CopyImageTag `position:"Query" name:"Tag" type:"Repeated"` + KMSKeyId string `position:"Query" name:"KMSKeyId"` DestinationDescription string `position:"Query" name:"DestinationDescription"` } @@ -107,6 +105,7 @@ func CreateCopyImageRequest() (request *CopyImageRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CopyImage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/copy_snapshot.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/copy_snapshot.go new file mode 100644 index 000000000..f191d9d38 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/copy_snapshot.go @@ -0,0 +1,115 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CopySnapshot invokes the ecs.CopySnapshot API synchronously +func (client *Client) CopySnapshot(request *CopySnapshotRequest) (response *CopySnapshotResponse, err error) { + response = CreateCopySnapshotResponse() + err = client.DoAction(request, response) + return +} + +// CopySnapshotWithChan invokes the ecs.CopySnapshot API asynchronously +func (client *Client) CopySnapshotWithChan(request *CopySnapshotRequest) (<-chan *CopySnapshotResponse, <-chan error) { + responseChan := make(chan *CopySnapshotResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CopySnapshot(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CopySnapshotWithCallback invokes the ecs.CopySnapshot API asynchronously +func (client *Client) CopySnapshotWithCallback(request *CopySnapshotRequest, callback func(response *CopySnapshotResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CopySnapshotResponse + var err error + defer close(result) + response, err = client.CopySnapshot(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CopySnapshotRequest is the request struct for api CopySnapshot +type CopySnapshotRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + SnapshotId string `position:"Query" name:"SnapshotId"` + DestinationRegionId string `position:"Query" name:"DestinationRegionId"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + Tag *[]CopySnapshotTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + DestinationSnapshotName string `position:"Query" name:"DestinationSnapshotName"` + DestinationSnapshotDescription string `position:"Query" name:"DestinationSnapshotDescription"` + RetentionDays requests.Integer `position:"Query" name:"RetentionDays"` +} + +// CopySnapshotTag is a repeated param struct in CopySnapshotRequest +type CopySnapshotTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// CopySnapshotResponse is the response struct for api CopySnapshot +type CopySnapshotResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + SnapshotId string `json:"SnapshotId" xml:"SnapshotId"` +} + +// CreateCopySnapshotRequest creates a request to invoke CopySnapshot API +func CreateCopySnapshotRequest() (request *CopySnapshotRequest) { + request = &CopySnapshotRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CopySnapshot", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCopySnapshotResponse creates a response to parse from CopySnapshot response +func CreateCopySnapshotResponse() (response *CopySnapshotResponse) { + response = &CopySnapshotResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_activation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_activation.go new file mode 100644 index 000000000..8c17b9fa0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_activation.go @@ -0,0 +1,109 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateActivation invokes the ecs.CreateActivation API synchronously +func (client *Client) CreateActivation(request *CreateActivationRequest) (response *CreateActivationResponse, err error) { + response = CreateCreateActivationResponse() + err = client.DoAction(request, response) + return +} + +// CreateActivationWithChan invokes the ecs.CreateActivation API asynchronously +func (client *Client) CreateActivationWithChan(request *CreateActivationRequest) (<-chan *CreateActivationResponse, <-chan error) { + responseChan := make(chan *CreateActivationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateActivation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateActivationWithCallback invokes the ecs.CreateActivation API asynchronously +func (client *Client) CreateActivationWithCallback(request *CreateActivationRequest, callback func(response *CreateActivationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateActivationResponse + var err error + defer close(result) + response, err = client.CreateActivation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateActivationRequest is the request struct for api CreateActivation +type CreateActivationRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + InstanceCount requests.Integer `position:"Query" name:"InstanceCount"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceName string `position:"Query" name:"InstanceName"` + TimeToLiveInHours requests.Integer `position:"Query" name:"TimeToLiveInHours"` + IpAddressRange string `position:"Query" name:"IpAddressRange"` +} + +// CreateActivationResponse is the response struct for api CreateActivation +type CreateActivationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ActivationId string `json:"ActivationId" xml:"ActivationId"` + ActivationCode string `json:"ActivationCode" xml:"ActivationCode"` +} + +// CreateCreateActivationRequest creates a request to invoke CreateActivation API +func CreateCreateActivationRequest() (request *CreateActivationRequest) { + request = &CreateActivationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateActivation", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateActivationResponse creates a response to parse from CreateActivation response +func CreateCreateActivationResponse() (response *CreateActivationResponse) { + response = &CreateActivationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_auto_provisioning_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_auto_provisioning_group.go new file mode 100644 index 000000000..e64e50b18 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_auto_provisioning_group.go @@ -0,0 +1,192 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateAutoProvisioningGroup invokes the ecs.CreateAutoProvisioningGroup API synchronously +func (client *Client) CreateAutoProvisioningGroup(request *CreateAutoProvisioningGroupRequest) (response *CreateAutoProvisioningGroupResponse, err error) { + response = CreateCreateAutoProvisioningGroupResponse() + err = client.DoAction(request, response) + return +} + +// CreateAutoProvisioningGroupWithChan invokes the ecs.CreateAutoProvisioningGroup API asynchronously +func (client *Client) CreateAutoProvisioningGroupWithChan(request *CreateAutoProvisioningGroupRequest) (<-chan *CreateAutoProvisioningGroupResponse, <-chan error) { + responseChan := make(chan *CreateAutoProvisioningGroupResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateAutoProvisioningGroup(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateAutoProvisioningGroupWithCallback invokes the ecs.CreateAutoProvisioningGroup API asynchronously +func (client *Client) CreateAutoProvisioningGroupWithCallback(request *CreateAutoProvisioningGroupRequest, callback func(response *CreateAutoProvisioningGroupResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateAutoProvisioningGroupResponse + var err error + defer close(result) + response, err = client.CreateAutoProvisioningGroup(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateAutoProvisioningGroupRequest is the request struct for api CreateAutoProvisioningGroup +type CreateAutoProvisioningGroupRequest struct { + *requests.RpcRequest + LaunchConfigurationDataDisk *[]CreateAutoProvisioningGroupLaunchConfigurationDataDisk `position:"Query" name:"LaunchConfiguration.DataDisk" type:"Repeated"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + LaunchConfigurationSystemDiskCategory string `position:"Query" name:"LaunchConfiguration.SystemDiskCategory"` + AutoProvisioningGroupType string `position:"Query" name:"AutoProvisioningGroupType"` + LaunchConfigurationSystemDiskPerformanceLevel string `position:"Query" name:"LaunchConfiguration.SystemDiskPerformanceLevel"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + LaunchConfigurationImageId string `position:"Query" name:"LaunchConfiguration.ImageId"` + LaunchConfigurationResourceGroupId string `position:"Query" name:"LaunchConfiguration.ResourceGroupId"` + LaunchConfigurationPassword string `position:"Query" name:"LaunchConfiguration.Password"` + PayAsYouGoAllocationStrategy string `position:"Query" name:"PayAsYouGoAllocationStrategy"` + DefaultTargetCapacityType string `position:"Query" name:"DefaultTargetCapacityType"` + LaunchConfigurationKeyPairName string `position:"Query" name:"LaunchConfiguration.KeyPairName"` + SystemDiskConfig *[]CreateAutoProvisioningGroupSystemDiskConfig `position:"Query" name:"SystemDiskConfig" type:"Repeated"` + DataDiskConfig *[]CreateAutoProvisioningGroupDataDiskConfig `position:"Query" name:"DataDiskConfig" type:"Repeated"` + ValidUntil string `position:"Query" name:"ValidUntil"` + LaunchTemplateId string `position:"Query" name:"LaunchTemplateId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + LaunchConfigurationSystemDiskSize requests.Integer `position:"Query" name:"LaunchConfiguration.SystemDiskSize"` + LaunchConfigurationInternetMaxBandwidthOut requests.Integer `position:"Query" name:"LaunchConfiguration.InternetMaxBandwidthOut"` + LaunchConfigurationHostName string `position:"Query" name:"LaunchConfiguration.HostName"` + MaxSpotPrice requests.Float `position:"Query" name:"MaxSpotPrice"` + LaunchConfigurationPasswordInherit requests.Boolean `position:"Query" name:"LaunchConfiguration.PasswordInherit"` + ClientToken string `position:"Query" name:"ClientToken"` + LaunchConfigurationSecurityGroupId string `position:"Query" name:"LaunchConfiguration.SecurityGroupId"` + Description string `position:"Query" name:"Description"` + TerminateInstancesWithExpiration requests.Boolean `position:"Query" name:"TerminateInstancesWithExpiration"` + LaunchConfigurationUserData string `position:"Query" name:"LaunchConfiguration.UserData"` + LaunchConfigurationCreditSpecification string `position:"Query" name:"LaunchConfiguration.CreditSpecification"` + LaunchConfigurationInstanceName string `position:"Query" name:"LaunchConfiguration.InstanceName"` + LaunchConfigurationInstanceDescription string `position:"Query" name:"LaunchConfiguration.InstanceDescription"` + SpotAllocationStrategy string `position:"Query" name:"SpotAllocationStrategy"` + TerminateInstances requests.Boolean `position:"Query" name:"TerminateInstances"` + LaunchConfigurationSystemDiskName string `position:"Query" name:"LaunchConfiguration.SystemDiskName"` + LaunchConfigurationSystemDiskDescription string `position:"Query" name:"LaunchConfiguration.SystemDiskDescription"` + ExcessCapacityTerminationPolicy string `position:"Query" name:"ExcessCapacityTerminationPolicy"` + LaunchTemplateConfig *[]CreateAutoProvisioningGroupLaunchTemplateConfig `position:"Query" name:"LaunchTemplateConfig" type:"Repeated"` + LaunchConfigurationRamRoleName string `position:"Query" name:"LaunchConfiguration.RamRoleName"` + LaunchConfigurationInternetMaxBandwidthIn requests.Integer `position:"Query" name:"LaunchConfiguration.InternetMaxBandwidthIn"` + SpotInstanceInterruptionBehavior string `position:"Query" name:"SpotInstanceInterruptionBehavior"` + LaunchConfigurationSecurityEnhancementStrategy string `position:"Query" name:"LaunchConfiguration.SecurityEnhancementStrategy"` + LaunchConfigurationTag *[]CreateAutoProvisioningGroupLaunchConfigurationTag `position:"Query" name:"LaunchConfiguration.Tag" type:"Repeated"` + LaunchConfigurationDeploymentSetId string `position:"Query" name:"LaunchConfiguration.DeploymentSetId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + SpotInstancePoolsToUseCount requests.Integer `position:"Query" name:"SpotInstancePoolsToUseCount"` + LaunchConfigurationInternetChargeType string `position:"Query" name:"LaunchConfiguration.InternetChargeType"` + LaunchTemplateVersion string `position:"Query" name:"LaunchTemplateVersion"` + LaunchConfigurationIoOptimized string `position:"Query" name:"LaunchConfiguration.IoOptimized"` + PayAsYouGoTargetCapacity string `position:"Query" name:"PayAsYouGoTargetCapacity"` + TotalTargetCapacity string `position:"Query" name:"TotalTargetCapacity"` + SpotTargetCapacity string `position:"Query" name:"SpotTargetCapacity"` + ValidFrom string `position:"Query" name:"ValidFrom"` + AutoProvisioningGroupName string `position:"Query" name:"AutoProvisioningGroupName"` +} + +// CreateAutoProvisioningGroupLaunchConfiguration.DataDisk is a repeated param struct in CreateAutoProvisioningGroupRequest +type CreateAutoProvisioningGroupLaunchConfigurationDataDisk struct { + Size string `name:"Size"` + Category string `name:"Category"` + PerformanceLevel string `name:"PerformanceLevel"` + Device string `name:"Device"` + SnapshotId string `name:"SnapshotId"` + DeleteWithInstance string `name:"DeleteWithInstance"` + Encrypted string `name:"Encrypted"` + KmsKeyId string `name:"KmsKeyId"` + DiskName string `name:"DiskName"` + Description string `name:"Description"` +} + +// CreateAutoProvisioningGroupSystemDiskConfig is a repeated param struct in CreateAutoProvisioningGroupRequest +type CreateAutoProvisioningGroupSystemDiskConfig struct { + DiskCategory string `name:"DiskCategory"` +} + +// CreateAutoProvisioningGroupDataDiskConfig is a repeated param struct in CreateAutoProvisioningGroupRequest +type CreateAutoProvisioningGroupDataDiskConfig struct { + DiskCategory string `name:"DiskCategory"` +} + +// CreateAutoProvisioningGroupLaunchTemplateConfig is a repeated param struct in CreateAutoProvisioningGroupRequest +type CreateAutoProvisioningGroupLaunchTemplateConfig struct { + InstanceType string `name:"InstanceType"` + MaxPrice string `name:"MaxPrice"` + VSwitchId string `name:"VSwitchId"` + WeightedCapacity string `name:"WeightedCapacity"` + Priority string `name:"Priority"` +} + +// CreateAutoProvisioningGroupLaunchConfiguration.Tag is a repeated param struct in CreateAutoProvisioningGroupRequest +type CreateAutoProvisioningGroupLaunchConfigurationTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// CreateAutoProvisioningGroupResponse is the response struct for api CreateAutoProvisioningGroup +type CreateAutoProvisioningGroupResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + AutoProvisioningGroupId string `json:"AutoProvisioningGroupId" xml:"AutoProvisioningGroupId"` + LaunchResults LaunchResults `json:"LaunchResults" xml:"LaunchResults"` +} + +// CreateCreateAutoProvisioningGroupRequest creates a request to invoke CreateAutoProvisioningGroup API +func CreateCreateAutoProvisioningGroupRequest() (request *CreateAutoProvisioningGroupRequest) { + request = &CreateAutoProvisioningGroupRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateAutoProvisioningGroup", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateAutoProvisioningGroupResponse creates a response to parse from CreateAutoProvisioningGroup response +func CreateCreateAutoProvisioningGroupResponse() (response *CreateAutoProvisioningGroupResponse) { + response = &CreateAutoProvisioningGroupResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_auto_snapshot_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_auto_snapshot_policy.go index 011027099..677d89ab6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_auto_snapshot_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_auto_snapshot_policy.go @@ -21,7 +21,6 @@ import ( ) // CreateAutoSnapshotPolicy invokes the ecs.CreateAutoSnapshotPolicy API synchronously -// api document: https://help.aliyun.com/api/ecs/createautosnapshotpolicy.html func (client *Client) CreateAutoSnapshotPolicy(request *CreateAutoSnapshotPolicyRequest) (response *CreateAutoSnapshotPolicyResponse, err error) { response = CreateCreateAutoSnapshotPolicyResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateAutoSnapshotPolicy(request *CreateAutoSnapshotPolicy } // CreateAutoSnapshotPolicyWithChan invokes the ecs.CreateAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/createautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateAutoSnapshotPolicyWithChan(request *CreateAutoSnapshotPolicyRequest) (<-chan *CreateAutoSnapshotPolicyResponse, <-chan error) { responseChan := make(chan *CreateAutoSnapshotPolicyResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateAutoSnapshotPolicyWithChan(request *CreateAutoSnapsh } // CreateAutoSnapshotPolicyWithCallback invokes the ecs.CreateAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/createautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateAutoSnapshotPolicyWithCallback(request *CreateAutoSnapshotPolicyRequest, callback func(response *CreateAutoSnapshotPolicyResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,13 +71,23 @@ func (client *Client) CreateAutoSnapshotPolicyWithCallback(request *CreateAutoSn // CreateAutoSnapshotPolicyRequest is the request struct for api CreateAutoSnapshotPolicy type CreateAutoSnapshotPolicyRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - TimePoints string `position:"Query" name:"timePoints"` - RetentionDays requests.Integer `position:"Query" name:"retentionDays"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - RepeatWeekdays string `position:"Query" name:"repeatWeekdays"` - AutoSnapshotPolicyName string `position:"Query" name:"autoSnapshotPolicyName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + CopiedSnapshotsRetentionDays requests.Integer `position:"Query" name:"CopiedSnapshotsRetentionDays"` + TimePoints string `position:"Query" name:"timePoints"` + RepeatWeekdays string `position:"Query" name:"repeatWeekdays"` + Tag *[]CreateAutoSnapshotPolicyTag `position:"Query" name:"Tag" type:"Repeated"` + EnableCrossRegionCopy requests.Boolean `position:"Query" name:"EnableCrossRegionCopy"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AutoSnapshotPolicyName string `position:"Query" name:"autoSnapshotPolicyName"` + RetentionDays requests.Integer `position:"Query" name:"retentionDays"` + TargetCopyRegions string `position:"Query" name:"TargetCopyRegions"` +} + +// CreateAutoSnapshotPolicyTag is a repeated param struct in CreateAutoSnapshotPolicyRequest +type CreateAutoSnapshotPolicyTag struct { + Value string `name:"Value"` + Key string `name:"Key"` } // CreateAutoSnapshotPolicyResponse is the response struct for api CreateAutoSnapshotPolicy @@ -98,6 +103,7 @@ func CreateCreateAutoSnapshotPolicyRequest() (request *CreateAutoSnapshotPolicyR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateAutoSnapshotPolicy", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_capacity_reservation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_capacity_reservation.go new file mode 100644 index 000000000..eb31bbd81 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_capacity_reservation.go @@ -0,0 +1,130 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateCapacityReservation invokes the ecs.CreateCapacityReservation API synchronously +func (client *Client) CreateCapacityReservation(request *CreateCapacityReservationRequest) (response *CreateCapacityReservationResponse, err error) { + response = CreateCreateCapacityReservationResponse() + err = client.DoAction(request, response) + return +} + +// CreateCapacityReservationWithChan invokes the ecs.CreateCapacityReservation API asynchronously +func (client *Client) CreateCapacityReservationWithChan(request *CreateCapacityReservationRequest) (<-chan *CreateCapacityReservationResponse, <-chan error) { + responseChan := make(chan *CreateCapacityReservationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateCapacityReservation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateCapacityReservationWithCallback invokes the ecs.CreateCapacityReservation API asynchronously +func (client *Client) CreateCapacityReservationWithCallback(request *CreateCapacityReservationRequest, callback func(response *CreateCapacityReservationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateCapacityReservationResponse + var err error + defer close(result) + response, err = client.CreateCapacityReservation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateCapacityReservationRequest is the request struct for api CreateCapacityReservation +type CreateCapacityReservationRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + StartTime string `position:"Query" name:"StartTime"` + Platform string `position:"Query" name:"Platform"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + PrivatePoolOptionsMatchCriteria string `position:"Query" name:"PrivatePoolOptions.MatchCriteria"` + InstanceType string `position:"Query" name:"InstanceType"` + Tag *[]CreateCapacityReservationTag `position:"Query" name:"Tag" type:"Repeated"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + EfficientStatus requests.Integer `position:"Query" name:"EfficientStatus"` + Period requests.Integer `position:"Query" name:"Period"` + EndTimeType string `position:"Query" name:"EndTimeType"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PrivatePoolOptionsName string `position:"Query" name:"PrivatePoolOptions.Name"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + EndTime string `position:"Query" name:"EndTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ResourceType string `position:"Query" name:"ResourceType"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + TimeSlot string `position:"Query" name:"TimeSlot"` + ZoneId *[]string `position:"Query" name:"ZoneId" type:"Repeated"` + ChargeType string `position:"Query" name:"ChargeType"` + PackageType string `position:"Query" name:"PackageType"` + InstanceAmount requests.Integer `position:"Query" name:"InstanceAmount"` +} + +// CreateCapacityReservationTag is a repeated param struct in CreateCapacityReservationRequest +type CreateCapacityReservationTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// CreateCapacityReservationResponse is the response struct for api CreateCapacityReservation +type CreateCapacityReservationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + PrivatePoolOptionsId string `json:"PrivatePoolOptionsId" xml:"PrivatePoolOptionsId"` +} + +// CreateCreateCapacityReservationRequest creates a request to invoke CreateCapacityReservation API +func CreateCreateCapacityReservationRequest() (request *CreateCapacityReservationRequest) { + request = &CreateCapacityReservationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateCapacityReservation", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateCapacityReservationResponse creates a response to parse from CreateCapacityReservation response +func CreateCreateCapacityReservationResponse() (response *CreateCapacityReservationResponse) { + response = &CreateCapacityReservationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_command.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_command.go index 1f4d0e6a2..d6e0a1262 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_command.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_command.go @@ -21,7 +21,6 @@ import ( ) // CreateCommand invokes the ecs.CreateCommand API synchronously -// api document: https://help.aliyun.com/api/ecs/createcommand.html func (client *Client) CreateCommand(request *CreateCommandRequest) (response *CreateCommandResponse, err error) { response = CreateCreateCommandResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateCommand(request *CreateCommandRequest) (response *Cr } // CreateCommandWithChan invokes the ecs.CreateCommand API asynchronously -// api document: https://help.aliyun.com/api/ecs/createcommand.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateCommandWithChan(request *CreateCommandRequest) (<-chan *CreateCommandResponse, <-chan error) { responseChan := make(chan *CreateCommandResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateCommandWithChan(request *CreateCommandRequest) (<-ch } // CreateCommandWithCallback invokes the ecs.CreateCommand API asynchronously -// api document: https://help.aliyun.com/api/ecs/createcommand.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateCommandWithCallback(request *CreateCommandRequest, callback func(response *CreateCommandResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -86,6 +81,7 @@ type CreateCommandRequest struct { OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` Name string `position:"Query" name:"Name"` + EnableParameter requests.Boolean `position:"Query" name:"EnableParameter"` } // CreateCommandResponse is the response struct for api CreateCommand @@ -101,6 +97,7 @@ func CreateCreateCommandRequest() (request *CreateCommandRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateCommand", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_dedicated_host_cluster.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_dedicated_host_cluster.go new file mode 100644 index 000000000..e4390b70e --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_dedicated_host_cluster.go @@ -0,0 +1,115 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateDedicatedHostCluster invokes the ecs.CreateDedicatedHostCluster API synchronously +func (client *Client) CreateDedicatedHostCluster(request *CreateDedicatedHostClusterRequest) (response *CreateDedicatedHostClusterResponse, err error) { + response = CreateCreateDedicatedHostClusterResponse() + err = client.DoAction(request, response) + return +} + +// CreateDedicatedHostClusterWithChan invokes the ecs.CreateDedicatedHostCluster API asynchronously +func (client *Client) CreateDedicatedHostClusterWithChan(request *CreateDedicatedHostClusterRequest) (<-chan *CreateDedicatedHostClusterResponse, <-chan error) { + responseChan := make(chan *CreateDedicatedHostClusterResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateDedicatedHostCluster(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateDedicatedHostClusterWithCallback invokes the ecs.CreateDedicatedHostCluster API asynchronously +func (client *Client) CreateDedicatedHostClusterWithCallback(request *CreateDedicatedHostClusterRequest, callback func(response *CreateDedicatedHostClusterResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateDedicatedHostClusterResponse + var err error + defer close(result) + response, err = client.CreateDedicatedHostCluster(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateDedicatedHostClusterRequest is the request struct for api CreateDedicatedHostCluster +type CreateDedicatedHostClusterRequest struct { + *requests.RpcRequest + DedicatedHostClusterName string `position:"Query" name:"DedicatedHostClusterName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + Tag *[]CreateDedicatedHostClusterTag `position:"Query" name:"Tag" type:"Repeated"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ZoneId string `position:"Query" name:"ZoneId"` +} + +// CreateDedicatedHostClusterTag is a repeated param struct in CreateDedicatedHostClusterRequest +type CreateDedicatedHostClusterTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// CreateDedicatedHostClusterResponse is the response struct for api CreateDedicatedHostCluster +type CreateDedicatedHostClusterResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + DedicatedHostClusterId string `json:"DedicatedHostClusterId" xml:"DedicatedHostClusterId"` +} + +// CreateCreateDedicatedHostClusterRequest creates a request to invoke CreateDedicatedHostCluster API +func CreateCreateDedicatedHostClusterRequest() (request *CreateDedicatedHostClusterRequest) { + request = &CreateDedicatedHostClusterRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateDedicatedHostCluster", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateDedicatedHostClusterResponse creates a response to parse from CreateDedicatedHostCluster response +func CreateCreateDedicatedHostClusterResponse() (response *CreateDedicatedHostClusterResponse) { + response = &CreateDedicatedHostClusterResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_demand.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_demand.go new file mode 100644 index 000000000..d86cff58f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_demand.go @@ -0,0 +1,114 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateDemand invokes the ecs.CreateDemand API synchronously +func (client *Client) CreateDemand(request *CreateDemandRequest) (response *CreateDemandResponse, err error) { + response = CreateCreateDemandResponse() + err = client.DoAction(request, response) + return +} + +// CreateDemandWithChan invokes the ecs.CreateDemand API asynchronously +func (client *Client) CreateDemandWithChan(request *CreateDemandRequest) (<-chan *CreateDemandResponse, <-chan error) { + responseChan := make(chan *CreateDemandResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateDemand(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateDemandWithCallback invokes the ecs.CreateDemand API asynchronously +func (client *Client) CreateDemandWithCallback(request *CreateDemandRequest, callback func(response *CreateDemandResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateDemandResponse + var err error + defer close(result) + response, err = client.CreateDemand(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateDemandRequest is the request struct for api CreateDemand +type CreateDemandRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + StartTime string `position:"Query" name:"StartTime"` + DemandDescription string `position:"Query" name:"DemandDescription"` + InstanceType string `position:"Query" name:"InstanceType"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + DemandName string `position:"Query" name:"DemandName"` + Amount requests.Integer `position:"Query" name:"Amount"` + Period requests.Integer `position:"Query" name:"Period"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + EndTime string `position:"Query" name:"EndTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + ZoneId string `position:"Query" name:"ZoneId"` +} + +// CreateDemandResponse is the response struct for api CreateDemand +type CreateDemandResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + DemandId string `json:"DemandId" xml:"DemandId"` +} + +// CreateCreateDemandRequest creates a request to invoke CreateDemand API +func CreateCreateDemandRequest() (request *CreateDemandRequest) { + request = &CreateDemandRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateDemand", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateDemandResponse creates a response to parse from CreateDemand response +func CreateCreateDemandResponse() (response *CreateDemandResponse) { + response = &CreateDemandResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_deployment_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_deployment_set.go index 4c66fdfb6..556595184 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_deployment_set.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_deployment_set.go @@ -21,7 +21,6 @@ import ( ) // CreateDeploymentSet invokes the ecs.CreateDeploymentSet API synchronously -// api document: https://help.aliyun.com/api/ecs/createdeploymentset.html func (client *Client) CreateDeploymentSet(request *CreateDeploymentSetRequest) (response *CreateDeploymentSetResponse, err error) { response = CreateCreateDeploymentSetResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateDeploymentSet(request *CreateDeploymentSetRequest) ( } // CreateDeploymentSetWithChan invokes the ecs.CreateDeploymentSet API asynchronously -// api document: https://help.aliyun.com/api/ecs/createdeploymentset.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateDeploymentSetWithChan(request *CreateDeploymentSetRequest) (<-chan *CreateDeploymentSetResponse, <-chan error) { responseChan := make(chan *CreateDeploymentSetResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateDeploymentSetWithChan(request *CreateDeploymentSetRe } // CreateDeploymentSetWithCallback invokes the ecs.CreateDeploymentSet API asynchronously -// api document: https://help.aliyun.com/api/ecs/createdeploymentset.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateDeploymentSetWithCallback(request *CreateDeploymentSetRequest, callback func(response *CreateDeploymentSetResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,11 @@ func (client *Client) CreateDeploymentSetWithCallback(request *CreateDeploymentS type CreateDeploymentSetRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` + GroupCount requests.Integer `position:"Query" name:"GroupCount"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` DeploymentSetName string `position:"Query" name:"DeploymentSetName"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` OnUnableToRedeployFailedInstance string `position:"Query" name:"OnUnableToRedeployFailedInstance"` @@ -102,6 +98,7 @@ func CreateCreateDeploymentSetRequest() (request *CreateDeploymentSetRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateDeploymentSet", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_disk.go index 872950280..fcc62df40 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_disk.go @@ -21,7 +21,6 @@ import ( ) // CreateDisk invokes the ecs.CreateDisk API synchronously -// api document: https://help.aliyun.com/api/ecs/createdisk.html func (client *Client) CreateDisk(request *CreateDiskRequest) (response *CreateDiskResponse, err error) { response = CreateCreateDiskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateDisk(request *CreateDiskRequest) (response *CreateDi } // CreateDiskWithChan invokes the ecs.CreateDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/createdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateDiskWithChan(request *CreateDiskRequest) (<-chan *CreateDiskResponse, <-chan error) { responseChan := make(chan *CreateDiskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateDiskWithChan(request *CreateDiskRequest) (<-chan *Cr } // CreateDiskWithCallback invokes the ecs.CreateDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/createdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateDiskWithCallback(request *CreateDiskRequest, callback func(response *CreateDiskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,23 +71,28 @@ func (client *Client) CreateDiskWithCallback(request *CreateDiskRequest, callbac // CreateDiskRequest is the request struct for api CreateDisk type CreateDiskRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - SnapshotId string `position:"Query" name:"SnapshotId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - Description string `position:"Query" name:"Description"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - DiskName string `position:"Query" name:"DiskName"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - Size requests.Integer `position:"Query" name:"Size"` - Encrypted requests.Boolean `position:"Query" name:"Encrypted"` - DiskCategory string `position:"Query" name:"DiskCategory"` - ZoneId string `position:"Query" name:"ZoneId"` - Tag *[]CreateDiskTag `position:"Query" name:"Tag" type:"Repeated"` - Arn *[]CreateDiskArn `position:"Query" name:"Arn" type:"Repeated"` - KMSKeyId string `position:"Query" name:"KMSKeyId"` - AdvancedFeatures string `position:"Query" name:"AdvancedFeatures"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + SnapshotId string `position:"Query" name:"SnapshotId"` + ClientToken string `position:"Query" name:"ClientToken"` + EncryptAlgorithm string `position:"Query" name:"EncryptAlgorithm"` + Description string `position:"Query" name:"Description"` + DiskName string `position:"Query" name:"DiskName"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + DiskCategory string `position:"Query" name:"DiskCategory"` + StorageSetPartitionNumber requests.Integer `position:"Query" name:"StorageSetPartitionNumber"` + Tag *[]CreateDiskTag `position:"Query" name:"Tag" type:"Repeated"` + Arn *[]CreateDiskArn `position:"Query" name:"Arn" type:"Repeated"` + AdvancedFeatures string `position:"Query" name:"AdvancedFeatures"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PerformanceLevel string `position:"Query" name:"PerformanceLevel"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + StorageSetId string `position:"Query" name:"StorageSetId"` + Size requests.Integer `position:"Query" name:"Size"` + Encrypted requests.Boolean `position:"Query" name:"Encrypted"` + ZoneId string `position:"Query" name:"ZoneId"` + KMSKeyId string `position:"Query" name:"KMSKeyId"` } // CreateDiskTag is a repeated param struct in CreateDiskRequest @@ -113,6 +113,7 @@ type CreateDiskResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` DiskId string `json:"DiskId" xml:"DiskId"` + OrderId string `json:"OrderId" xml:"OrderId"` } // CreateCreateDiskRequest creates a request to invoke CreateDisk API @@ -121,6 +122,7 @@ func CreateCreateDiskRequest() (request *CreateDiskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateDisk", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_elasticity_assurance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_elasticity_assurance.go new file mode 100644 index 000000000..32abb5b65 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_elasticity_assurance.go @@ -0,0 +1,129 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateElasticityAssurance invokes the ecs.CreateElasticityAssurance API synchronously +func (client *Client) CreateElasticityAssurance(request *CreateElasticityAssuranceRequest) (response *CreateElasticityAssuranceResponse, err error) { + response = CreateCreateElasticityAssuranceResponse() + err = client.DoAction(request, response) + return +} + +// CreateElasticityAssuranceWithChan invokes the ecs.CreateElasticityAssurance API asynchronously +func (client *Client) CreateElasticityAssuranceWithChan(request *CreateElasticityAssuranceRequest) (<-chan *CreateElasticityAssuranceResponse, <-chan error) { + responseChan := make(chan *CreateElasticityAssuranceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateElasticityAssurance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateElasticityAssuranceWithCallback invokes the ecs.CreateElasticityAssurance API asynchronously +func (client *Client) CreateElasticityAssuranceWithCallback(request *CreateElasticityAssuranceRequest, callback func(response *CreateElasticityAssuranceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateElasticityAssuranceResponse + var err error + defer close(result) + response, err = client.CreateElasticityAssurance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateElasticityAssuranceRequest is the request struct for api CreateElasticityAssurance +type CreateElasticityAssuranceRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + StartTime string `position:"Query" name:"StartTime"` + Platform string `position:"Query" name:"Platform"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + PrivatePoolOptionsMatchCriteria string `position:"Query" name:"PrivatePoolOptions.MatchCriteria"` + InstanceType *[]string `position:"Query" name:"InstanceType" type:"Repeated"` + Tag *[]CreateElasticityAssuranceTag `position:"Query" name:"Tag" type:"Repeated"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + Period requests.Integer `position:"Query" name:"Period"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PrivatePoolOptionsName string `position:"Query" name:"PrivatePoolOptions.Name"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + AssuranceTimes string `position:"Query" name:"AssuranceTimes"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ResourceType string `position:"Query" name:"ResourceType"` + InstanceCpuCoreCount requests.Integer `position:"Query" name:"InstanceCpuCoreCount"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + ZoneId *[]string `position:"Query" name:"ZoneId" type:"Repeated"` + ChargeType string `position:"Query" name:"ChargeType"` + PackageType string `position:"Query" name:"PackageType"` + InstanceAmount requests.Integer `position:"Query" name:"InstanceAmount"` +} + +// CreateElasticityAssuranceTag is a repeated param struct in CreateElasticityAssuranceRequest +type CreateElasticityAssuranceTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// CreateElasticityAssuranceResponse is the response struct for api CreateElasticityAssurance +type CreateElasticityAssuranceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + PrivatePoolOptionsId string `json:"PrivatePoolOptionsId" xml:"PrivatePoolOptionsId"` + OrderId string `json:"OrderId" xml:"OrderId"` +} + +// CreateCreateElasticityAssuranceRequest creates a request to invoke CreateElasticityAssurance API +func CreateCreateElasticityAssuranceRequest() (request *CreateElasticityAssuranceRequest) { + request = &CreateElasticityAssuranceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateElasticityAssurance", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateElasticityAssuranceResponse creates a response to parse from CreateElasticityAssurance response +func CreateCreateElasticityAssuranceResponse() (response *CreateElasticityAssuranceResponse) { + response = &CreateElasticityAssuranceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_forward_entry.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_forward_entry.go index e74f67bc9..eba36d25f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_forward_entry.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_forward_entry.go @@ -21,7 +21,6 @@ import ( ) // CreateForwardEntry invokes the ecs.CreateForwardEntry API synchronously -// api document: https://help.aliyun.com/api/ecs/createforwardentry.html func (client *Client) CreateForwardEntry(request *CreateForwardEntryRequest) (response *CreateForwardEntryResponse, err error) { response = CreateCreateForwardEntryResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateForwardEntry(request *CreateForwardEntryRequest) (re } // CreateForwardEntryWithChan invokes the ecs.CreateForwardEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/createforwardentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateForwardEntryWithChan(request *CreateForwardEntryRequest) (<-chan *CreateForwardEntryResponse, <-chan error) { responseChan := make(chan *CreateForwardEntryResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateForwardEntryWithChan(request *CreateForwardEntryRequ } // CreateForwardEntryWithCallback invokes the ecs.CreateForwardEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/createforwardentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateForwardEntryWithCallback(request *CreateForwardEntryRequest, callback func(response *CreateForwardEntryResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,15 +72,15 @@ func (client *Client) CreateForwardEntryWithCallback(request *CreateForwardEntry type CreateForwardEntryRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ForwardTableId string `position:"Query" name:"ForwardTableId"` + InternalIp string `position:"Query" name:"InternalIp"` + ExternalIp string `position:"Query" name:"ExternalIp"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` IpProtocol string `position:"Query" name:"IpProtocol"` - InternalPort string `position:"Query" name:"InternalPort"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - ForwardTableId string `position:"Query" name:"ForwardTableId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ExternalIp string `position:"Query" name:"ExternalIp"` + InternalPort string `position:"Query" name:"InternalPort"` ExternalPort string `position:"Query" name:"ExternalPort"` - InternalIp string `position:"Query" name:"InternalIp"` } // CreateForwardEntryResponse is the response struct for api CreateForwardEntry @@ -101,6 +96,7 @@ func CreateCreateForwardEntryRequest() (request *CreateForwardEntryRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateForwardEntry", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_ha_vip.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_ha_vip.go index 2ff08c36e..041a310d4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_ha_vip.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_ha_vip.go @@ -21,7 +21,6 @@ import ( ) // CreateHaVip invokes the ecs.CreateHaVip API synchronously -// api document: https://help.aliyun.com/api/ecs/createhavip.html func (client *Client) CreateHaVip(request *CreateHaVipRequest) (response *CreateHaVipResponse, err error) { response = CreateCreateHaVipResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateHaVip(request *CreateHaVipRequest) (response *Create } // CreateHaVipWithChan invokes the ecs.CreateHaVip API asynchronously -// api document: https://help.aliyun.com/api/ecs/createhavip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateHaVipWithChan(request *CreateHaVipRequest) (<-chan *CreateHaVipResponse, <-chan error) { responseChan := make(chan *CreateHaVipResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateHaVipWithChan(request *CreateHaVipRequest) (<-chan * } // CreateHaVipWithCallback invokes the ecs.CreateHaVip API asynchronously -// api document: https://help.aliyun.com/api/ecs/createhavip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateHaVipWithCallback(request *CreateHaVipRequest, callback func(response *CreateHaVipResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,14 +71,14 @@ func (client *Client) CreateHaVipWithCallback(request *CreateHaVipRequest, callb // CreateHaVipRequest is the request struct for api CreateHaVip type CreateHaVipRequest struct { *requests.RpcRequest - VSwitchId string `position:"Query" name:"VSwitchId"` IpAddress string `position:"Query" name:"IpAddress"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` } // CreateHaVipResponse is the response struct for api CreateHaVip @@ -99,6 +94,7 @@ func CreateCreateHaVipRequest() (request *CreateHaVipRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateHaVip", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_hpc_cluster.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_hpc_cluster.go index a1f479d67..e65a472e2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_hpc_cluster.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_hpc_cluster.go @@ -21,7 +21,6 @@ import ( ) // CreateHpcCluster invokes the ecs.CreateHpcCluster API synchronously -// api document: https://help.aliyun.com/api/ecs/createhpccluster.html func (client *Client) CreateHpcCluster(request *CreateHpcClusterRequest) (response *CreateHpcClusterResponse, err error) { response = CreateCreateHpcClusterResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateHpcCluster(request *CreateHpcClusterRequest) (respon } // CreateHpcClusterWithChan invokes the ecs.CreateHpcCluster API asynchronously -// api document: https://help.aliyun.com/api/ecs/createhpccluster.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateHpcClusterWithChan(request *CreateHpcClusterRequest) (<-chan *CreateHpcClusterResponse, <-chan error) { responseChan := make(chan *CreateHpcClusterResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateHpcClusterWithChan(request *CreateHpcClusterRequest) } // CreateHpcClusterWithCallback invokes the ecs.CreateHpcCluster API asynchronously -// api document: https://help.aliyun.com/api/ecs/createhpccluster.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateHpcClusterWithCallback(request *CreateHpcClusterRequest, callback func(response *CreateHpcClusterResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -98,6 +93,7 @@ func CreateCreateHpcClusterRequest() (request *CreateHpcClusterRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateHpcCluster", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image.go index d4712af84..29b8b64cf 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image.go @@ -21,7 +21,6 @@ import ( ) // CreateImage invokes the ecs.CreateImage API synchronously -// api document: https://help.aliyun.com/api/ecs/createimage.html func (client *Client) CreateImage(request *CreateImageRequest) (response *CreateImageResponse, err error) { response = CreateCreateImageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateImage(request *CreateImageRequest) (response *Create } // CreateImageWithChan invokes the ecs.CreateImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/createimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateImageWithChan(request *CreateImageRequest) (<-chan *CreateImageResponse, <-chan error) { responseChan := make(chan *CreateImageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateImageWithChan(request *CreateImageRequest) (<-chan * } // CreateImageWithCallback invokes the ecs.CreateImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/createimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateImageWithCallback(request *CreateImageRequest, callback func(response *CreateImageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -79,18 +74,19 @@ type CreateImageRequest struct { DiskDeviceMapping *[]CreateImageDiskDeviceMapping `position:"Query" name:"DiskDeviceMapping" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` SnapshotId string `position:"Query" name:"SnapshotId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` Platform string `position:"Query" name:"Platform"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - InstanceId string `position:"Query" name:"InstanceId"` ImageName string `position:"Query" name:"ImageName"` - ImageVersion string `position:"Query" name:"ImageVersion"` Tag *[]CreateImageTag `position:"Query" name:"Tag" type:"Repeated"` Architecture string `position:"Query" name:"Architecture"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + ImageFamily string `position:"Query" name:"ImageFamily"` + ImageVersion string `position:"Query" name:"ImageVersion"` } // CreateImageDiskDeviceMapping is a repeated param struct in CreateImageRequest @@ -120,6 +116,7 @@ func CreateCreateImageRequest() (request *CreateImageRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateImage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image_component.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image_component.go new file mode 100644 index 000000000..b585ab4c0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image_component.go @@ -0,0 +1,117 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateImageComponent invokes the ecs.CreateImageComponent API synchronously +func (client *Client) CreateImageComponent(request *CreateImageComponentRequest) (response *CreateImageComponentResponse, err error) { + response = CreateCreateImageComponentResponse() + err = client.DoAction(request, response) + return +} + +// CreateImageComponentWithChan invokes the ecs.CreateImageComponent API asynchronously +func (client *Client) CreateImageComponentWithChan(request *CreateImageComponentRequest) (<-chan *CreateImageComponentResponse, <-chan error) { + responseChan := make(chan *CreateImageComponentResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateImageComponent(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateImageComponentWithCallback invokes the ecs.CreateImageComponent API asynchronously +func (client *Client) CreateImageComponentWithCallback(request *CreateImageComponentRequest, callback func(response *CreateImageComponentResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateImageComponentResponse + var err error + defer close(result) + response, err = client.CreateImageComponent(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateImageComponentRequest is the request struct for api CreateImageComponent +type CreateImageComponentRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + SystemType string `position:"Query" name:"SystemType"` + Content string `position:"Query" name:"Content"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + Tag *[]CreateImageComponentTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ComponentType string `position:"Query" name:"ComponentType"` + Name string `position:"Query" name:"Name"` +} + +// CreateImageComponentTag is a repeated param struct in CreateImageComponentRequest +type CreateImageComponentTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// CreateImageComponentResponse is the response struct for api CreateImageComponent +type CreateImageComponentResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ImageComponentId string `json:"ImageComponentId" xml:"ImageComponentId"` +} + +// CreateCreateImageComponentRequest creates a request to invoke CreateImageComponent API +func CreateCreateImageComponentRequest() (request *CreateImageComponentRequest) { + request = &CreateImageComponentRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateImageComponent", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateImageComponentResponse creates a response to parse from CreateImageComponent response +func CreateCreateImageComponentResponse() (response *CreateImageComponentResponse) { + response = &CreateImageComponentResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image_pipeline.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image_pipeline.go new file mode 100644 index 000000000..73c8a8d66 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_image_pipeline.go @@ -0,0 +1,125 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateImagePipeline invokes the ecs.CreateImagePipeline API synchronously +func (client *Client) CreateImagePipeline(request *CreateImagePipelineRequest) (response *CreateImagePipelineResponse, err error) { + response = CreateCreateImagePipelineResponse() + err = client.DoAction(request, response) + return +} + +// CreateImagePipelineWithChan invokes the ecs.CreateImagePipeline API asynchronously +func (client *Client) CreateImagePipelineWithChan(request *CreateImagePipelineRequest) (<-chan *CreateImagePipelineResponse, <-chan error) { + responseChan := make(chan *CreateImagePipelineResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateImagePipeline(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateImagePipelineWithCallback invokes the ecs.CreateImagePipeline API asynchronously +func (client *Client) CreateImagePipelineWithCallback(request *CreateImagePipelineRequest, callback func(response *CreateImagePipelineResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateImagePipelineResponse + var err error + defer close(result) + response, err = client.CreateImagePipeline(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateImagePipelineRequest is the request struct for api CreateImagePipeline +type CreateImagePipelineRequest struct { + *requests.RpcRequest + BaseImageType string `position:"Query" name:"BaseImageType"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + ToRegionId *[]string `position:"Query" name:"ToRegionId" type:"Repeated"` + InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` + Description string `position:"Query" name:"Description"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + ImageName string `position:"Query" name:"ImageName"` + SystemDiskSize requests.Integer `position:"Query" name:"SystemDiskSize"` + InstanceType string `position:"Query" name:"InstanceType"` + Tag *[]CreateImagePipelineTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + BaseImage string `position:"Query" name:"BaseImage"` + VSwitchId string `position:"Query" name:"VSwitchId"` + AddAccount *[]string `position:"Query" name:"AddAccount" type:"Repeated"` + DeleteInstanceOnFailure requests.Boolean `position:"Query" name:"DeleteInstanceOnFailure"` + Name string `position:"Query" name:"Name"` + BuildContent string `position:"Query" name:"BuildContent"` +} + +// CreateImagePipelineTag is a repeated param struct in CreateImagePipelineRequest +type CreateImagePipelineTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// CreateImagePipelineResponse is the response struct for api CreateImagePipeline +type CreateImagePipelineResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ImagePipelineId string `json:"ImagePipelineId" xml:"ImagePipelineId"` +} + +// CreateCreateImagePipelineRequest creates a request to invoke CreateImagePipeline API +func CreateCreateImagePipelineRequest() (request *CreateImagePipelineRequest) { + request = &CreateImagePipelineRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateImagePipeline", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateImagePipelineResponse creates a response to parse from CreateImagePipeline response +func CreateCreateImagePipelineResponse() (response *CreateImagePipelineResponse) { + response = &CreateImagePipelineResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_instance.go index 6f491407b..94bbc794f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_instance.go @@ -21,7 +21,6 @@ import ( ) // CreateInstance invokes the ecs.CreateInstance API synchronously -// api document: https://help.aliyun.com/api/ecs/createinstance.html func (client *Client) CreateInstance(request *CreateInstanceRequest) (response *CreateInstanceResponse, err error) { response = CreateCreateInstanceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateInstance(request *CreateInstanceRequest) (response * } // CreateInstanceWithChan invokes the ecs.CreateInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/createinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateInstanceWithChan(request *CreateInstanceRequest) (<-chan *CreateInstanceResponse, <-chan error) { responseChan := make(chan *CreateInstanceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateInstanceWithChan(request *CreateInstanceRequest) (<- } // CreateInstanceWithCallback invokes the ecs.CreateInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/createinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateInstanceWithCallback(request *CreateInstanceRequest, callback func(response *CreateInstanceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,59 +71,73 @@ func (client *Client) CreateInstanceWithCallback(request *CreateInstanceRequest, // CreateInstanceRequest is the request struct for api CreateInstance type CreateInstanceRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - HpcClusterId string `position:"Query" name:"HpcClusterId"` - SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` - KeyPairName string `position:"Query" name:"KeyPairName"` - SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` - DeletionProtection requests.Boolean `position:"Query" name:"DeletionProtection"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - HostName string `position:"Query" name:"HostName"` - Password string `position:"Query" name:"Password"` - Tag *[]CreateInstanceTag `position:"Query" name:"Tag" type:"Repeated"` - AutoRenewPeriod requests.Integer `position:"Query" name:"AutoRenewPeriod"` - NodeControllerId string `position:"Query" name:"NodeControllerId"` - Period requests.Integer `position:"Query" name:"Period"` - DryRun requests.Boolean `position:"Query" name:"DryRun"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - CapacityReservationPreference string `position:"Query" name:"CapacityReservationPreference"` - VSwitchId string `position:"Query" name:"VSwitchId"` - PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` - SpotStrategy string `position:"Query" name:"SpotStrategy"` - PeriodUnit string `position:"Query" name:"PeriodUnit"` - InstanceName string `position:"Query" name:"InstanceName"` - AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` - InternetChargeType string `position:"Query" name:"InternetChargeType"` - ZoneId string `position:"Query" name:"ZoneId"` - InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` - UseAdditionalService requests.Boolean `position:"Query" name:"UseAdditionalService"` - ImageId string `position:"Query" name:"ImageId"` - ClientToken string `position:"Query" name:"ClientToken"` - VlanId string `position:"Query" name:"VlanId"` - SpotInterruptionBehavior string `position:"Query" name:"SpotInterruptionBehavior"` - IoOptimized string `position:"Query" name:"IoOptimized"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` - Description string `position:"Query" name:"Description"` - SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` - CapacityReservationId string `position:"Query" name:"CapacityReservationId"` - UserData string `position:"Query" name:"UserData"` - PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` - InstanceType string `position:"Query" name:"InstanceType"` - Arn *[]CreateInstanceArn `position:"Query" name:"Arn" type:"Repeated"` - InstanceChargeType string `position:"Query" name:"InstanceChargeType"` - DeploymentSetId string `position:"Query" name:"DeploymentSetId"` - InnerIpAddress string `position:"Query" name:"InnerIpAddress"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - SystemDiskDiskName string `position:"Query" name:"SystemDisk.DiskName"` - RamRoleName string `position:"Query" name:"RamRoleName"` - DedicatedHostId string `position:"Query" name:"DedicatedHostId"` - ClusterId string `position:"Query" name:"ClusterId"` - CreditSpecification string `position:"Query" name:"CreditSpecification"` - DataDisk *[]CreateInstanceDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` - SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` - SystemDiskDescription string `position:"Query" name:"SystemDisk.Description"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + HpcClusterId string `position:"Query" name:"HpcClusterId"` + HttpPutResponseHopLimit requests.Integer `position:"Query" name:"HttpPutResponseHopLimit"` + SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` + KeyPairName string `position:"Query" name:"KeyPairName"` + SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` + DeletionProtection requests.Boolean `position:"Query" name:"DeletionProtection"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + PrivatePoolOptionsMatchCriteria string `position:"Query" name:"PrivatePoolOptions.MatchCriteria"` + HostName string `position:"Query" name:"HostName"` + Password string `position:"Query" name:"Password"` + DeploymentSetGroupNo requests.Integer `position:"Query" name:"DeploymentSetGroupNo"` + StorageSetPartitionNumber requests.Integer `position:"Query" name:"StorageSetPartitionNumber"` + Tag *[]CreateInstanceTag `position:"Query" name:"Tag" type:"Repeated"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + AutoRenewPeriod requests.Integer `position:"Query" name:"AutoRenewPeriod"` + NodeControllerId string `position:"Query" name:"NodeControllerId"` + Period requests.Integer `position:"Query" name:"Period"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + CapacityReservationPreference string `position:"Query" name:"CapacityReservationPreference"` + VSwitchId string `position:"Query" name:"VSwitchId"` + PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` + SpotStrategy string `position:"Query" name:"SpotStrategy"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + InstanceName string `position:"Query" name:"InstanceName"` + AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` + InternetChargeType string `position:"Query" name:"InternetChargeType"` + ZoneId string `position:"Query" name:"ZoneId"` + InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` + UseAdditionalService requests.Boolean `position:"Query" name:"UseAdditionalService"` + Affinity string `position:"Query" name:"Affinity"` + ImageId string `position:"Query" name:"ImageId"` + ClientToken string `position:"Query" name:"ClientToken"` + VlanId string `position:"Query" name:"VlanId"` + SpotInterruptionBehavior string `position:"Query" name:"SpotInterruptionBehavior"` + IoOptimized string `position:"Query" name:"IoOptimized"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` + HibernationOptionsConfigured requests.Boolean `position:"Query" name:"HibernationOptions.Configured"` + Description string `position:"Query" name:"Description"` + SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` + CapacityReservationId string `position:"Query" name:"CapacityReservationId"` + SystemDiskPerformanceLevel string `position:"Query" name:"SystemDisk.PerformanceLevel"` + UserData string `position:"Query" name:"UserData"` + PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` + HttpEndpoint string `position:"Query" name:"HttpEndpoint"` + InstanceType string `position:"Query" name:"InstanceType"` + Arn *[]CreateInstanceArn `position:"Query" name:"Arn" type:"Repeated"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + DeploymentSetId string `position:"Query" name:"DeploymentSetId"` + InnerIpAddress string `position:"Query" name:"InnerIpAddress"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + Tenancy string `position:"Query" name:"Tenancy"` + SystemDiskDiskName string `position:"Query" name:"SystemDisk.DiskName"` + RamRoleName string `position:"Query" name:"RamRoleName"` + DedicatedHostId string `position:"Query" name:"DedicatedHostId"` + ClusterId string `position:"Query" name:"ClusterId"` + CreditSpecification string `position:"Query" name:"CreditSpecification"` + SpotDuration requests.Integer `position:"Query" name:"SpotDuration"` + DataDisk *[]CreateInstanceDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` + StorageSetId string `position:"Query" name:"StorageSetId"` + SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` + ImageFamily string `position:"Query" name:"ImageFamily"` + HttpTokens string `position:"Query" name:"HttpTokens"` + SystemDiskDescription string `position:"Query" name:"SystemDisk.Description"` } // CreateInstanceTag is a repeated param struct in CreateInstanceRequest @@ -150,6 +159,8 @@ type CreateInstanceDataDisk struct { SnapshotId string `name:"SnapshotId"` Size string `name:"Size"` Encrypted string `name:"Encrypted"` + PerformanceLevel string `name:"PerformanceLevel"` + EncryptAlgorithm string `name:"EncryptAlgorithm"` Description string `name:"Description"` Category string `name:"Category"` KMSKeyId string `name:"KMSKeyId"` @@ -160,8 +171,10 @@ type CreateInstanceDataDisk struct { // CreateInstanceResponse is the response struct for api CreateInstance type CreateInstanceResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + TradePrice float64 `json:"TradePrice" xml:"TradePrice"` + OrderId string `json:"OrderId" xml:"OrderId"` } // CreateCreateInstanceRequest creates a request to invoke CreateInstance API @@ -170,6 +183,7 @@ func CreateCreateInstanceRequest() (request *CreateInstanceRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateInstance", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_key_pair.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_key_pair.go index 8625aa504..810202d4e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_key_pair.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_key_pair.go @@ -21,7 +21,6 @@ import ( ) // CreateKeyPair invokes the ecs.CreateKeyPair API synchronously -// api document: https://help.aliyun.com/api/ecs/createkeypair.html func (client *Client) CreateKeyPair(request *CreateKeyPairRequest) (response *CreateKeyPairResponse, err error) { response = CreateCreateKeyPairResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateKeyPair(request *CreateKeyPairRequest) (response *Cr } // CreateKeyPairWithChan invokes the ecs.CreateKeyPair API asynchronously -// api document: https://help.aliyun.com/api/ecs/createkeypair.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateKeyPairWithChan(request *CreateKeyPairRequest) (<-chan *CreateKeyPairResponse, <-chan error) { responseChan := make(chan *CreateKeyPairResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateKeyPairWithChan(request *CreateKeyPairRequest) (<-ch } // CreateKeyPairWithCallback invokes the ecs.CreateKeyPair API asynchronously -// api document: https://help.aliyun.com/api/ecs/createkeypair.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateKeyPairWithCallback(request *CreateKeyPairRequest, callback func(response *CreateKeyPairResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,11 +71,11 @@ func (client *Client) CreateKeyPairWithCallback(request *CreateKeyPairRequest, c // CreateKeyPairRequest is the request struct for api CreateKeyPair type CreateKeyPairRequest struct { *requests.RpcRequest - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` KeyPairName string `position:"Query" name:"KeyPairName"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` Tag *[]CreateKeyPairTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -106,6 +101,7 @@ func CreateCreateKeyPairRequest() (request *CreateKeyPairRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateKeyPair", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_launch_template.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_launch_template.go index bcc3fdcbb..e82c7cf8f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_launch_template.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_launch_template.go @@ -21,7 +21,6 @@ import ( ) // CreateLaunchTemplate invokes the ecs.CreateLaunchTemplate API synchronously -// api document: https://help.aliyun.com/api/ecs/createlaunchtemplate.html func (client *Client) CreateLaunchTemplate(request *CreateLaunchTemplateRequest) (response *CreateLaunchTemplateResponse, err error) { response = CreateCreateLaunchTemplateResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateLaunchTemplate(request *CreateLaunchTemplateRequest) } // CreateLaunchTemplateWithChan invokes the ecs.CreateLaunchTemplate API asynchronously -// api document: https://help.aliyun.com/api/ecs/createlaunchtemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateLaunchTemplateWithChan(request *CreateLaunchTemplateRequest) (<-chan *CreateLaunchTemplateResponse, <-chan error) { responseChan := make(chan *CreateLaunchTemplateResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateLaunchTemplateWithChan(request *CreateLaunchTemplate } // CreateLaunchTemplateWithCallback invokes the ecs.CreateLaunchTemplate API asynchronously -// api document: https://help.aliyun.com/api/ecs/createlaunchtemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateLaunchTemplateWithCallback(request *CreateLaunchTemplateRequest, callback func(response *CreateLaunchTemplateResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,50 +71,55 @@ func (client *Client) CreateLaunchTemplateWithCallback(request *CreateLaunchTemp // CreateLaunchTemplateRequest is the request struct for api CreateLaunchTemplate type CreateLaunchTemplateRequest struct { *requests.RpcRequest - LaunchTemplateName string `position:"Query" name:"LaunchTemplateName"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` - NetworkType string `position:"Query" name:"NetworkType"` - KeyPairName string `position:"Query" name:"KeyPairName"` - SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` - ImageOwnerAlias string `position:"Query" name:"ImageOwnerAlias"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - HostName string `position:"Query" name:"HostName"` - SystemDiskIops requests.Integer `position:"Query" name:"SystemDisk.Iops"` - TemplateTag *[]CreateLaunchTemplateTemplateTag `position:"Query" name:"TemplateTag" type:"Repeated"` - Tag *[]CreateLaunchTemplateTag `position:"Query" name:"Tag" type:"Repeated"` - Period requests.Integer `position:"Query" name:"Period"` - TemplateResourceGroupId string `position:"Query" name:"TemplateResourceGroupId"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - VSwitchId string `position:"Query" name:"VSwitchId"` - SpotStrategy string `position:"Query" name:"SpotStrategy"` - InstanceName string `position:"Query" name:"InstanceName"` - InternetChargeType string `position:"Query" name:"InternetChargeType"` - ZoneId string `position:"Query" name:"ZoneId"` - InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` - VersionDescription string `position:"Query" name:"VersionDescription"` - ImageId string `position:"Query" name:"ImageId"` - IoOptimized string `position:"Query" name:"IoOptimized"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` - Description string `position:"Query" name:"Description"` - SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` - UserData string `position:"Query" name:"UserData"` - PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` - InstanceType string `position:"Query" name:"InstanceType"` - InstanceChargeType string `position:"Query" name:"InstanceChargeType"` - EnableVmOsConfig requests.Boolean `position:"Query" name:"EnableVmOsConfig"` - NetworkInterface *[]CreateLaunchTemplateNetworkInterface `position:"Query" name:"NetworkInterface" type:"Repeated"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - SystemDiskDiskName string `position:"Query" name:"SystemDisk.DiskName"` - RamRoleName string `position:"Query" name:"RamRoleName"` - AutoReleaseTime string `position:"Query" name:"AutoReleaseTime"` - SpotDuration requests.Integer `position:"Query" name:"SpotDuration"` - DataDisk *[]CreateLaunchTemplateDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` - SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` - VpcId string `position:"Query" name:"VpcId"` - SystemDiskDescription string `position:"Query" name:"SystemDisk.Description"` + LaunchTemplateName string `position:"Query" name:"LaunchTemplateName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` + NetworkType string `position:"Query" name:"NetworkType"` + KeyPairName string `position:"Query" name:"KeyPairName"` + SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` + ImageOwnerAlias string `position:"Query" name:"ImageOwnerAlias"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + HostName string `position:"Query" name:"HostName"` + SystemDiskIops requests.Integer `position:"Query" name:"SystemDisk.Iops"` + TemplateTag *[]CreateLaunchTemplateTemplateTag `position:"Query" name:"TemplateTag" type:"Repeated"` + Tag *[]CreateLaunchTemplateTag `position:"Query" name:"Tag" type:"Repeated"` + Period requests.Integer `position:"Query" name:"Period"` + TemplateResourceGroupId string `position:"Query" name:"TemplateResourceGroupId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` + SpotStrategy string `position:"Query" name:"SpotStrategy"` + PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` + InstanceName string `position:"Query" name:"InstanceName"` + InternetChargeType string `position:"Query" name:"InternetChargeType"` + ZoneId string `position:"Query" name:"ZoneId"` + InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` + VersionDescription string `position:"Query" name:"VersionDescription"` + SystemDiskDeleteWithInstance requests.Boolean `position:"Query" name:"SystemDisk.DeleteWithInstance"` + ImageId string `position:"Query" name:"ImageId"` + IoOptimized string `position:"Query" name:"IoOptimized"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` + Description string `position:"Query" name:"Description"` + SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` + SystemDiskPerformanceLevel string `position:"Query" name:"SystemDisk.PerformanceLevel"` + UserData string `position:"Query" name:"UserData"` + PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` + InstanceType string `position:"Query" name:"InstanceType"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + EnableVmOsConfig requests.Boolean `position:"Query" name:"EnableVmOsConfig"` + NetworkInterface *[]CreateLaunchTemplateNetworkInterface `position:"Query" name:"NetworkInterface" type:"Repeated"` + DeploymentSetId string `position:"Query" name:"DeploymentSetId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + SystemDiskDiskName string `position:"Query" name:"SystemDisk.DiskName"` + RamRoleName string `position:"Query" name:"RamRoleName"` + AutoReleaseTime string `position:"Query" name:"AutoReleaseTime"` + SpotDuration requests.Integer `position:"Query" name:"SpotDuration"` + SecurityGroupIds *[]string `position:"Query" name:"SecurityGroupIds" type:"Repeated"` + DataDisk *[]CreateLaunchTemplateDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` + SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` + VpcId string `position:"Query" name:"VpcId"` + SystemDiskDescription string `position:"Query" name:"SystemDisk.Description"` } // CreateLaunchTemplateTemplateTag is a repeated param struct in CreateLaunchTemplateRequest @@ -136,11 +136,12 @@ type CreateLaunchTemplateTag struct { // CreateLaunchTemplateNetworkInterface is a repeated param struct in CreateLaunchTemplateRequest type CreateLaunchTemplateNetworkInterface struct { - PrimaryIpAddress string `name:"PrimaryIpAddress"` - VSwitchId string `name:"VSwitchId"` - SecurityGroupId string `name:"SecurityGroupId"` - NetworkInterfaceName string `name:"NetworkInterfaceName"` - Description string `name:"Description"` + PrimaryIpAddress string `name:"PrimaryIpAddress"` + VSwitchId string `name:"VSwitchId"` + SecurityGroupId string `name:"SecurityGroupId"` + NetworkInterfaceName string `name:"NetworkInterfaceName"` + Description string `name:"Description"` + SecurityGroupIds *[]string `name:"SecurityGroupIds" type:"Repeated"` } // CreateLaunchTemplateDataDisk is a repeated param struct in CreateLaunchTemplateRequest @@ -153,6 +154,7 @@ type CreateLaunchTemplateDataDisk struct { Description string `name:"Description"` DeleteWithInstance string `name:"DeleteWithInstance"` Device string `name:"Device"` + PerformanceLevel string `name:"PerformanceLevel"` } // CreateLaunchTemplateResponse is the response struct for api CreateLaunchTemplate @@ -168,6 +170,7 @@ func CreateCreateLaunchTemplateRequest() (request *CreateLaunchTemplateRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateLaunchTemplate", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_launch_template_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_launch_template_version.go index fcab7d749..49e083e93 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_launch_template_version.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_launch_template_version.go @@ -21,7 +21,6 @@ import ( ) // CreateLaunchTemplateVersion invokes the ecs.CreateLaunchTemplateVersion API synchronously -// api document: https://help.aliyun.com/api/ecs/createlaunchtemplateversion.html func (client *Client) CreateLaunchTemplateVersion(request *CreateLaunchTemplateVersionRequest) (response *CreateLaunchTemplateVersionResponse, err error) { response = CreateCreateLaunchTemplateVersionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateLaunchTemplateVersion(request *CreateLaunchTemplateV } // CreateLaunchTemplateVersionWithChan invokes the ecs.CreateLaunchTemplateVersion API asynchronously -// api document: https://help.aliyun.com/api/ecs/createlaunchtemplateversion.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateLaunchTemplateVersionWithChan(request *CreateLaunchTemplateVersionRequest) (<-chan *CreateLaunchTemplateVersionResponse, <-chan error) { responseChan := make(chan *CreateLaunchTemplateVersionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateLaunchTemplateVersionWithChan(request *CreateLaunchT } // CreateLaunchTemplateVersionWithCallback invokes the ecs.CreateLaunchTemplateVersion API asynchronously -// api document: https://help.aliyun.com/api/ecs/createlaunchtemplateversion.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateLaunchTemplateVersionWithCallback(request *CreateLaunchTemplateVersionRequest, callback func(response *CreateLaunchTemplateVersionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,49 +71,54 @@ func (client *Client) CreateLaunchTemplateVersionWithCallback(request *CreateLau // CreateLaunchTemplateVersionRequest is the request struct for api CreateLaunchTemplateVersion type CreateLaunchTemplateVersionRequest struct { *requests.RpcRequest - LaunchTemplateName string `position:"Query" name:"LaunchTemplateName"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` - NetworkType string `position:"Query" name:"NetworkType"` - KeyPairName string `position:"Query" name:"KeyPairName"` - SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` - ImageOwnerAlias string `position:"Query" name:"ImageOwnerAlias"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - HostName string `position:"Query" name:"HostName"` - SystemDiskIops requests.Integer `position:"Query" name:"SystemDisk.Iops"` - Tag *[]CreateLaunchTemplateVersionTag `position:"Query" name:"Tag" type:"Repeated"` - Period requests.Integer `position:"Query" name:"Period"` - LaunchTemplateId string `position:"Query" name:"LaunchTemplateId"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - VSwitchId string `position:"Query" name:"VSwitchId"` - SpotStrategy string `position:"Query" name:"SpotStrategy"` - InstanceName string `position:"Query" name:"InstanceName"` - InternetChargeType string `position:"Query" name:"InternetChargeType"` - ZoneId string `position:"Query" name:"ZoneId"` - InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` - VersionDescription string `position:"Query" name:"VersionDescription"` - ImageId string `position:"Query" name:"ImageId"` - IoOptimized string `position:"Query" name:"IoOptimized"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` - Description string `position:"Query" name:"Description"` - SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` - UserData string `position:"Query" name:"UserData"` - PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` - InstanceType string `position:"Query" name:"InstanceType"` - InstanceChargeType string `position:"Query" name:"InstanceChargeType"` - EnableVmOsConfig requests.Boolean `position:"Query" name:"EnableVmOsConfig"` - NetworkInterface *[]CreateLaunchTemplateVersionNetworkInterface `position:"Query" name:"NetworkInterface" type:"Repeated"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - SystemDiskDiskName string `position:"Query" name:"SystemDisk.DiskName"` - RamRoleName string `position:"Query" name:"RamRoleName"` - AutoReleaseTime string `position:"Query" name:"AutoReleaseTime"` - SpotDuration requests.Integer `position:"Query" name:"SpotDuration"` - DataDisk *[]CreateLaunchTemplateVersionDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` - SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` - VpcId string `position:"Query" name:"VpcId"` - SystemDiskDescription string `position:"Query" name:"SystemDisk.Description"` + LaunchTemplateName string `position:"Query" name:"LaunchTemplateName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` + NetworkType string `position:"Query" name:"NetworkType"` + KeyPairName string `position:"Query" name:"KeyPairName"` + SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` + ImageOwnerAlias string `position:"Query" name:"ImageOwnerAlias"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + HostName string `position:"Query" name:"HostName"` + SystemDiskIops requests.Integer `position:"Query" name:"SystemDisk.Iops"` + Tag *[]CreateLaunchTemplateVersionTag `position:"Query" name:"Tag" type:"Repeated"` + Period requests.Integer `position:"Query" name:"Period"` + LaunchTemplateId string `position:"Query" name:"LaunchTemplateId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` + SpotStrategy string `position:"Query" name:"SpotStrategy"` + PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` + InstanceName string `position:"Query" name:"InstanceName"` + InternetChargeType string `position:"Query" name:"InternetChargeType"` + ZoneId string `position:"Query" name:"ZoneId"` + InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` + VersionDescription string `position:"Query" name:"VersionDescription"` + SystemDiskDeleteWithInstance requests.Boolean `position:"Query" name:"SystemDisk.DeleteWithInstance"` + ImageId string `position:"Query" name:"ImageId"` + IoOptimized string `position:"Query" name:"IoOptimized"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` + Description string `position:"Query" name:"Description"` + SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` + SystemDiskPerformanceLevel string `position:"Query" name:"SystemDisk.PerformanceLevel"` + UserData string `position:"Query" name:"UserData"` + PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` + InstanceType string `position:"Query" name:"InstanceType"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + EnableVmOsConfig requests.Boolean `position:"Query" name:"EnableVmOsConfig"` + NetworkInterface *[]CreateLaunchTemplateVersionNetworkInterface `position:"Query" name:"NetworkInterface" type:"Repeated"` + DeploymentSetId string `position:"Query" name:"DeploymentSetId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + SystemDiskDiskName string `position:"Query" name:"SystemDisk.DiskName"` + RamRoleName string `position:"Query" name:"RamRoleName"` + AutoReleaseTime string `position:"Query" name:"AutoReleaseTime"` + SpotDuration requests.Integer `position:"Query" name:"SpotDuration"` + SecurityGroupIds *[]string `position:"Query" name:"SecurityGroupIds" type:"Repeated"` + DataDisk *[]CreateLaunchTemplateVersionDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` + SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` + VpcId string `position:"Query" name:"VpcId"` + SystemDiskDescription string `position:"Query" name:"SystemDisk.Description"` } // CreateLaunchTemplateVersionTag is a repeated param struct in CreateLaunchTemplateVersionRequest @@ -129,11 +129,12 @@ type CreateLaunchTemplateVersionTag struct { // CreateLaunchTemplateVersionNetworkInterface is a repeated param struct in CreateLaunchTemplateVersionRequest type CreateLaunchTemplateVersionNetworkInterface struct { - PrimaryIpAddress string `name:"PrimaryIpAddress"` - VSwitchId string `name:"VSwitchId"` - SecurityGroupId string `name:"SecurityGroupId"` - NetworkInterfaceName string `name:"NetworkInterfaceName"` - Description string `name:"Description"` + PrimaryIpAddress string `name:"PrimaryIpAddress"` + VSwitchId string `name:"VSwitchId"` + SecurityGroupId string `name:"SecurityGroupId"` + NetworkInterfaceName string `name:"NetworkInterfaceName"` + Description string `name:"Description"` + SecurityGroupIds *[]string `name:"SecurityGroupIds" type:"Repeated"` } // CreateLaunchTemplateVersionDataDisk is a repeated param struct in CreateLaunchTemplateVersionRequest @@ -146,13 +147,14 @@ type CreateLaunchTemplateVersionDataDisk struct { Description string `name:"Description"` DeleteWithInstance string `name:"DeleteWithInstance"` Device string `name:"Device"` + PerformanceLevel string `name:"PerformanceLevel"` } // CreateLaunchTemplateVersionResponse is the response struct for api CreateLaunchTemplateVersion type CreateLaunchTemplateVersionResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` - LaunchTemplateVersionNumber int `json:"LaunchTemplateVersionNumber" xml:"LaunchTemplateVersionNumber"` + LaunchTemplateVersionNumber int64 `json:"LaunchTemplateVersionNumber" xml:"LaunchTemplateVersionNumber"` } // CreateCreateLaunchTemplateVersionRequest creates a request to invoke CreateLaunchTemplateVersion API @@ -161,6 +163,7 @@ func CreateCreateLaunchTemplateVersionRequest() (request *CreateLaunchTemplateVe RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateLaunchTemplateVersion", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_nat_gateway.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_nat_gateway.go index 764af7bdb..35f8d8e88 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_nat_gateway.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_nat_gateway.go @@ -21,7 +21,6 @@ import ( ) // CreateNatGateway invokes the ecs.CreateNatGateway API synchronously -// api document: https://help.aliyun.com/api/ecs/createnatgateway.html func (client *Client) CreateNatGateway(request *CreateNatGatewayRequest) (response *CreateNatGatewayResponse, err error) { response = CreateCreateNatGatewayResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateNatGateway(request *CreateNatGatewayRequest) (respon } // CreateNatGatewayWithChan invokes the ecs.CreateNatGateway API asynchronously -// api document: https://help.aliyun.com/api/ecs/createnatgateway.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateNatGatewayWithChan(request *CreateNatGatewayRequest) (<-chan *CreateNatGatewayResponse, <-chan error) { responseChan := make(chan *CreateNatGatewayResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateNatGatewayWithChan(request *CreateNatGatewayRequest) } // CreateNatGatewayWithCallback invokes the ecs.CreateNatGateway API asynchronously -// api document: https://help.aliyun.com/api/ecs/createnatgateway.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateNatGatewayWithCallback(request *CreateNatGatewayRequest, callback func(response *CreateNatGatewayResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,14 +72,14 @@ func (client *Client) CreateNatGatewayWithCallback(request *CreateNatGatewayRequ type CreateNatGatewayRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + BandwidthPackage *[]CreateNatGatewayBandwidthPackage `position:"Query" name:"BandwidthPackage" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` VpcId string `position:"Query" name:"VpcId"` Name string `position:"Query" name:"Name"` - Description string `position:"Query" name:"Description"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - BandwidthPackage *[]CreateNatGatewayBandwidthPackage `position:"Query" name:"BandwidthPackage" type:"Repeated"` } // CreateNatGatewayBandwidthPackage is a repeated param struct in CreateNatGatewayRequest @@ -109,6 +104,7 @@ func CreateCreateNatGatewayRequest() (request *CreateNatGatewayRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateNatGateway", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_network_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_network_interface.go index 45784bd78..26e63e08a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_network_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_network_interface.go @@ -21,7 +21,6 @@ import ( ) // CreateNetworkInterface invokes the ecs.CreateNetworkInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/createnetworkinterface.html func (client *Client) CreateNetworkInterface(request *CreateNetworkInterfaceRequest) (response *CreateNetworkInterfaceResponse, err error) { response = CreateCreateNetworkInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateNetworkInterface(request *CreateNetworkInterfaceRequ } // CreateNetworkInterfaceWithChan invokes the ecs.CreateNetworkInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/createnetworkinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateNetworkInterfaceWithChan(request *CreateNetworkInterfaceRequest) (<-chan *CreateNetworkInterfaceResponse, <-chan error) { responseChan := make(chan *CreateNetworkInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateNetworkInterfaceWithChan(request *CreateNetworkInter } // CreateNetworkInterfaceWithCallback invokes the ecs.CreateNetworkInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/createnetworkinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateNetworkInterfaceWithCallback(request *CreateNetworkInterfaceRequest, callback func(response *CreateNetworkInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,20 +71,25 @@ func (client *Client) CreateNetworkInterfaceWithCallback(request *CreateNetworkI // CreateNetworkInterfaceRequest is the request struct for api CreateNetworkInterface type CreateNetworkInterfaceRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ClientToken string `position:"Query" name:"ClientToken"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - Description string `position:"Query" name:"Description"` - BusinessType string `position:"Query" name:"BusinessType"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - Tag *[]CreateNetworkInterfaceTag `position:"Query" name:"Tag" type:"Repeated"` - NetworkInterfaceName string `position:"Query" name:"NetworkInterfaceName"` - Visible requests.Boolean `position:"Query" name:"Visible"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - VSwitchId string `position:"Query" name:"VSwitchId"` - PrimaryIpAddress string `position:"Query" name:"PrimaryIpAddress"` + QueueNumber requests.Integer `position:"Query" name:"QueueNumber"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + Description string `position:"Query" name:"Description"` + SecondaryPrivateIpAddressCount requests.Integer `position:"Query" name:"SecondaryPrivateIpAddressCount"` + BusinessType string `position:"Query" name:"BusinessType"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + InstanceType string `position:"Query" name:"InstanceType"` + Tag *[]CreateNetworkInterfaceTag `position:"Query" name:"Tag" type:"Repeated"` + NetworkInterfaceName string `position:"Query" name:"NetworkInterfaceName"` + Visible requests.Boolean `position:"Query" name:"Visible"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SecurityGroupIds *[]string `position:"Query" name:"SecurityGroupIds" type:"Repeated"` + VSwitchId string `position:"Query" name:"VSwitchId"` + PrivateIpAddress *[]string `position:"Query" name:"PrivateIpAddress" type:"Repeated"` + PrimaryIpAddress string `position:"Query" name:"PrimaryIpAddress"` } // CreateNetworkInterfaceTag is a repeated param struct in CreateNetworkInterfaceRequest @@ -101,8 +101,24 @@ type CreateNetworkInterfaceTag struct { // CreateNetworkInterfaceResponse is the response struct for api CreateNetworkInterface type CreateNetworkInterfaceResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - NetworkInterfaceId string `json:"NetworkInterfaceId" xml:"NetworkInterfaceId"` + RequestId string `json:"RequestId" xml:"RequestId"` + NetworkInterfaceId string `json:"NetworkInterfaceId" xml:"NetworkInterfaceId"` + Status string `json:"Status" xml:"Status"` + Type string `json:"Type" xml:"Type"` + VpcId string `json:"VpcId" xml:"VpcId"` + VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + PrivateIpAddress string `json:"PrivateIpAddress" xml:"PrivateIpAddress"` + MacAddress string `json:"MacAddress" xml:"MacAddress"` + NetworkInterfaceName string `json:"NetworkInterfaceName" xml:"NetworkInterfaceName"` + Description string `json:"Description" xml:"Description"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + ServiceID int64 `json:"ServiceID" xml:"ServiceID"` + ServiceManaged bool `json:"ServiceManaged" xml:"ServiceManaged"` + OwnerId string `json:"OwnerId" xml:"OwnerId"` + SecurityGroupIds SecurityGroupIdsInCreateNetworkInterface `json:"SecurityGroupIds" xml:"SecurityGroupIds"` + PrivateIpSets PrivateIpSetsInCreateNetworkInterface `json:"PrivateIpSets" xml:"PrivateIpSets"` + Tags TagsInCreateNetworkInterface `json:"Tags" xml:"Tags"` } // CreateCreateNetworkInterfaceRequest creates a request to invoke CreateNetworkInterface API @@ -111,6 +127,7 @@ func CreateCreateNetworkInterfaceRequest() (request *CreateNetworkInterfaceReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateNetworkInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_network_interface_permission.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_network_interface_permission.go index 27e1e84a0..7f875a094 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_network_interface_permission.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_network_interface_permission.go @@ -21,7 +21,6 @@ import ( ) // CreateNetworkInterfacePermission invokes the ecs.CreateNetworkInterfacePermission API synchronously -// api document: https://help.aliyun.com/api/ecs/createnetworkinterfacepermission.html func (client *Client) CreateNetworkInterfacePermission(request *CreateNetworkInterfacePermissionRequest) (response *CreateNetworkInterfacePermissionResponse, err error) { response = CreateCreateNetworkInterfacePermissionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateNetworkInterfacePermission(request *CreateNetworkInt } // CreateNetworkInterfacePermissionWithChan invokes the ecs.CreateNetworkInterfacePermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/createnetworkinterfacepermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateNetworkInterfacePermissionWithChan(request *CreateNetworkInterfacePermissionRequest) (<-chan *CreateNetworkInterfacePermissionResponse, <-chan error) { responseChan := make(chan *CreateNetworkInterfacePermissionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateNetworkInterfacePermissionWithChan(request *CreateNe } // CreateNetworkInterfacePermissionWithCallback invokes the ecs.CreateNetworkInterfacePermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/createnetworkinterfacepermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateNetworkInterfacePermissionWithCallback(request *CreateNetworkInterfacePermissionRequest, callback func(response *CreateNetworkInterfacePermissionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -98,6 +93,7 @@ func CreateCreateNetworkInterfacePermissionRequest() (request *CreateNetworkInte RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateNetworkInterfacePermission", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_physical_connection.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_physical_connection.go index e160ca2d6..20e64c2d0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_physical_connection.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_physical_connection.go @@ -21,7 +21,6 @@ import ( ) // CreatePhysicalConnection invokes the ecs.CreatePhysicalConnection API synchronously -// api document: https://help.aliyun.com/api/ecs/createphysicalconnection.html func (client *Client) CreatePhysicalConnection(request *CreatePhysicalConnectionRequest) (response *CreatePhysicalConnectionResponse, err error) { response = CreateCreatePhysicalConnectionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreatePhysicalConnection(request *CreatePhysicalConnection } // CreatePhysicalConnectionWithChan invokes the ecs.CreatePhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/createphysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreatePhysicalConnectionWithChan(request *CreatePhysicalConnectionRequest) (<-chan *CreatePhysicalConnectionResponse, <-chan error) { responseChan := make(chan *CreatePhysicalConnectionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreatePhysicalConnectionWithChan(request *CreatePhysicalCo } // CreatePhysicalConnectionWithCallback invokes the ecs.CreatePhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/createphysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreatePhysicalConnectionWithCallback(request *CreatePhysicalConnectionRequest, callback func(response *CreatePhysicalConnectionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,21 +72,21 @@ func (client *Client) CreatePhysicalConnectionWithCallback(request *CreatePhysic type CreatePhysicalConnectionRequest struct { *requests.RpcRequest AccessPointId string `position:"Query" name:"AccessPointId"` - RedundantPhysicalConnectionId string `position:"Query" name:"RedundantPhysicalConnectionId"` - PeerLocation string `position:"Query" name:"PeerLocation"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` PortType string `position:"Query" name:"PortType"` CircuitCode string `position:"Query" name:"CircuitCode"` - Bandwidth requests.Integer `position:"Query" name:"bandwidth"` ClientToken string `position:"Query" name:"ClientToken"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` Type string `position:"Query" name:"Type"` + UserCidr string `position:"Query" name:"UserCidr"` + RedundantPhysicalConnectionId string `position:"Query" name:"RedundantPhysicalConnectionId"` + PeerLocation string `position:"Query" name:"PeerLocation"` + Bandwidth requests.Integer `position:"Query" name:"bandwidth"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` LineOperator string `position:"Query" name:"LineOperator"` Name string `position:"Query" name:"Name"` - UserCidr string `position:"Query" name:"UserCidr"` } // CreatePhysicalConnectionResponse is the response struct for api CreatePhysicalConnection @@ -107,6 +102,7 @@ func CreateCreatePhysicalConnectionRequest() (request *CreatePhysicalConnectionR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreatePhysicalConnection", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_route_entry.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_route_entry.go index c9dc38f1b..13855a762 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_route_entry.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_route_entry.go @@ -21,7 +21,6 @@ import ( ) // CreateRouteEntry invokes the ecs.CreateRouteEntry API synchronously -// api document: https://help.aliyun.com/api/ecs/createrouteentry.html func (client *Client) CreateRouteEntry(request *CreateRouteEntryRequest) (response *CreateRouteEntryResponse, err error) { response = CreateCreateRouteEntryResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateRouteEntry(request *CreateRouteEntryRequest) (respon } // CreateRouteEntryWithChan invokes the ecs.CreateRouteEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/createrouteentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateRouteEntryWithChan(request *CreateRouteEntryRequest) (<-chan *CreateRouteEntryResponse, <-chan error) { responseChan := make(chan *CreateRouteEntryResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateRouteEntryWithChan(request *CreateRouteEntryRequest) } // CreateRouteEntryWithCallback invokes the ecs.CreateRouteEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/createrouteentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateRouteEntryWithCallback(request *CreateRouteEntryRequest, callback func(response *CreateRouteEntryResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,15 +72,15 @@ func (client *Client) CreateRouteEntryWithCallback(request *CreateRouteEntryRequ type CreateRouteEntryRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` + NextHopId string `position:"Query" name:"NextHopId"` + NextHopType string `position:"Query" name:"NextHopType"` + RouteTableId string `position:"Query" name:"RouteTableId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` DestinationCidrBlock string `position:"Query" name:"DestinationCidrBlock"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - NextHopId string `position:"Query" name:"NextHopId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - NextHopType string `position:"Query" name:"NextHopType"` NextHopList *[]CreateRouteEntryNextHopList `position:"Query" name:"NextHopList" type:"Repeated"` - RouteTableId string `position:"Query" name:"RouteTableId"` } // CreateRouteEntryNextHopList is a repeated param struct in CreateRouteEntryRequest @@ -106,6 +101,7 @@ func CreateCreateRouteEntryRequest() (request *CreateRouteEntryRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateRouteEntry", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_router_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_router_interface.go index 5aef7f4f6..957bcdebc 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_router_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_router_interface.go @@ -21,7 +21,6 @@ import ( ) // CreateRouterInterface invokes the ecs.CreateRouterInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/createrouterinterface.html func (client *Client) CreateRouterInterface(request *CreateRouterInterfaceRequest) (response *CreateRouterInterfaceResponse, err error) { response = CreateCreateRouterInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateRouterInterface(request *CreateRouterInterfaceReques } // CreateRouterInterfaceWithChan invokes the ecs.CreateRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/createrouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateRouterInterfaceWithChan(request *CreateRouterInterfaceRequest) (<-chan *CreateRouterInterfaceResponse, <-chan error) { responseChan := make(chan *CreateRouterInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateRouterInterfaceWithChan(request *CreateRouterInterfa } // CreateRouterInterfaceWithCallback invokes the ecs.CreateRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/createrouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateRouterInterfaceWithCallback(request *CreateRouterInterfaceRequest, callback func(response *CreateRouterInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -108,7 +103,7 @@ type CreateRouterInterfaceResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` RouterInterfaceId string `json:"RouterInterfaceId" xml:"RouterInterfaceId"` - OrderId int `json:"OrderId" xml:"OrderId"` + OrderId int64 `json:"OrderId" xml:"OrderId"` } // CreateCreateRouterInterfaceRequest creates a request to invoke CreateRouterInterface API @@ -117,6 +112,7 @@ func CreateCreateRouterInterfaceRequest() (request *CreateRouterInterfaceRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateRouterInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_security_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_security_group.go index 5840defeb..214cce5a5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_security_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_security_group.go @@ -21,7 +21,6 @@ import ( ) // CreateSecurityGroup invokes the ecs.CreateSecurityGroup API synchronously -// api document: https://help.aliyun.com/api/ecs/createsecuritygroup.html func (client *Client) CreateSecurityGroup(request *CreateSecurityGroupRequest) (response *CreateSecurityGroupResponse, err error) { response = CreateCreateSecurityGroupResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateSecurityGroup(request *CreateSecurityGroupRequest) ( } // CreateSecurityGroupWithChan invokes the ecs.CreateSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/createsecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateSecurityGroupWithChan(request *CreateSecurityGroupRequest) (<-chan *CreateSecurityGroupResponse, <-chan error) { responseChan := make(chan *CreateSecurityGroupResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateSecurityGroupWithChan(request *CreateSecurityGroupRe } // CreateSecurityGroupWithCallback invokes the ecs.CreateSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/createsecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateSecurityGroupWithCallback(request *CreateSecurityGroupRequest, callback func(response *CreateSecurityGroupResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,15 +72,17 @@ func (client *Client) CreateSecurityGroupWithCallback(request *CreateSecurityGro type CreateSecurityGroupRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` + ServiceManaged requests.Boolean `position:"Query" name:"ServiceManaged"` Description string `position:"Query" name:"Description"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` SecurityGroupName string `position:"Query" name:"SecurityGroupName"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - VpcId string `position:"Query" name:"VpcId"` Tag *[]CreateSecurityGroupTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SecurityGroupType string `position:"Query" name:"SecurityGroupType"` + VpcId string `position:"Query" name:"VpcId"` } // CreateSecurityGroupTag is a repeated param struct in CreateSecurityGroupRequest @@ -107,6 +104,7 @@ func CreateCreateSecurityGroupRequest() (request *CreateSecurityGroupRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateSecurityGroup", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_simulated_system_events.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_simulated_system_events.go index 3ce185f9d..723fd6949 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_simulated_system_events.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_simulated_system_events.go @@ -21,7 +21,6 @@ import ( ) // CreateSimulatedSystemEvents invokes the ecs.CreateSimulatedSystemEvents API synchronously -// api document: https://help.aliyun.com/api/ecs/createsimulatedsystemevents.html func (client *Client) CreateSimulatedSystemEvents(request *CreateSimulatedSystemEventsRequest) (response *CreateSimulatedSystemEventsResponse, err error) { response = CreateCreateSimulatedSystemEventsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateSimulatedSystemEvents(request *CreateSimulatedSystem } // CreateSimulatedSystemEventsWithChan invokes the ecs.CreateSimulatedSystemEvents API asynchronously -// api document: https://help.aliyun.com/api/ecs/createsimulatedsystemevents.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateSimulatedSystemEventsWithChan(request *CreateSimulatedSystemEventsRequest) (<-chan *CreateSimulatedSystemEventsResponse, <-chan error) { responseChan := make(chan *CreateSimulatedSystemEventsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateSimulatedSystemEventsWithChan(request *CreateSimulat } // CreateSimulatedSystemEventsWithCallback invokes the ecs.CreateSimulatedSystemEvents API asynchronously -// api document: https://help.aliyun.com/api/ecs/createsimulatedsystemevents.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateSimulatedSystemEventsWithCallback(request *CreateSimulatedSystemEventsRequest, callback func(response *CreateSimulatedSystemEventsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -98,6 +93,7 @@ func CreateCreateSimulatedSystemEventsRequest() (request *CreateSimulatedSystemE RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateSimulatedSystemEvents", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_snapshot.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_snapshot.go index 210cfcbcf..c613e457a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_snapshot.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_snapshot.go @@ -21,7 +21,6 @@ import ( ) // CreateSnapshot invokes the ecs.CreateSnapshot API synchronously -// api document: https://help.aliyun.com/api/ecs/createsnapshot.html func (client *Client) CreateSnapshot(request *CreateSnapshotRequest) (response *CreateSnapshotResponse, err error) { response = CreateCreateSnapshotResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateSnapshot(request *CreateSnapshotRequest) (response * } // CreateSnapshotWithChan invokes the ecs.CreateSnapshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/createsnapshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateSnapshotWithChan(request *CreateSnapshotRequest) (<-chan *CreateSnapshotResponse, <-chan error) { responseChan := make(chan *CreateSnapshotResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateSnapshotWithChan(request *CreateSnapshotRequest) (<- } // CreateSnapshotWithCallback invokes the ecs.CreateSnapshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/createsnapshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateSnapshotWithCallback(request *CreateSnapshotRequest, callback func(response *CreateSnapshotResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,15 +71,20 @@ func (client *Client) CreateSnapshotWithCallback(request *CreateSnapshotRequest, // CreateSnapshotRequest is the request struct for api CreateSnapshot type CreateSnapshotRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - Description string `position:"Query" name:"Description"` - DiskId string `position:"Query" name:"DiskId"` - SnapshotName string `position:"Query" name:"SnapshotName"` - Tag *[]CreateSnapshotTag `position:"Query" name:"Tag" type:"Repeated"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + InstantAccess requests.Boolean `position:"Query" name:"InstantAccess"` + Description string `position:"Query" name:"Description"` + SnapshotName string `position:"Query" name:"SnapshotName"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + InstantAccessRetentionDays requests.Integer `position:"Query" name:"InstantAccessRetentionDays"` + DiskId string `position:"Query" name:"DiskId"` + Tag *[]CreateSnapshotTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + RetentionDays requests.Integer `position:"Query" name:"RetentionDays"` + Category string `position:"Query" name:"Category"` } // CreateSnapshotTag is a repeated param struct in CreateSnapshotRequest @@ -106,6 +106,7 @@ func CreateCreateSnapshotRequest() (request *CreateSnapshotRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateSnapshot", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_snapshot_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_snapshot_group.go new file mode 100644 index 000000000..7cf5e8eb1 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_snapshot_group.go @@ -0,0 +1,109 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateSnapshotGroup invokes the ecs.CreateSnapshotGroup API synchronously +func (client *Client) CreateSnapshotGroup(request *CreateSnapshotGroupRequest) (response *CreateSnapshotGroupResponse, err error) { + response = CreateCreateSnapshotGroupResponse() + err = client.DoAction(request, response) + return +} + +// CreateSnapshotGroupWithChan invokes the ecs.CreateSnapshotGroup API asynchronously +func (client *Client) CreateSnapshotGroupWithChan(request *CreateSnapshotGroupRequest) (<-chan *CreateSnapshotGroupResponse, <-chan error) { + responseChan := make(chan *CreateSnapshotGroupResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateSnapshotGroup(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateSnapshotGroupWithCallback invokes the ecs.CreateSnapshotGroup API asynchronously +func (client *Client) CreateSnapshotGroupWithCallback(request *CreateSnapshotGroupRequest, callback func(response *CreateSnapshotGroupResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateSnapshotGroupResponse + var err error + defer close(result) + response, err = client.CreateSnapshotGroup(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateSnapshotGroupRequest is the request struct for api CreateSnapshotGroup +type CreateSnapshotGroupRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ExcludeDiskId *[]string `position:"Query" name:"ExcludeDiskId" type:"Repeated"` + InstantAccess requests.Boolean `position:"Query" name:"InstantAccess"` + Description string `position:"Query" name:"Description"` + InstantAccessRetentionDays requests.Integer `position:"Query" name:"InstantAccessRetentionDays"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + Name string `position:"Query" name:"Name"` +} + +// CreateSnapshotGroupResponse is the response struct for api CreateSnapshotGroup +type CreateSnapshotGroupResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + SnapshotGroupId string `json:"SnapshotGroupId" xml:"SnapshotGroupId"` +} + +// CreateCreateSnapshotGroupRequest creates a request to invoke CreateSnapshotGroup API +func CreateCreateSnapshotGroupRequest() (request *CreateSnapshotGroupRequest) { + request = &CreateSnapshotGroupRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateSnapshotGroup", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateSnapshotGroupResponse creates a response to parse from CreateSnapshotGroup response +func CreateCreateSnapshotGroupResponse() (response *CreateSnapshotGroupResponse) { + response = &CreateSnapshotGroupResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_storage_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_storage_set.go new file mode 100644 index 000000000..73b4c2405 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_storage_set.go @@ -0,0 +1,108 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// CreateStorageSet invokes the ecs.CreateStorageSet API synchronously +func (client *Client) CreateStorageSet(request *CreateStorageSetRequest) (response *CreateStorageSetResponse, err error) { + response = CreateCreateStorageSetResponse() + err = client.DoAction(request, response) + return +} + +// CreateStorageSetWithChan invokes the ecs.CreateStorageSet API asynchronously +func (client *Client) CreateStorageSetWithChan(request *CreateStorageSetRequest) (<-chan *CreateStorageSetResponse, <-chan error) { + responseChan := make(chan *CreateStorageSetResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateStorageSet(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateStorageSetWithCallback invokes the ecs.CreateStorageSet API asynchronously +func (client *Client) CreateStorageSetWithCallback(request *CreateStorageSetRequest, callback func(response *CreateStorageSetResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateStorageSetResponse + var err error + defer close(result) + response, err = client.CreateStorageSet(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateStorageSetRequest is the request struct for api CreateStorageSet +type CreateStorageSetRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + MaxPartitionNumber requests.Integer `position:"Query" name:"MaxPartitionNumber"` + Description string `position:"Query" name:"Description"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ZoneId string `position:"Query" name:"ZoneId"` + StorageSetName string `position:"Query" name:"StorageSetName"` +} + +// CreateStorageSetResponse is the response struct for api CreateStorageSet +type CreateStorageSetResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + StorageSetId string `json:"StorageSetId" xml:"StorageSetId"` +} + +// CreateCreateStorageSetRequest creates a request to invoke CreateStorageSet API +func CreateCreateStorageSetRequest() (request *CreateStorageSetRequest) { + request = &CreateStorageSetRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "CreateStorageSet", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateStorageSetResponse creates a response to parse from CreateStorageSet response +func CreateCreateStorageSetResponse() (response *CreateStorageSetResponse) { + response = &CreateStorageSetResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_v_switch.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_v_switch.go index 718c1a54d..36ecd7b2e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_v_switch.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_v_switch.go @@ -21,7 +21,6 @@ import ( ) // CreateVSwitch invokes the ecs.CreateVSwitch API synchronously -// api document: https://help.aliyun.com/api/ecs/createvswitch.html func (client *Client) CreateVSwitch(request *CreateVSwitchRequest) (response *CreateVSwitchResponse, err error) { response = CreateCreateVSwitchResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateVSwitch(request *CreateVSwitchRequest) (response *Cr } // CreateVSwitchWithChan invokes the ecs.CreateVSwitch API asynchronously -// api document: https://help.aliyun.com/api/ecs/createvswitch.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateVSwitchWithChan(request *CreateVSwitchRequest) (<-chan *CreateVSwitchResponse, <-chan error) { responseChan := make(chan *CreateVSwitchResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateVSwitchWithChan(request *CreateVSwitchRequest) (<-ch } // CreateVSwitchWithCallback invokes the ecs.CreateVSwitch API asynchronously -// api document: https://help.aliyun.com/api/ecs/createvswitch.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateVSwitchWithCallback(request *CreateVSwitchRequest, callback func(response *CreateVSwitchResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,15 +72,15 @@ func (client *Client) CreateVSwitchWithCallback(request *CreateVSwitchRequest, c type CreateVSwitchRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` VpcId string `position:"Query" name:"VpcId"` VSwitchName string `position:"Query" name:"VSwitchName"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` CidrBlock string `position:"Query" name:"CidrBlock"` ZoneId string `position:"Query" name:"ZoneId"` - Description string `position:"Query" name:"Description"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` } // CreateVSwitchResponse is the response struct for api CreateVSwitch @@ -101,6 +96,7 @@ func CreateCreateVSwitchRequest() (request *CreateVSwitchRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateVSwitch", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_virtual_border_router.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_virtual_border_router.go index 887da2b7e..fe0bd2097 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_virtual_border_router.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_virtual_border_router.go @@ -21,7 +21,6 @@ import ( ) // CreateVirtualBorderRouter invokes the ecs.CreateVirtualBorderRouter API synchronously -// api document: https://help.aliyun.com/api/ecs/createvirtualborderrouter.html func (client *Client) CreateVirtualBorderRouter(request *CreateVirtualBorderRouterRequest) (response *CreateVirtualBorderRouterResponse, err error) { response = CreateCreateVirtualBorderRouterResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateVirtualBorderRouter(request *CreateVirtualBorderRout } // CreateVirtualBorderRouterWithChan invokes the ecs.CreateVirtualBorderRouter API asynchronously -// api document: https://help.aliyun.com/api/ecs/createvirtualborderrouter.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateVirtualBorderRouterWithChan(request *CreateVirtualBorderRouterRequest) (<-chan *CreateVirtualBorderRouterResponse, <-chan error) { responseChan := make(chan *CreateVirtualBorderRouterResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateVirtualBorderRouterWithChan(request *CreateVirtualBo } // CreateVirtualBorderRouterWithCallback invokes the ecs.CreateVirtualBorderRouter API asynchronously -// api document: https://help.aliyun.com/api/ecs/createvirtualborderrouter.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateVirtualBorderRouterWithCallback(request *CreateVirtualBorderRouterRequest, callback func(response *CreateVirtualBorderRouterResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -80,16 +75,16 @@ type CreateVirtualBorderRouterRequest struct { CircuitCode string `position:"Query" name:"CircuitCode"` VlanId requests.Integer `position:"Query" name:"VlanId"` ClientToken string `position:"Query" name:"ClientToken"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PeerGatewayIp string `position:"Query" name:"PeerGatewayIp"` PeeringSubnetMask string `position:"Query" name:"PeeringSubnetMask"` - PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` - Name string `position:"Query" name:"Name"` LocalGatewayIp string `position:"Query" name:"LocalGatewayIp"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` + Name string `position:"Query" name:"Name"` VbrOwnerId requests.Integer `position:"Query" name:"VbrOwnerId"` } @@ -106,6 +101,7 @@ func CreateCreateVirtualBorderRouterRequest() (request *CreateVirtualBorderRoute RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateVirtualBorderRouter", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_vpc.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_vpc.go index 25eefd74e..12c6d879d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_vpc.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/create_vpc.go @@ -21,7 +21,6 @@ import ( ) // CreateVpc invokes the ecs.CreateVpc API synchronously -// api document: https://help.aliyun.com/api/ecs/createvpc.html func (client *Client) CreateVpc(request *CreateVpcRequest) (response *CreateVpcResponse, err error) { response = CreateCreateVpcResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) CreateVpc(request *CreateVpcRequest) (response *CreateVpcR } // CreateVpcWithChan invokes the ecs.CreateVpc API asynchronously -// api document: https://help.aliyun.com/api/ecs/createvpc.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateVpcWithChan(request *CreateVpcRequest) (<-chan *CreateVpcResponse, <-chan error) { responseChan := make(chan *CreateVpcResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) CreateVpcWithChan(request *CreateVpcRequest) (<-chan *Crea } // CreateVpcWithCallback invokes the ecs.CreateVpc API asynchronously -// api document: https://help.aliyun.com/api/ecs/createvpc.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) CreateVpcWithCallback(request *CreateVpcRequest, callback func(response *CreateVpcResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,15 +71,15 @@ func (client *Client) CreateVpcWithCallback(request *CreateVpcRequest, callback // CreateVpcRequest is the request struct for api CreateVpc type CreateVpcRequest struct { *requests.RpcRequest - VpcName string `position:"Query" name:"VpcName"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - CidrBlock string `position:"Query" name:"CidrBlock"` Description string `position:"Query" name:"Description"` + VpcName string `position:"Query" name:"VpcName"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + CidrBlock string `position:"Query" name:"CidrBlock"` } // CreateVpcResponse is the response struct for api CreateVpc @@ -102,6 +97,7 @@ func CreateCreateVpcRequest() (request *CreateVpcRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "CreateVpc", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/deactivate_router_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/deactivate_router_interface.go index 4652f3adc..67a7b7042 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/deactivate_router_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/deactivate_router_interface.go @@ -21,7 +21,6 @@ import ( ) // DeactivateRouterInterface invokes the ecs.DeactivateRouterInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/deactivaterouterinterface.html func (client *Client) DeactivateRouterInterface(request *DeactivateRouterInterfaceRequest) (response *DeactivateRouterInterfaceResponse, err error) { response = CreateDeactivateRouterInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeactivateRouterInterface(request *DeactivateRouterInterfa } // DeactivateRouterInterfaceWithChan invokes the ecs.DeactivateRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/deactivaterouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeactivateRouterInterfaceWithChan(request *DeactivateRouterInterfaceRequest) (<-chan *DeactivateRouterInterfaceResponse, <-chan error) { responseChan := make(chan *DeactivateRouterInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeactivateRouterInterfaceWithChan(request *DeactivateRoute } // DeactivateRouterInterfaceWithCallback invokes the ecs.DeactivateRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/deactivaterouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeactivateRouterInterfaceWithCallback(request *DeactivateRouterInterfaceRequest, callback func(response *DeactivateRouterInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -94,6 +89,7 @@ func CreateDeactivateRouterInterfaceRequest() (request *DeactivateRouterInterfac RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeactivateRouterInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_activation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_activation.go new file mode 100644 index 000000000..950137966 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_activation.go @@ -0,0 +1,104 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteActivation invokes the ecs.DeleteActivation API synchronously +func (client *Client) DeleteActivation(request *DeleteActivationRequest) (response *DeleteActivationResponse, err error) { + response = CreateDeleteActivationResponse() + err = client.DoAction(request, response) + return +} + +// DeleteActivationWithChan invokes the ecs.DeleteActivation API asynchronously +func (client *Client) DeleteActivationWithChan(request *DeleteActivationRequest) (<-chan *DeleteActivationResponse, <-chan error) { + responseChan := make(chan *DeleteActivationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteActivation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteActivationWithCallback invokes the ecs.DeleteActivation API asynchronously +func (client *Client) DeleteActivationWithCallback(request *DeleteActivationRequest, callback func(response *DeleteActivationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteActivationResponse + var err error + defer close(result) + response, err = client.DeleteActivation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteActivationRequest is the request struct for api DeleteActivation +type DeleteActivationRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ActivationId string `position:"Query" name:"ActivationId"` +} + +// DeleteActivationResponse is the response struct for api DeleteActivation +type DeleteActivationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Activation Activation `json:"Activation" xml:"Activation"` +} + +// CreateDeleteActivationRequest creates a request to invoke DeleteActivation API +func CreateDeleteActivationRequest() (request *DeleteActivationRequest) { + request = &DeleteActivationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteActivation", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteActivationResponse creates a response to parse from DeleteActivation response +func CreateDeleteActivationResponse() (response *DeleteActivationResponse) { + response = &DeleteActivationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_auto_provisioning_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_auto_provisioning_group.go new file mode 100644 index 000000000..802a39fcc --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_auto_provisioning_group.go @@ -0,0 +1,104 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteAutoProvisioningGroup invokes the ecs.DeleteAutoProvisioningGroup API synchronously +func (client *Client) DeleteAutoProvisioningGroup(request *DeleteAutoProvisioningGroupRequest) (response *DeleteAutoProvisioningGroupResponse, err error) { + response = CreateDeleteAutoProvisioningGroupResponse() + err = client.DoAction(request, response) + return +} + +// DeleteAutoProvisioningGroupWithChan invokes the ecs.DeleteAutoProvisioningGroup API asynchronously +func (client *Client) DeleteAutoProvisioningGroupWithChan(request *DeleteAutoProvisioningGroupRequest) (<-chan *DeleteAutoProvisioningGroupResponse, <-chan error) { + responseChan := make(chan *DeleteAutoProvisioningGroupResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteAutoProvisioningGroup(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteAutoProvisioningGroupWithCallback invokes the ecs.DeleteAutoProvisioningGroup API asynchronously +func (client *Client) DeleteAutoProvisioningGroupWithCallback(request *DeleteAutoProvisioningGroupRequest, callback func(response *DeleteAutoProvisioningGroupResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteAutoProvisioningGroupResponse + var err error + defer close(result) + response, err = client.DeleteAutoProvisioningGroup(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteAutoProvisioningGroupRequest is the request struct for api DeleteAutoProvisioningGroup +type DeleteAutoProvisioningGroupRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + TerminateInstances requests.Boolean `position:"Query" name:"TerminateInstances"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AutoProvisioningGroupId string `position:"Query" name:"AutoProvisioningGroupId"` +} + +// DeleteAutoProvisioningGroupResponse is the response struct for api DeleteAutoProvisioningGroup +type DeleteAutoProvisioningGroupResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteAutoProvisioningGroupRequest creates a request to invoke DeleteAutoProvisioningGroup API +func CreateDeleteAutoProvisioningGroupRequest() (request *DeleteAutoProvisioningGroupRequest) { + request = &DeleteAutoProvisioningGroupRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteAutoProvisioningGroup", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteAutoProvisioningGroupResponse creates a response to parse from DeleteAutoProvisioningGroup response +func CreateDeleteAutoProvisioningGroupResponse() (response *DeleteAutoProvisioningGroupResponse) { + response = &DeleteAutoProvisioningGroupResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_auto_snapshot_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_auto_snapshot_policy.go index 17ced5d6b..ae0ce916b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_auto_snapshot_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_auto_snapshot_policy.go @@ -21,7 +21,6 @@ import ( ) // DeleteAutoSnapshotPolicy invokes the ecs.DeleteAutoSnapshotPolicy API synchronously -// api document: https://help.aliyun.com/api/ecs/deleteautosnapshotpolicy.html func (client *Client) DeleteAutoSnapshotPolicy(request *DeleteAutoSnapshotPolicyRequest) (response *DeleteAutoSnapshotPolicyResponse, err error) { response = CreateDeleteAutoSnapshotPolicyResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteAutoSnapshotPolicy(request *DeleteAutoSnapshotPolicy } // DeleteAutoSnapshotPolicyWithChan invokes the ecs.DeleteAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleteautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteAutoSnapshotPolicyWithChan(request *DeleteAutoSnapshotPolicyRequest) (<-chan *DeleteAutoSnapshotPolicyResponse, <-chan error) { responseChan := make(chan *DeleteAutoSnapshotPolicyResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteAutoSnapshotPolicyWithChan(request *DeleteAutoSnapsh } // DeleteAutoSnapshotPolicyWithCallback invokes the ecs.DeleteAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleteautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteAutoSnapshotPolicyWithCallback(request *DeleteAutoSnapshotPolicyRequest, callback func(response *DeleteAutoSnapshotPolicyResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,8 +72,8 @@ func (client *Client) DeleteAutoSnapshotPolicyWithCallback(request *DeleteAutoSn type DeleteAutoSnapshotPolicyRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` AutoSnapshotPolicyId string `position:"Query" name:"autoSnapshotPolicyId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -94,6 +89,7 @@ func CreateDeleteAutoSnapshotPolicyRequest() (request *DeleteAutoSnapshotPolicyR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteAutoSnapshotPolicy", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_bandwidth_package.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_bandwidth_package.go index 1e91f61d0..e8fe71e71 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_bandwidth_package.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_bandwidth_package.go @@ -21,7 +21,6 @@ import ( ) // DeleteBandwidthPackage invokes the ecs.DeleteBandwidthPackage API synchronously -// api document: https://help.aliyun.com/api/ecs/deletebandwidthpackage.html func (client *Client) DeleteBandwidthPackage(request *DeleteBandwidthPackageRequest) (response *DeleteBandwidthPackageResponse, err error) { response = CreateDeleteBandwidthPackageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteBandwidthPackage(request *DeleteBandwidthPackageRequ } // DeleteBandwidthPackageWithChan invokes the ecs.DeleteBandwidthPackage API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletebandwidthpackage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteBandwidthPackageWithChan(request *DeleteBandwidthPackageRequest) (<-chan *DeleteBandwidthPackageResponse, <-chan error) { responseChan := make(chan *DeleteBandwidthPackageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteBandwidthPackageWithChan(request *DeleteBandwidthPac } // DeleteBandwidthPackageWithCallback invokes the ecs.DeleteBandwidthPackage API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletebandwidthpackage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteBandwidthPackageWithCallback(request *DeleteBandwidthPackageRequest, callback func(response *DeleteBandwidthPackageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateDeleteBandwidthPackageRequest() (request *DeleteBandwidthPackageReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteBandwidthPackage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_command.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_command.go index 4bdf6e66f..5c21c67d2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_command.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_command.go @@ -21,7 +21,6 @@ import ( ) // DeleteCommand invokes the ecs.DeleteCommand API synchronously -// api document: https://help.aliyun.com/api/ecs/deletecommand.html func (client *Client) DeleteCommand(request *DeleteCommandRequest) (response *DeleteCommandResponse, err error) { response = CreateDeleteCommandResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteCommand(request *DeleteCommandRequest) (response *De } // DeleteCommandWithChan invokes the ecs.DeleteCommand API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletecommand.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteCommandWithChan(request *DeleteCommandRequest) (<-chan *DeleteCommandResponse, <-chan error) { responseChan := make(chan *DeleteCommandResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteCommandWithChan(request *DeleteCommandRequest) (<-ch } // DeleteCommandWithCallback invokes the ecs.DeleteCommand API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletecommand.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteCommandWithCallback(request *DeleteCommandRequest, callback func(response *DeleteCommandResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateDeleteCommandRequest() (request *DeleteCommandRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteCommand", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_dedicated_host_cluster.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_dedicated_host_cluster.go new file mode 100644 index 000000000..bbe22e02f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_dedicated_host_cluster.go @@ -0,0 +1,103 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteDedicatedHostCluster invokes the ecs.DeleteDedicatedHostCluster API synchronously +func (client *Client) DeleteDedicatedHostCluster(request *DeleteDedicatedHostClusterRequest) (response *DeleteDedicatedHostClusterResponse, err error) { + response = CreateDeleteDedicatedHostClusterResponse() + err = client.DoAction(request, response) + return +} + +// DeleteDedicatedHostClusterWithChan invokes the ecs.DeleteDedicatedHostCluster API asynchronously +func (client *Client) DeleteDedicatedHostClusterWithChan(request *DeleteDedicatedHostClusterRequest) (<-chan *DeleteDedicatedHostClusterResponse, <-chan error) { + responseChan := make(chan *DeleteDedicatedHostClusterResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteDedicatedHostCluster(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteDedicatedHostClusterWithCallback invokes the ecs.DeleteDedicatedHostCluster API asynchronously +func (client *Client) DeleteDedicatedHostClusterWithCallback(request *DeleteDedicatedHostClusterRequest, callback func(response *DeleteDedicatedHostClusterResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteDedicatedHostClusterResponse + var err error + defer close(result) + response, err = client.DeleteDedicatedHostCluster(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteDedicatedHostClusterRequest is the request struct for api DeleteDedicatedHostCluster +type DeleteDedicatedHostClusterRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + DedicatedHostClusterId string `position:"Query" name:"DedicatedHostClusterId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// DeleteDedicatedHostClusterResponse is the response struct for api DeleteDedicatedHostCluster +type DeleteDedicatedHostClusterResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteDedicatedHostClusterRequest creates a request to invoke DeleteDedicatedHostCluster API +func CreateDeleteDedicatedHostClusterRequest() (request *DeleteDedicatedHostClusterRequest) { + request = &DeleteDedicatedHostClusterRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteDedicatedHostCluster", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteDedicatedHostClusterResponse creates a response to parse from DeleteDedicatedHostCluster response +func CreateDeleteDedicatedHostClusterResponse() (response *DeleteDedicatedHostClusterResponse) { + response = &DeleteDedicatedHostClusterResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_demand.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_demand.go new file mode 100644 index 000000000..83f21b08d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_demand.go @@ -0,0 +1,105 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteDemand invokes the ecs.DeleteDemand API synchronously +func (client *Client) DeleteDemand(request *DeleteDemandRequest) (response *DeleteDemandResponse, err error) { + response = CreateDeleteDemandResponse() + err = client.DoAction(request, response) + return +} + +// DeleteDemandWithChan invokes the ecs.DeleteDemand API asynchronously +func (client *Client) DeleteDemandWithChan(request *DeleteDemandRequest) (<-chan *DeleteDemandResponse, <-chan error) { + responseChan := make(chan *DeleteDemandResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteDemand(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteDemandWithCallback invokes the ecs.DeleteDemand API asynchronously +func (client *Client) DeleteDemandWithCallback(request *DeleteDemandRequest, callback func(response *DeleteDemandResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteDemandResponse + var err error + defer close(result) + response, err = client.DeleteDemand(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteDemandRequest is the request struct for api DeleteDemand +type DeleteDemandRequest struct { + *requests.RpcRequest + Reason string `position:"Query" name:"Reason"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + DemandId string `position:"Query" name:"DemandId"` +} + +// DeleteDemandResponse is the response struct for api DeleteDemand +type DeleteDemandResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteDemandRequest creates a request to invoke DeleteDemand API +func CreateDeleteDemandRequest() (request *DeleteDemandRequest) { + request = &DeleteDemandRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteDemand", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteDemandResponse creates a response to parse from DeleteDemand response +func CreateDeleteDemandResponse() (response *DeleteDemandResponse) { + response = &DeleteDemandResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_deployment_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_deployment_set.go index 7cdfab37d..97ab915f4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_deployment_set.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_deployment_set.go @@ -21,7 +21,6 @@ import ( ) // DeleteDeploymentSet invokes the ecs.DeleteDeploymentSet API synchronously -// api document: https://help.aliyun.com/api/ecs/deletedeploymentset.html func (client *Client) DeleteDeploymentSet(request *DeleteDeploymentSetRequest) (response *DeleteDeploymentSetResponse, err error) { response = CreateDeleteDeploymentSetResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteDeploymentSet(request *DeleteDeploymentSetRequest) ( } // DeleteDeploymentSetWithChan invokes the ecs.DeleteDeploymentSet API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletedeploymentset.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteDeploymentSetWithChan(request *DeleteDeploymentSetRequest) (<-chan *DeleteDeploymentSetResponse, <-chan error) { responseChan := make(chan *DeleteDeploymentSetResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteDeploymentSetWithChan(request *DeleteDeploymentSetRe } // DeleteDeploymentSetWithCallback invokes the ecs.DeleteDeploymentSet API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletedeploymentset.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteDeploymentSetWithCallback(request *DeleteDeploymentSetRequest, callback func(response *DeleteDeploymentSetResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,8 +71,8 @@ func (client *Client) DeleteDeploymentSetWithCallback(request *DeleteDeploymentS // DeleteDeploymentSetRequest is the request struct for api DeleteDeploymentSet type DeleteDeploymentSetRequest struct { *requests.RpcRequest - DeploymentSetId string `position:"Query" name:"DeploymentSetId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + DeploymentSetId string `position:"Query" name:"DeploymentSetId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` @@ -95,6 +90,7 @@ func CreateDeleteDeploymentSetRequest() (request *DeleteDeploymentSetRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteDeploymentSet", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_disk.go index 06e62e8f0..c82b59451 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_disk.go @@ -21,7 +21,6 @@ import ( ) // DeleteDisk invokes the ecs.DeleteDisk API synchronously -// api document: https://help.aliyun.com/api/ecs/deletedisk.html func (client *Client) DeleteDisk(request *DeleteDiskRequest) (response *DeleteDiskResponse, err error) { response = CreateDeleteDiskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteDisk(request *DeleteDiskRequest) (response *DeleteDi } // DeleteDiskWithChan invokes the ecs.DeleteDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletedisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteDiskWithChan(request *DeleteDiskRequest) (<-chan *DeleteDiskResponse, <-chan error) { responseChan := make(chan *DeleteDiskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteDiskWithChan(request *DeleteDiskRequest) (<-chan *De } // DeleteDiskWithCallback invokes the ecs.DeleteDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletedisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteDiskWithCallback(request *DeleteDiskRequest, callback func(response *DeleteDiskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) DeleteDiskWithCallback(request *DeleteDiskRequest, callbac type DeleteDiskRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + DiskId string `position:"Query" name:"DiskId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - DiskId string `position:"Query" name:"DiskId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -95,6 +90,7 @@ func CreateDeleteDiskRequest() (request *DeleteDiskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteDisk", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_forward_entry.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_forward_entry.go index 6d6a27055..9c884c83b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_forward_entry.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_forward_entry.go @@ -21,7 +21,6 @@ import ( ) // DeleteForwardEntry invokes the ecs.DeleteForwardEntry API synchronously -// api document: https://help.aliyun.com/api/ecs/deleteforwardentry.html func (client *Client) DeleteForwardEntry(request *DeleteForwardEntryRequest) (response *DeleteForwardEntryResponse, err error) { response = CreateDeleteForwardEntryResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteForwardEntry(request *DeleteForwardEntryRequest) (re } // DeleteForwardEntryWithChan invokes the ecs.DeleteForwardEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleteforwardentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteForwardEntryWithChan(request *DeleteForwardEntryRequest) (<-chan *DeleteForwardEntryResponse, <-chan error) { responseChan := make(chan *DeleteForwardEntryResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteForwardEntryWithChan(request *DeleteForwardEntryRequ } // DeleteForwardEntryWithCallback invokes the ecs.DeleteForwardEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleteforwardentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteForwardEntryWithCallback(request *DeleteForwardEntryRequest, callback func(response *DeleteForwardEntryResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) DeleteForwardEntryWithCallback(request *DeleteForwardEntry type DeleteForwardEntryRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ForwardEntryId string `position:"Query" name:"ForwardEntryId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` ForwardTableId string `position:"Query" name:"ForwardTableId"` + ForwardEntryId string `position:"Query" name:"ForwardEntryId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -96,6 +91,7 @@ func CreateDeleteForwardEntryRequest() (request *DeleteForwardEntryRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteForwardEntry", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_ha_vip.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_ha_vip.go index e09fcb869..1c3c77b85 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_ha_vip.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_ha_vip.go @@ -21,7 +21,6 @@ import ( ) // DeleteHaVip invokes the ecs.DeleteHaVip API synchronously -// api document: https://help.aliyun.com/api/ecs/deletehavip.html func (client *Client) DeleteHaVip(request *DeleteHaVipRequest) (response *DeleteHaVipResponse, err error) { response = CreateDeleteHaVipResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteHaVip(request *DeleteHaVipRequest) (response *Delete } // DeleteHaVipWithChan invokes the ecs.DeleteHaVip API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletehavip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteHaVipWithChan(request *DeleteHaVipRequest) (<-chan *DeleteHaVipResponse, <-chan error) { responseChan := make(chan *DeleteHaVipResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteHaVipWithChan(request *DeleteHaVipRequest) (<-chan * } // DeleteHaVipWithCallback invokes the ecs.DeleteHaVip API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletehavip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteHaVipWithCallback(request *DeleteHaVipRequest, callback func(response *DeleteHaVipResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,10 +71,10 @@ func (client *Client) DeleteHaVipWithCallback(request *DeleteHaVipRequest, callb // DeleteHaVipRequest is the request struct for api DeleteHaVip type DeleteHaVipRequest struct { *requests.RpcRequest - HaVipId string `position:"Query" name:"HaVipId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` + HaVipId string `position:"Query" name:"HaVipId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -96,6 +91,7 @@ func CreateDeleteHaVipRequest() (request *DeleteHaVipRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteHaVip", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_hpc_cluster.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_hpc_cluster.go index 50394a5de..1557121e7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_hpc_cluster.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_hpc_cluster.go @@ -21,7 +21,6 @@ import ( ) // DeleteHpcCluster invokes the ecs.DeleteHpcCluster API synchronously -// api document: https://help.aliyun.com/api/ecs/deletehpccluster.html func (client *Client) DeleteHpcCluster(request *DeleteHpcClusterRequest) (response *DeleteHpcClusterResponse, err error) { response = CreateDeleteHpcClusterResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteHpcCluster(request *DeleteHpcClusterRequest) (respon } // DeleteHpcClusterWithChan invokes the ecs.DeleteHpcCluster API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletehpccluster.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteHpcClusterWithChan(request *DeleteHpcClusterRequest) (<-chan *DeleteHpcClusterResponse, <-chan error) { responseChan := make(chan *DeleteHpcClusterResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteHpcClusterWithChan(request *DeleteHpcClusterRequest) } // DeleteHpcClusterWithCallback invokes the ecs.DeleteHpcCluster API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletehpccluster.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteHpcClusterWithCallback(request *DeleteHpcClusterRequest, callback func(response *DeleteHpcClusterResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateDeleteHpcClusterRequest() (request *DeleteHpcClusterRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteHpcCluster", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image.go index 37196a59b..31bfebd11 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image.go @@ -21,7 +21,6 @@ import ( ) // DeleteImage invokes the ecs.DeleteImage API synchronously -// api document: https://help.aliyun.com/api/ecs/deleteimage.html func (client *Client) DeleteImage(request *DeleteImageRequest) (response *DeleteImageResponse, err error) { response = CreateDeleteImageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteImage(request *DeleteImageRequest) (response *Delete } // DeleteImageWithChan invokes the ecs.DeleteImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleteimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteImageWithChan(request *DeleteImageRequest) (<-chan *DeleteImageResponse, <-chan error) { responseChan := make(chan *DeleteImageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteImageWithChan(request *DeleteImageRequest) (<-chan * } // DeleteImageWithCallback invokes the ecs.DeleteImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleteimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteImageWithCallback(request *DeleteImageRequest, callback func(response *DeleteImageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -80,8 +75,8 @@ type DeleteImageRequest struct { ImageId string `position:"Query" name:"ImageId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - Force requests.Boolean `position:"Query" name:"Force"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Force requests.Boolean `position:"Query" name:"Force"` } // DeleteImageResponse is the response struct for api DeleteImage @@ -96,6 +91,7 @@ func CreateDeleteImageRequest() (request *DeleteImageRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteImage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image_component.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image_component.go new file mode 100644 index 000000000..d977633c2 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image_component.go @@ -0,0 +1,110 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteImageComponent invokes the ecs.DeleteImageComponent API synchronously +func (client *Client) DeleteImageComponent(request *DeleteImageComponentRequest) (response *DeleteImageComponentResponse, err error) { + response = CreateDeleteImageComponentResponse() + err = client.DoAction(request, response) + return +} + +// DeleteImageComponentWithChan invokes the ecs.DeleteImageComponent API asynchronously +func (client *Client) DeleteImageComponentWithChan(request *DeleteImageComponentRequest) (<-chan *DeleteImageComponentResponse, <-chan error) { + responseChan := make(chan *DeleteImageComponentResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteImageComponent(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteImageComponentWithCallback invokes the ecs.DeleteImageComponent API asynchronously +func (client *Client) DeleteImageComponentWithCallback(request *DeleteImageComponentRequest, callback func(response *DeleteImageComponentResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteImageComponentResponse + var err error + defer close(result) + response, err = client.DeleteImageComponent(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteImageComponentRequest is the request struct for api DeleteImageComponent +type DeleteImageComponentRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ImageComponentId string `position:"Query" name:"ImageComponentId"` + TemplateTag *[]DeleteImageComponentTemplateTag `position:"Query" name:"TemplateTag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// DeleteImageComponentTemplateTag is a repeated param struct in DeleteImageComponentRequest +type DeleteImageComponentTemplateTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DeleteImageComponentResponse is the response struct for api DeleteImageComponent +type DeleteImageComponentResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteImageComponentRequest creates a request to invoke DeleteImageComponent API +func CreateDeleteImageComponentRequest() (request *DeleteImageComponentRequest) { + request = &DeleteImageComponentRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteImageComponent", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteImageComponentResponse creates a response to parse from DeleteImageComponent response +func CreateDeleteImageComponentResponse() (response *DeleteImageComponentResponse) { + response = &DeleteImageComponentResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image_pipeline.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image_pipeline.go new file mode 100644 index 000000000..29a98fb7c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_image_pipeline.go @@ -0,0 +1,110 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteImagePipeline invokes the ecs.DeleteImagePipeline API synchronously +func (client *Client) DeleteImagePipeline(request *DeleteImagePipelineRequest) (response *DeleteImagePipelineResponse, err error) { + response = CreateDeleteImagePipelineResponse() + err = client.DoAction(request, response) + return +} + +// DeleteImagePipelineWithChan invokes the ecs.DeleteImagePipeline API asynchronously +func (client *Client) DeleteImagePipelineWithChan(request *DeleteImagePipelineRequest) (<-chan *DeleteImagePipelineResponse, <-chan error) { + responseChan := make(chan *DeleteImagePipelineResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteImagePipeline(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteImagePipelineWithCallback invokes the ecs.DeleteImagePipeline API asynchronously +func (client *Client) DeleteImagePipelineWithCallback(request *DeleteImagePipelineRequest, callback func(response *DeleteImagePipelineResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteImagePipelineResponse + var err error + defer close(result) + response, err = client.DeleteImagePipeline(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteImagePipelineRequest is the request struct for api DeleteImagePipeline +type DeleteImagePipelineRequest struct { + *requests.RpcRequest + ImagePipelineId string `position:"Query" name:"ImagePipelineId"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + TemplateTag *[]DeleteImagePipelineTemplateTag `position:"Query" name:"TemplateTag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// DeleteImagePipelineTemplateTag is a repeated param struct in DeleteImagePipelineRequest +type DeleteImagePipelineTemplateTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DeleteImagePipelineResponse is the response struct for api DeleteImagePipeline +type DeleteImagePipelineResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteImagePipelineRequest creates a request to invoke DeleteImagePipeline API +func CreateDeleteImagePipelineRequest() (request *DeleteImagePipelineRequest) { + request = &DeleteImagePipelineRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteImagePipeline", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteImagePipelineResponse creates a response to parse from DeleteImagePipeline response +func CreateDeleteImagePipelineResponse() (response *DeleteImagePipelineResponse) { + response = &DeleteImagePipelineResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_instance.go index c761400cc..3d91efe1e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_instance.go @@ -21,7 +21,6 @@ import ( ) // DeleteInstance invokes the ecs.DeleteInstance API synchronously -// api document: https://help.aliyun.com/api/ecs/deleteinstance.html func (client *Client) DeleteInstance(request *DeleteInstanceRequest) (response *DeleteInstanceResponse, err error) { response = CreateDeleteInstanceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteInstance(request *DeleteInstanceRequest) (response * } // DeleteInstanceWithChan invokes the ecs.DeleteInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleteinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteInstanceWithChan(request *DeleteInstanceRequest) (<-chan *DeleteInstanceResponse, <-chan error) { responseChan := make(chan *DeleteInstanceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteInstanceWithChan(request *DeleteInstanceRequest) (<- } // DeleteInstanceWithCallback invokes the ecs.DeleteInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleteinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteInstanceWithCallback(request *DeleteInstanceRequest, callback func(response *DeleteInstanceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) DeleteInstanceWithCallback(request *DeleteInstanceRequest, type DeleteInstanceRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + TerminateSubscription requests.Boolean `position:"Query" name:"TerminateSubscription"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - TerminateSubscription requests.Boolean `position:"Query" name:"TerminateSubscription"` - Force requests.Boolean `position:"Query" name:"Force"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + Force requests.Boolean `position:"Query" name:"Force"` } // DeleteInstanceResponse is the response struct for api DeleteInstance @@ -97,6 +92,7 @@ func CreateDeleteInstanceRequest() (request *DeleteInstanceRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteInstance", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_instances.go new file mode 100644 index 000000000..2cab32531 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_instances.go @@ -0,0 +1,107 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteInstances invokes the ecs.DeleteInstances API synchronously +func (client *Client) DeleteInstances(request *DeleteInstancesRequest) (response *DeleteInstancesResponse, err error) { + response = CreateDeleteInstancesResponse() + err = client.DoAction(request, response) + return +} + +// DeleteInstancesWithChan invokes the ecs.DeleteInstances API asynchronously +func (client *Client) DeleteInstancesWithChan(request *DeleteInstancesRequest) (<-chan *DeleteInstancesResponse, <-chan error) { + responseChan := make(chan *DeleteInstancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteInstances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteInstancesWithCallback invokes the ecs.DeleteInstances API asynchronously +func (client *Client) DeleteInstancesWithCallback(request *DeleteInstancesRequest, callback func(response *DeleteInstancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteInstancesResponse + var err error + defer close(result) + response, err = client.DeleteInstances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteInstancesRequest is the request struct for api DeleteInstances +type DeleteInstancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + TerminateSubscription requests.Boolean `position:"Query" name:"TerminateSubscription"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + Force requests.Boolean `position:"Query" name:"Force"` +} + +// DeleteInstancesResponse is the response struct for api DeleteInstances +type DeleteInstancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteInstancesRequest creates a request to invoke DeleteInstances API +func CreateDeleteInstancesRequest() (request *DeleteInstancesRequest) { + request = &DeleteInstancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteInstances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteInstancesResponse creates a response to parse from DeleteInstances response +func CreateDeleteInstancesResponse() (response *DeleteInstancesResponse) { + response = &DeleteInstancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_key_pairs.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_key_pairs.go index 114de0d6d..4a9471271 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_key_pairs.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_key_pairs.go @@ -21,7 +21,6 @@ import ( ) // DeleteKeyPairs invokes the ecs.DeleteKeyPairs API synchronously -// api document: https://help.aliyun.com/api/ecs/deletekeypairs.html func (client *Client) DeleteKeyPairs(request *DeleteKeyPairsRequest) (response *DeleteKeyPairsResponse, err error) { response = CreateDeleteKeyPairsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteKeyPairs(request *DeleteKeyPairsRequest) (response * } // DeleteKeyPairsWithChan invokes the ecs.DeleteKeyPairs API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletekeypairs.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteKeyPairsWithChan(request *DeleteKeyPairsRequest) (<-chan *DeleteKeyPairsResponse, <-chan error) { responseChan := make(chan *DeleteKeyPairsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteKeyPairsWithChan(request *DeleteKeyPairsRequest) (<- } // DeleteKeyPairsWithCallback invokes the ecs.DeleteKeyPairs API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletekeypairs.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteKeyPairsWithCallback(request *DeleteKeyPairsRequest, callback func(response *DeleteKeyPairsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,8 +72,8 @@ func (client *Client) DeleteKeyPairsWithCallback(request *DeleteKeyPairsRequest, type DeleteKeyPairsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` KeyPairNames string `position:"Query" name:"KeyPairNames"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -94,6 +89,7 @@ func CreateDeleteKeyPairsRequest() (request *DeleteKeyPairsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteKeyPairs", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_launch_template.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_launch_template.go index 8e18188bd..4ba7379b3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_launch_template.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_launch_template.go @@ -21,7 +21,6 @@ import ( ) // DeleteLaunchTemplate invokes the ecs.DeleteLaunchTemplate API synchronously -// api document: https://help.aliyun.com/api/ecs/deletelaunchtemplate.html func (client *Client) DeleteLaunchTemplate(request *DeleteLaunchTemplateRequest) (response *DeleteLaunchTemplateResponse, err error) { response = CreateDeleteLaunchTemplateResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteLaunchTemplate(request *DeleteLaunchTemplateRequest) } // DeleteLaunchTemplateWithChan invokes the ecs.DeleteLaunchTemplate API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletelaunchtemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteLaunchTemplateWithChan(request *DeleteLaunchTemplateRequest) (<-chan *DeleteLaunchTemplateResponse, <-chan error) { responseChan := make(chan *DeleteLaunchTemplateResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteLaunchTemplateWithChan(request *DeleteLaunchTemplate } // DeleteLaunchTemplateWithCallback invokes the ecs.DeleteLaunchTemplate API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletelaunchtemplate.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteLaunchTemplateWithCallback(request *DeleteLaunchTemplateRequest, callback func(response *DeleteLaunchTemplateResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateDeleteLaunchTemplateRequest() (request *DeleteLaunchTemplateRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteLaunchTemplate", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_launch_template_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_launch_template_version.go index 546f6c158..0f6b12c82 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_launch_template_version.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_launch_template_version.go @@ -21,7 +21,6 @@ import ( ) // DeleteLaunchTemplateVersion invokes the ecs.DeleteLaunchTemplateVersion API synchronously -// api document: https://help.aliyun.com/api/ecs/deletelaunchtemplateversion.html func (client *Client) DeleteLaunchTemplateVersion(request *DeleteLaunchTemplateVersionRequest) (response *DeleteLaunchTemplateVersionResponse, err error) { response = CreateDeleteLaunchTemplateVersionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteLaunchTemplateVersion(request *DeleteLaunchTemplateV } // DeleteLaunchTemplateVersionWithChan invokes the ecs.DeleteLaunchTemplateVersion API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletelaunchtemplateversion.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteLaunchTemplateVersionWithChan(request *DeleteLaunchTemplateVersionRequest) (<-chan *DeleteLaunchTemplateVersionResponse, <-chan error) { responseChan := make(chan *DeleteLaunchTemplateVersionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteLaunchTemplateVersionWithChan(request *DeleteLaunchT } // DeleteLaunchTemplateVersionWithCallback invokes the ecs.DeleteLaunchTemplateVersion API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletelaunchtemplateversion.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteLaunchTemplateVersionWithCallback(request *DeleteLaunchTemplateVersionRequest, callback func(response *DeleteLaunchTemplateVersionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -97,6 +92,7 @@ func CreateDeleteLaunchTemplateVersionRequest() (request *DeleteLaunchTemplateVe RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteLaunchTemplateVersion", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_nat_gateway.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_nat_gateway.go index c468c85cc..ece106ff6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_nat_gateway.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_nat_gateway.go @@ -21,7 +21,6 @@ import ( ) // DeleteNatGateway invokes the ecs.DeleteNatGateway API synchronously -// api document: https://help.aliyun.com/api/ecs/deletenatgateway.html func (client *Client) DeleteNatGateway(request *DeleteNatGatewayRequest) (response *DeleteNatGatewayResponse, err error) { response = CreateDeleteNatGatewayResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteNatGateway(request *DeleteNatGatewayRequest) (respon } // DeleteNatGatewayWithChan invokes the ecs.DeleteNatGateway API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletenatgateway.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteNatGatewayWithChan(request *DeleteNatGatewayRequest) (<-chan *DeleteNatGatewayResponse, <-chan error) { responseChan := make(chan *DeleteNatGatewayResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteNatGatewayWithChan(request *DeleteNatGatewayRequest) } // DeleteNatGatewayWithCallback invokes the ecs.DeleteNatGateway API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletenatgateway.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteNatGatewayWithCallback(request *DeleteNatGatewayRequest, callback func(response *DeleteNatGatewayResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) DeleteNatGatewayWithCallback(request *DeleteNatGatewayRequ type DeleteNatGatewayRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + NatGatewayId string `position:"Query" name:"NatGatewayId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - NatGatewayId string `position:"Query" name:"NatGatewayId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -95,6 +90,7 @@ func CreateDeleteNatGatewayRequest() (request *DeleteNatGatewayRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteNatGateway", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_network_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_network_interface.go index 2649458e1..c8e0c7789 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_network_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_network_interface.go @@ -21,7 +21,6 @@ import ( ) // DeleteNetworkInterface invokes the ecs.DeleteNetworkInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/deletenetworkinterface.html func (client *Client) DeleteNetworkInterface(request *DeleteNetworkInterfaceRequest) (response *DeleteNetworkInterfaceResponse, err error) { response = CreateDeleteNetworkInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteNetworkInterface(request *DeleteNetworkInterfaceRequ } // DeleteNetworkInterfaceWithChan invokes the ecs.DeleteNetworkInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletenetworkinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteNetworkInterfaceWithChan(request *DeleteNetworkInterfaceRequest) (<-chan *DeleteNetworkInterfaceResponse, <-chan error) { responseChan := make(chan *DeleteNetworkInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteNetworkInterfaceWithChan(request *DeleteNetworkInter } // DeleteNetworkInterfaceWithCallback invokes the ecs.DeleteNetworkInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletenetworkinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteNetworkInterfaceWithCallback(request *DeleteNetworkInterfaceRequest, callback func(response *DeleteNetworkInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateDeleteNetworkInterfaceRequest() (request *DeleteNetworkInterfaceReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteNetworkInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_network_interface_permission.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_network_interface_permission.go index eaf566d6c..1871ba64e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_network_interface_permission.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_network_interface_permission.go @@ -21,7 +21,6 @@ import ( ) // DeleteNetworkInterfacePermission invokes the ecs.DeleteNetworkInterfacePermission API synchronously -// api document: https://help.aliyun.com/api/ecs/deletenetworkinterfacepermission.html func (client *Client) DeleteNetworkInterfacePermission(request *DeleteNetworkInterfacePermissionRequest) (response *DeleteNetworkInterfacePermissionResponse, err error) { response = CreateDeleteNetworkInterfacePermissionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteNetworkInterfacePermission(request *DeleteNetworkInt } // DeleteNetworkInterfacePermissionWithChan invokes the ecs.DeleteNetworkInterfacePermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletenetworkinterfacepermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteNetworkInterfacePermissionWithChan(request *DeleteNetworkInterfacePermissionRequest) (<-chan *DeleteNetworkInterfacePermissionResponse, <-chan error) { responseChan := make(chan *DeleteNetworkInterfacePermissionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteNetworkInterfacePermissionWithChan(request *DeleteNe } // DeleteNetworkInterfacePermissionWithCallback invokes the ecs.DeleteNetworkInterfacePermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletenetworkinterfacepermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteNetworkInterfacePermissionWithCallback(request *DeleteNetworkInterfacePermissionRequest, callback func(response *DeleteNetworkInterfacePermissionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateDeleteNetworkInterfacePermissionRequest() (request *DeleteNetworkInte RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteNetworkInterfacePermission", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_physical_connection.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_physical_connection.go index 82de412ab..08fa285b9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_physical_connection.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_physical_connection.go @@ -21,7 +21,6 @@ import ( ) // DeletePhysicalConnection invokes the ecs.DeletePhysicalConnection API synchronously -// api document: https://help.aliyun.com/api/ecs/deletephysicalconnection.html func (client *Client) DeletePhysicalConnection(request *DeletePhysicalConnectionRequest) (response *DeletePhysicalConnectionResponse, err error) { response = CreateDeletePhysicalConnectionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeletePhysicalConnection(request *DeletePhysicalConnection } // DeletePhysicalConnectionWithChan invokes the ecs.DeletePhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletephysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeletePhysicalConnectionWithChan(request *DeletePhysicalConnectionRequest) (<-chan *DeletePhysicalConnectionResponse, <-chan error) { responseChan := make(chan *DeletePhysicalConnectionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeletePhysicalConnectionWithChan(request *DeletePhysicalCo } // DeletePhysicalConnectionWithCallback invokes the ecs.DeletePhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletephysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeletePhysicalConnectionWithCallback(request *DeletePhysicalConnectionRequest, callback func(response *DeletePhysicalConnectionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,11 @@ func (client *Client) DeletePhysicalConnectionWithCallback(request *DeletePhysic type DeletePhysicalConnectionRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` } // DeletePhysicalConnectionResponse is the response struct for api DeletePhysicalConnection @@ -96,6 +91,7 @@ func CreateDeletePhysicalConnectionRequest() (request *DeletePhysicalConnectionR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeletePhysicalConnection", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_route_entry.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_route_entry.go index a12f258a4..22da43f07 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_route_entry.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_route_entry.go @@ -21,7 +21,6 @@ import ( ) // DeleteRouteEntry invokes the ecs.DeleteRouteEntry API synchronously -// api document: https://help.aliyun.com/api/ecs/deleterouteentry.html func (client *Client) DeleteRouteEntry(request *DeleteRouteEntryRequest) (response *DeleteRouteEntryResponse, err error) { response = CreateDeleteRouteEntryResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteRouteEntry(request *DeleteRouteEntryRequest) (respon } // DeleteRouteEntryWithChan invokes the ecs.DeleteRouteEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleterouteentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteRouteEntryWithChan(request *DeleteRouteEntryRequest) (<-chan *DeleteRouteEntryResponse, <-chan error) { responseChan := make(chan *DeleteRouteEntryResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteRouteEntryWithChan(request *DeleteRouteEntryRequest) } // DeleteRouteEntryWithCallback invokes the ecs.DeleteRouteEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleterouteentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteRouteEntryWithCallback(request *DeleteRouteEntryRequest, callback func(response *DeleteRouteEntryResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,13 @@ func (client *Client) DeleteRouteEntryWithCallback(request *DeleteRouteEntryRequ type DeleteRouteEntryRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + NextHopId string `position:"Query" name:"NextHopId"` + RouteTableId string `position:"Query" name:"RouteTableId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` DestinationCidrBlock string `position:"Query" name:"DestinationCidrBlock"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - NextHopId string `position:"Query" name:"NextHopId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` NextHopList *[]DeleteRouteEntryNextHopList `position:"Query" name:"NextHopList" type:"Repeated"` - RouteTableId string `position:"Query" name:"RouteTableId"` } // DeleteRouteEntryNextHopList is a repeated param struct in DeleteRouteEntryRequest @@ -104,6 +99,7 @@ func CreateDeleteRouteEntryRequest() (request *DeleteRouteEntryRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteRouteEntry", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_router_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_router_interface.go index d889de590..c4c2e37dd 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_router_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_router_interface.go @@ -21,7 +21,6 @@ import ( ) // DeleteRouterInterface invokes the ecs.DeleteRouterInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/deleterouterinterface.html func (client *Client) DeleteRouterInterface(request *DeleteRouterInterfaceRequest) (response *DeleteRouterInterfaceResponse, err error) { response = CreateDeleteRouterInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteRouterInterface(request *DeleteRouterInterfaceReques } // DeleteRouterInterfaceWithChan invokes the ecs.DeleteRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleterouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteRouterInterfaceWithChan(request *DeleteRouterInterfaceRequest) (<-chan *DeleteRouterInterfaceResponse, <-chan error) { responseChan := make(chan *DeleteRouterInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteRouterInterfaceWithChan(request *DeleteRouterInterfa } // DeleteRouterInterfaceWithCallback invokes the ecs.DeleteRouterInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/deleterouterinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteRouterInterfaceWithCallback(request *DeleteRouterInterfaceRequest, callback func(response *DeleteRouterInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) DeleteRouterInterfaceWithCallback(request *DeleteRouterInt type DeleteRouterInterfaceRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` RouterInterfaceId string `position:"Query" name:"RouterInterfaceId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -97,6 +92,7 @@ func CreateDeleteRouterInterfaceRequest() (request *DeleteRouterInterfaceRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteRouterInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_security_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_security_group.go index cea9e973d..d221188b7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_security_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_security_group.go @@ -21,7 +21,6 @@ import ( ) // DeleteSecurityGroup invokes the ecs.DeleteSecurityGroup API synchronously -// api document: https://help.aliyun.com/api/ecs/deletesecuritygroup.html func (client *Client) DeleteSecurityGroup(request *DeleteSecurityGroupRequest) (response *DeleteSecurityGroupResponse, err error) { response = CreateDeleteSecurityGroupResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteSecurityGroup(request *DeleteSecurityGroupRequest) ( } // DeleteSecurityGroupWithChan invokes the ecs.DeleteSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletesecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteSecurityGroupWithChan(request *DeleteSecurityGroupRequest) (<-chan *DeleteSecurityGroupResponse, <-chan error) { responseChan := make(chan *DeleteSecurityGroupResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteSecurityGroupWithChan(request *DeleteSecurityGroupRe } // DeleteSecurityGroupWithCallback invokes the ecs.DeleteSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletesecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteSecurityGroupWithCallback(request *DeleteSecurityGroupRequest, callback func(response *DeleteSecurityGroupResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) DeleteSecurityGroupWithCallback(request *DeleteSecurityGro type DeleteSecurityGroupRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -95,6 +90,7 @@ func CreateDeleteSecurityGroupRequest() (request *DeleteSecurityGroupRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteSecurityGroup", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_snapshot.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_snapshot.go index 54dd0c261..22e73b2dd 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_snapshot.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_snapshot.go @@ -21,7 +21,6 @@ import ( ) // DeleteSnapshot invokes the ecs.DeleteSnapshot API synchronously -// api document: https://help.aliyun.com/api/ecs/deletesnapshot.html func (client *Client) DeleteSnapshot(request *DeleteSnapshotRequest) (response *DeleteSnapshotResponse, err error) { response = CreateDeleteSnapshotResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteSnapshot(request *DeleteSnapshotRequest) (response * } // DeleteSnapshotWithChan invokes the ecs.DeleteSnapshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletesnapshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteSnapshotWithChan(request *DeleteSnapshotRequest) (<-chan *DeleteSnapshotResponse, <-chan error) { responseChan := make(chan *DeleteSnapshotResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteSnapshotWithChan(request *DeleteSnapshotRequest) (<- } // DeleteSnapshotWithCallback invokes the ecs.DeleteSnapshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletesnapshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteSnapshotWithCallback(request *DeleteSnapshotRequest, callback func(response *DeleteSnapshotResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -80,8 +75,8 @@ type DeleteSnapshotRequest struct { SnapshotId string `position:"Query" name:"SnapshotId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - Force requests.Boolean `position:"Query" name:"Force"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Force requests.Boolean `position:"Query" name:"Force"` } // DeleteSnapshotResponse is the response struct for api DeleteSnapshot @@ -96,6 +91,7 @@ func CreateDeleteSnapshotRequest() (request *DeleteSnapshotRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteSnapshot", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_snapshot_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_snapshot_group.go new file mode 100644 index 000000000..6edbec5f6 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_snapshot_group.go @@ -0,0 +1,104 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteSnapshotGroup invokes the ecs.DeleteSnapshotGroup API synchronously +func (client *Client) DeleteSnapshotGroup(request *DeleteSnapshotGroupRequest) (response *DeleteSnapshotGroupResponse, err error) { + response = CreateDeleteSnapshotGroupResponse() + err = client.DoAction(request, response) + return +} + +// DeleteSnapshotGroupWithChan invokes the ecs.DeleteSnapshotGroup API asynchronously +func (client *Client) DeleteSnapshotGroupWithChan(request *DeleteSnapshotGroupRequest) (<-chan *DeleteSnapshotGroupResponse, <-chan error) { + responseChan := make(chan *DeleteSnapshotGroupResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteSnapshotGroup(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteSnapshotGroupWithCallback invokes the ecs.DeleteSnapshotGroup API asynchronously +func (client *Client) DeleteSnapshotGroupWithCallback(request *DeleteSnapshotGroupRequest, callback func(response *DeleteSnapshotGroupResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteSnapshotGroupResponse + var err error + defer close(result) + response, err = client.DeleteSnapshotGroup(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteSnapshotGroupRequest is the request struct for api DeleteSnapshotGroup +type DeleteSnapshotGroupRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + SnapshotGroupId string `position:"Query" name:"SnapshotGroupId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// DeleteSnapshotGroupResponse is the response struct for api DeleteSnapshotGroup +type DeleteSnapshotGroupResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + OperationProgressSet OperationProgressSetInDeleteSnapshotGroup `json:"OperationProgressSet" xml:"OperationProgressSet"` +} + +// CreateDeleteSnapshotGroupRequest creates a request to invoke DeleteSnapshotGroup API +func CreateDeleteSnapshotGroupRequest() (request *DeleteSnapshotGroupRequest) { + request = &DeleteSnapshotGroupRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteSnapshotGroup", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteSnapshotGroupResponse creates a response to parse from DeleteSnapshotGroup response +func CreateDeleteSnapshotGroupResponse() (response *DeleteSnapshotGroupResponse) { + response = &DeleteSnapshotGroupResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_storage_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_storage_set.go new file mode 100644 index 000000000..6aade58ee --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_storage_set.go @@ -0,0 +1,104 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeleteStorageSet invokes the ecs.DeleteStorageSet API synchronously +func (client *Client) DeleteStorageSet(request *DeleteStorageSetRequest) (response *DeleteStorageSetResponse, err error) { + response = CreateDeleteStorageSetResponse() + err = client.DoAction(request, response) + return +} + +// DeleteStorageSetWithChan invokes the ecs.DeleteStorageSet API asynchronously +func (client *Client) DeleteStorageSetWithChan(request *DeleteStorageSetRequest) (<-chan *DeleteStorageSetResponse, <-chan error) { + responseChan := make(chan *DeleteStorageSetResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteStorageSet(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteStorageSetWithCallback invokes the ecs.DeleteStorageSet API asynchronously +func (client *Client) DeleteStorageSetWithCallback(request *DeleteStorageSetRequest, callback func(response *DeleteStorageSetResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteStorageSetResponse + var err error + defer close(result) + response, err = client.DeleteStorageSet(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteStorageSetRequest is the request struct for api DeleteStorageSet +type DeleteStorageSetRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + StorageSetId string `position:"Query" name:"StorageSetId"` +} + +// DeleteStorageSetResponse is the response struct for api DeleteStorageSet +type DeleteStorageSetResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteStorageSetRequest creates a request to invoke DeleteStorageSet API +func CreateDeleteStorageSetRequest() (request *DeleteStorageSetRequest) { + request = &DeleteStorageSetRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteStorageSet", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteStorageSetResponse creates a response to parse from DeleteStorageSet response +func CreateDeleteStorageSetResponse() (response *DeleteStorageSetResponse) { + response = &DeleteStorageSetResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_v_switch.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_v_switch.go index e59305e35..b42449f43 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_v_switch.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_v_switch.go @@ -21,7 +21,6 @@ import ( ) // DeleteVSwitch invokes the ecs.DeleteVSwitch API synchronously -// api document: https://help.aliyun.com/api/ecs/deletevswitch.html func (client *Client) DeleteVSwitch(request *DeleteVSwitchRequest) (response *DeleteVSwitchResponse, err error) { response = CreateDeleteVSwitchResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteVSwitch(request *DeleteVSwitchRequest) (response *De } // DeleteVSwitchWithChan invokes the ecs.DeleteVSwitch API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletevswitch.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteVSwitchWithChan(request *DeleteVSwitchRequest) (<-chan *DeleteVSwitchResponse, <-chan error) { responseChan := make(chan *DeleteVSwitchResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteVSwitchWithChan(request *DeleteVSwitchRequest) (<-ch } // DeleteVSwitchWithCallback invokes the ecs.DeleteVSwitch API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletevswitch.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteVSwitchWithCallback(request *DeleteVSwitchRequest, callback func(response *DeleteVSwitchResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,11 +71,11 @@ func (client *Client) DeleteVSwitchWithCallback(request *DeleteVSwitchRequest, c // DeleteVSwitchRequest is the request struct for api DeleteVSwitch type DeleteVSwitchRequest struct { *requests.RpcRequest - VSwitchId string `position:"Query" name:"VSwitchId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` } // DeleteVSwitchResponse is the response struct for api DeleteVSwitch @@ -95,6 +90,7 @@ func CreateDeleteVSwitchRequest() (request *DeleteVSwitchRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteVSwitch", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_virtual_border_router.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_virtual_border_router.go index eba1b78c9..1aad8600a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_virtual_border_router.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_virtual_border_router.go @@ -21,7 +21,6 @@ import ( ) // DeleteVirtualBorderRouter invokes the ecs.DeleteVirtualBorderRouter API synchronously -// api document: https://help.aliyun.com/api/ecs/deletevirtualborderrouter.html func (client *Client) DeleteVirtualBorderRouter(request *DeleteVirtualBorderRouterRequest) (response *DeleteVirtualBorderRouterResponse, err error) { response = CreateDeleteVirtualBorderRouterResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteVirtualBorderRouter(request *DeleteVirtualBorderRout } // DeleteVirtualBorderRouterWithChan invokes the ecs.DeleteVirtualBorderRouter API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletevirtualborderrouter.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteVirtualBorderRouterWithChan(request *DeleteVirtualBorderRouterRequest) (<-chan *DeleteVirtualBorderRouterResponse, <-chan error) { responseChan := make(chan *DeleteVirtualBorderRouterResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteVirtualBorderRouterWithChan(request *DeleteVirtualBo } // DeleteVirtualBorderRouterWithCallback invokes the ecs.DeleteVirtualBorderRouter API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletevirtualborderrouter.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteVirtualBorderRouterWithCallback(request *DeleteVirtualBorderRouterRequest, callback func(response *DeleteVirtualBorderRouterResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,11 @@ func (client *Client) DeleteVirtualBorderRouterWithCallback(request *DeleteVirtu type DeleteVirtualBorderRouterRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - UserCidr string `position:"Query" name:"UserCidr"` VbrId string `position:"Query" name:"VbrId"` + UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -97,6 +92,7 @@ func CreateDeleteVirtualBorderRouterRequest() (request *DeleteVirtualBorderRoute RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteVirtualBorderRouter", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_vpc.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_vpc.go index 15378684a..78b39ec7d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_vpc.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/delete_vpc.go @@ -21,7 +21,6 @@ import ( ) // DeleteVpc invokes the ecs.DeleteVpc API synchronously -// api document: https://help.aliyun.com/api/ecs/deletevpc.html func (client *Client) DeleteVpc(request *DeleteVpcRequest) (response *DeleteVpcResponse, err error) { response = CreateDeleteVpcResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DeleteVpc(request *DeleteVpcRequest) (response *DeleteVpcR } // DeleteVpcWithChan invokes the ecs.DeleteVpc API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletevpc.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteVpcWithChan(request *DeleteVpcRequest) (<-chan *DeleteVpcResponse, <-chan error) { responseChan := make(chan *DeleteVpcResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DeleteVpcWithChan(request *DeleteVpcRequest) (<-chan *Dele } // DeleteVpcWithCallback invokes the ecs.DeleteVpc API asynchronously -// api document: https://help.aliyun.com/api/ecs/deletevpc.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DeleteVpcWithCallback(request *DeleteVpcRequest, callback func(response *DeleteVpcResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,9 +73,9 @@ type DeleteVpcRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - VpcId string `position:"Query" name:"VpcId"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VpcId string `position:"Query" name:"VpcId"` } // DeleteVpcResponse is the response struct for api DeleteVpc @@ -95,6 +90,7 @@ func CreateDeleteVpcRequest() (request *DeleteVpcRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DeleteVpc", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/deregister_managed_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/deregister_managed_instance.go new file mode 100644 index 000000000..6f384e1d9 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/deregister_managed_instance.go @@ -0,0 +1,104 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DeregisterManagedInstance invokes the ecs.DeregisterManagedInstance API synchronously +func (client *Client) DeregisterManagedInstance(request *DeregisterManagedInstanceRequest) (response *DeregisterManagedInstanceResponse, err error) { + response = CreateDeregisterManagedInstanceResponse() + err = client.DoAction(request, response) + return +} + +// DeregisterManagedInstanceWithChan invokes the ecs.DeregisterManagedInstance API asynchronously +func (client *Client) DeregisterManagedInstanceWithChan(request *DeregisterManagedInstanceRequest) (<-chan *DeregisterManagedInstanceResponse, <-chan error) { + responseChan := make(chan *DeregisterManagedInstanceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeregisterManagedInstance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeregisterManagedInstanceWithCallback invokes the ecs.DeregisterManagedInstance API asynchronously +func (client *Client) DeregisterManagedInstanceWithCallback(request *DeregisterManagedInstanceRequest, callback func(response *DeregisterManagedInstanceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeregisterManagedInstanceResponse + var err error + defer close(result) + response, err = client.DeregisterManagedInstance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeregisterManagedInstanceRequest is the request struct for api DeregisterManagedInstance +type DeregisterManagedInstanceRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` +} + +// DeregisterManagedInstanceResponse is the response struct for api DeregisterManagedInstance +type DeregisterManagedInstanceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Instance Instance `json:"Instance" xml:"Instance"` +} + +// CreateDeregisterManagedInstanceRequest creates a request to invoke DeregisterManagedInstance API +func CreateDeregisterManagedInstanceRequest() (request *DeregisterManagedInstanceRequest) { + request = &DeregisterManagedInstanceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DeregisterManagedInstance", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeregisterManagedInstanceResponse creates a response to parse from DeregisterManagedInstance response +func CreateDeregisterManagedInstanceResponse() (response *DeregisterManagedInstanceResponse) { + response = &DeregisterManagedInstanceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_access_points.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_access_points.go index 35480d3cb..fe8105d90 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_access_points.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_access_points.go @@ -21,7 +21,6 @@ import ( ) // DescribeAccessPoints invokes the ecs.DescribeAccessPoints API synchronously -// api document: https://help.aliyun.com/api/ecs/describeaccesspoints.html func (client *Client) DescribeAccessPoints(request *DescribeAccessPointsRequest) (response *DescribeAccessPointsResponse, err error) { response = CreateDescribeAccessPointsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeAccessPoints(request *DescribeAccessPointsRequest) } // DescribeAccessPointsWithChan invokes the ecs.DescribeAccessPoints API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeaccesspoints.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeAccessPointsWithChan(request *DescribeAccessPointsRequest) (<-chan *DescribeAccessPointsResponse, <-chan error) { responseChan := make(chan *DescribeAccessPointsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeAccessPointsWithChan(request *DescribeAccessPoints } // DescribeAccessPointsWithCallback invokes the ecs.DescribeAccessPoints API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeaccesspoints.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeAccessPointsWithCallback(request *DescribeAccessPointsRequest, callback func(response *DescribeAccessPointsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,13 +71,13 @@ func (client *Client) DescribeAccessPointsWithCallback(request *DescribeAccessPo // DescribeAccessPointsRequest is the request struct for api DescribeAccessPoints type DescribeAccessPointsRequest struct { *requests.RpcRequest - Filter *[]DescribeAccessPointsFilter `position:"Query" name:"Filter" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` Type string `position:"Query" name:"Type"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Filter *[]DescribeAccessPointsFilter `position:"Query" name:"Filter" type:"Repeated"` } // DescribeAccessPointsFilter is a repeated param struct in DescribeAccessPointsRequest @@ -107,6 +102,7 @@ func CreateDescribeAccessPointsRequest() (request *DescribeAccessPointsRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeAccessPoints", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_account_attributes.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_account_attributes.go index 0a7fa8c7d..82df2ea55 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_account_attributes.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_account_attributes.go @@ -21,7 +21,6 @@ import ( ) // DescribeAccountAttributes invokes the ecs.DescribeAccountAttributes API synchronously -// api document: https://help.aliyun.com/api/ecs/describeaccountattributes.html func (client *Client) DescribeAccountAttributes(request *DescribeAccountAttributesRequest) (response *DescribeAccountAttributesResponse, err error) { response = CreateDescribeAccountAttributesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeAccountAttributes(request *DescribeAccountAttribut } // DescribeAccountAttributesWithChan invokes the ecs.DescribeAccountAttributes API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeaccountattributes.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeAccountAttributesWithChan(request *DescribeAccountAttributesRequest) (<-chan *DescribeAccountAttributesResponse, <-chan error) { responseChan := make(chan *DescribeAccountAttributesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeAccountAttributesWithChan(request *DescribeAccount } // DescribeAccountAttributesWithCallback invokes the ecs.DescribeAccountAttributes API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeaccountattributes.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeAccountAttributesWithCallback(request *DescribeAccountAttributesRequest, callback func(response *DescribeAccountAttributesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateDescribeAccountAttributesRequest() (request *DescribeAccountAttribute RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeAccountAttributes", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_activations.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_activations.go new file mode 100644 index 000000000..f73737e7e --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_activations.go @@ -0,0 +1,110 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeActivations invokes the ecs.DescribeActivations API synchronously +func (client *Client) DescribeActivations(request *DescribeActivationsRequest) (response *DescribeActivationsResponse, err error) { + response = CreateDescribeActivationsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeActivationsWithChan invokes the ecs.DescribeActivations API asynchronously +func (client *Client) DescribeActivationsWithChan(request *DescribeActivationsRequest) (<-chan *DescribeActivationsResponse, <-chan error) { + responseChan := make(chan *DescribeActivationsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeActivations(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeActivationsWithCallback invokes the ecs.DescribeActivations API asynchronously +func (client *Client) DescribeActivationsWithCallback(request *DescribeActivationsRequest, callback func(response *DescribeActivationsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeActivationsResponse + var err error + defer close(result) + response, err = client.DescribeActivations(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeActivationsRequest is the request struct for api DescribeActivations +type DescribeActivationsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceName string `position:"Query" name:"InstanceName"` + ActivationId string `position:"Query" name:"ActivationId"` +} + +// DescribeActivationsResponse is the response struct for api DescribeActivations +type DescribeActivationsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + PageSize int64 `json:"PageSize" xml:"PageSize"` + ActivationList []Activation `json:"ActivationList" xml:"ActivationList"` +} + +// CreateDescribeActivationsRequest creates a request to invoke DescribeActivations API +func CreateDescribeActivationsRequest() (request *DescribeActivationsRequest) { + request = &DescribeActivationsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeActivations", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeActivationsResponse creates a response to parse from DescribeActivations response +func CreateDescribeActivationsResponse() (response *DescribeActivationsResponse) { + response = &DescribeActivationsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_group_history.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_group_history.go new file mode 100644 index 000000000..2496392b9 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_group_history.go @@ -0,0 +1,111 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeAutoProvisioningGroupHistory invokes the ecs.DescribeAutoProvisioningGroupHistory API synchronously +func (client *Client) DescribeAutoProvisioningGroupHistory(request *DescribeAutoProvisioningGroupHistoryRequest) (response *DescribeAutoProvisioningGroupHistoryResponse, err error) { + response = CreateDescribeAutoProvisioningGroupHistoryResponse() + err = client.DoAction(request, response) + return +} + +// DescribeAutoProvisioningGroupHistoryWithChan invokes the ecs.DescribeAutoProvisioningGroupHistory API asynchronously +func (client *Client) DescribeAutoProvisioningGroupHistoryWithChan(request *DescribeAutoProvisioningGroupHistoryRequest) (<-chan *DescribeAutoProvisioningGroupHistoryResponse, <-chan error) { + responseChan := make(chan *DescribeAutoProvisioningGroupHistoryResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeAutoProvisioningGroupHistory(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeAutoProvisioningGroupHistoryWithCallback invokes the ecs.DescribeAutoProvisioningGroupHistory API asynchronously +func (client *Client) DescribeAutoProvisioningGroupHistoryWithCallback(request *DescribeAutoProvisioningGroupHistoryRequest, callback func(response *DescribeAutoProvisioningGroupHistoryResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeAutoProvisioningGroupHistoryResponse + var err error + defer close(result) + response, err = client.DescribeAutoProvisioningGroupHistory(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeAutoProvisioningGroupHistoryRequest is the request struct for api DescribeAutoProvisioningGroupHistory +type DescribeAutoProvisioningGroupHistoryRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + StartTime string `position:"Query" name:"StartTime"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + EndTime string `position:"Query" name:"EndTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AutoProvisioningGroupId string `position:"Query" name:"AutoProvisioningGroupId"` +} + +// DescribeAutoProvisioningGroupHistoryResponse is the response struct for api DescribeAutoProvisioningGroupHistory +type DescribeAutoProvisioningGroupHistoryResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + AutoProvisioningGroupHistories AutoProvisioningGroupHistories `json:"AutoProvisioningGroupHistories" xml:"AutoProvisioningGroupHistories"` +} + +// CreateDescribeAutoProvisioningGroupHistoryRequest creates a request to invoke DescribeAutoProvisioningGroupHistory API +func CreateDescribeAutoProvisioningGroupHistoryRequest() (request *DescribeAutoProvisioningGroupHistoryRequest) { + request = &DescribeAutoProvisioningGroupHistoryRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeAutoProvisioningGroupHistory", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeAutoProvisioningGroupHistoryResponse creates a response to parse from DescribeAutoProvisioningGroupHistory response +func CreateDescribeAutoProvisioningGroupHistoryResponse() (response *DescribeAutoProvisioningGroupHistoryResponse) { + response = &DescribeAutoProvisioningGroupHistoryResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_group_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_group_instances.go new file mode 100644 index 000000000..996e61087 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_group_instances.go @@ -0,0 +1,109 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeAutoProvisioningGroupInstances invokes the ecs.DescribeAutoProvisioningGroupInstances API synchronously +func (client *Client) DescribeAutoProvisioningGroupInstances(request *DescribeAutoProvisioningGroupInstancesRequest) (response *DescribeAutoProvisioningGroupInstancesResponse, err error) { + response = CreateDescribeAutoProvisioningGroupInstancesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeAutoProvisioningGroupInstancesWithChan invokes the ecs.DescribeAutoProvisioningGroupInstances API asynchronously +func (client *Client) DescribeAutoProvisioningGroupInstancesWithChan(request *DescribeAutoProvisioningGroupInstancesRequest) (<-chan *DescribeAutoProvisioningGroupInstancesResponse, <-chan error) { + responseChan := make(chan *DescribeAutoProvisioningGroupInstancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeAutoProvisioningGroupInstances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeAutoProvisioningGroupInstancesWithCallback invokes the ecs.DescribeAutoProvisioningGroupInstances API asynchronously +func (client *Client) DescribeAutoProvisioningGroupInstancesWithCallback(request *DescribeAutoProvisioningGroupInstancesRequest, callback func(response *DescribeAutoProvisioningGroupInstancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeAutoProvisioningGroupInstancesResponse + var err error + defer close(result) + response, err = client.DescribeAutoProvisioningGroupInstances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeAutoProvisioningGroupInstancesRequest is the request struct for api DescribeAutoProvisioningGroupInstances +type DescribeAutoProvisioningGroupInstancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AutoProvisioningGroupId string `position:"Query" name:"AutoProvisioningGroupId"` +} + +// DescribeAutoProvisioningGroupInstancesResponse is the response struct for api DescribeAutoProvisioningGroupInstances +type DescribeAutoProvisioningGroupInstancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + Instances InstancesInDescribeAutoProvisioningGroupInstances `json:"Instances" xml:"Instances"` +} + +// CreateDescribeAutoProvisioningGroupInstancesRequest creates a request to invoke DescribeAutoProvisioningGroupInstances API +func CreateDescribeAutoProvisioningGroupInstancesRequest() (request *DescribeAutoProvisioningGroupInstancesRequest) { + request = &DescribeAutoProvisioningGroupInstancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeAutoProvisioningGroupInstances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeAutoProvisioningGroupInstancesResponse creates a response to parse from DescribeAutoProvisioningGroupInstances response +func CreateDescribeAutoProvisioningGroupInstancesResponse() (response *DescribeAutoProvisioningGroupInstancesResponse) { + response = &DescribeAutoProvisioningGroupInstancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_groups.go new file mode 100644 index 000000000..5d3949c8f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_provisioning_groups.go @@ -0,0 +1,111 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeAutoProvisioningGroups invokes the ecs.DescribeAutoProvisioningGroups API synchronously +func (client *Client) DescribeAutoProvisioningGroups(request *DescribeAutoProvisioningGroupsRequest) (response *DescribeAutoProvisioningGroupsResponse, err error) { + response = CreateDescribeAutoProvisioningGroupsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeAutoProvisioningGroupsWithChan invokes the ecs.DescribeAutoProvisioningGroups API asynchronously +func (client *Client) DescribeAutoProvisioningGroupsWithChan(request *DescribeAutoProvisioningGroupsRequest) (<-chan *DescribeAutoProvisioningGroupsResponse, <-chan error) { + responseChan := make(chan *DescribeAutoProvisioningGroupsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeAutoProvisioningGroups(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeAutoProvisioningGroupsWithCallback invokes the ecs.DescribeAutoProvisioningGroups API asynchronously +func (client *Client) DescribeAutoProvisioningGroupsWithCallback(request *DescribeAutoProvisioningGroupsRequest, callback func(response *DescribeAutoProvisioningGroupsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeAutoProvisioningGroupsResponse + var err error + defer close(result) + response, err = client.DescribeAutoProvisioningGroups(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeAutoProvisioningGroupsRequest is the request struct for api DescribeAutoProvisioningGroups +type DescribeAutoProvisioningGroupsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + AutoProvisioningGroupStatus *[]string `position:"Query" name:"AutoProvisioningGroupStatus" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AutoProvisioningGroupId *[]string `position:"Query" name:"AutoProvisioningGroupId" type:"Repeated"` + AutoProvisioningGroupName string `position:"Query" name:"AutoProvisioningGroupName"` +} + +// DescribeAutoProvisioningGroupsResponse is the response struct for api DescribeAutoProvisioningGroups +type DescribeAutoProvisioningGroupsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + AutoProvisioningGroups AutoProvisioningGroups `json:"AutoProvisioningGroups" xml:"AutoProvisioningGroups"` +} + +// CreateDescribeAutoProvisioningGroupsRequest creates a request to invoke DescribeAutoProvisioningGroups API +func CreateDescribeAutoProvisioningGroupsRequest() (request *DescribeAutoProvisioningGroupsRequest) { + request = &DescribeAutoProvisioningGroupsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeAutoProvisioningGroups", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeAutoProvisioningGroupsResponse creates a response to parse from DescribeAutoProvisioningGroups response +func CreateDescribeAutoProvisioningGroupsResponse() (response *DescribeAutoProvisioningGroupsResponse) { + response = &DescribeAutoProvisioningGroupsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_snapshot_policy_ex.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_snapshot_policy_ex.go index fd1d652ac..5a0f17bbb 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_snapshot_policy_ex.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_auto_snapshot_policy_ex.go @@ -21,7 +21,6 @@ import ( ) // DescribeAutoSnapshotPolicyEx invokes the ecs.DescribeAutoSnapshotPolicyEx API synchronously -// api document: https://help.aliyun.com/api/ecs/describeautosnapshotpolicyex.html func (client *Client) DescribeAutoSnapshotPolicyEx(request *DescribeAutoSnapshotPolicyExRequest) (response *DescribeAutoSnapshotPolicyExResponse, err error) { response = CreateDescribeAutoSnapshotPolicyExResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeAutoSnapshotPolicyEx(request *DescribeAutoSnapshot } // DescribeAutoSnapshotPolicyExWithChan invokes the ecs.DescribeAutoSnapshotPolicyEx API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeautosnapshotpolicyex.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeAutoSnapshotPolicyExWithChan(request *DescribeAutoSnapshotPolicyExRequest) (<-chan *DescribeAutoSnapshotPolicyExResponse, <-chan error) { responseChan := make(chan *DescribeAutoSnapshotPolicyExResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeAutoSnapshotPolicyExWithChan(request *DescribeAuto } // DescribeAutoSnapshotPolicyExWithCallback invokes the ecs.DescribeAutoSnapshotPolicyEx API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeautosnapshotpolicyex.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeAutoSnapshotPolicyExWithCallback(request *DescribeAutoSnapshotPolicyExRequest, callback func(response *DescribeAutoSnapshotPolicyExResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,13 +71,20 @@ func (client *Client) DescribeAutoSnapshotPolicyExWithCallback(request *Describe // DescribeAutoSnapshotPolicyExRequest is the request struct for api DescribeAutoSnapshotPolicyEx type DescribeAutoSnapshotPolicyExRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - AutoSnapshotPolicyId string `position:"Query" name:"AutoSnapshotPolicyId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + AutoSnapshotPolicyId string `position:"Query" name:"AutoSnapshotPolicyId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + Tag *[]DescribeAutoSnapshotPolicyExTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// DescribeAutoSnapshotPolicyExTag is a repeated param struct in DescribeAutoSnapshotPolicyExRequest +type DescribeAutoSnapshotPolicyExTag struct { + Value string `name:"Value"` + Key string `name:"Key"` } // DescribeAutoSnapshotPolicyExResponse is the response struct for api DescribeAutoSnapshotPolicyEx @@ -101,6 +103,7 @@ func CreateDescribeAutoSnapshotPolicyExRequest() (request *DescribeAutoSnapshotP RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeAutoSnapshotPolicyEx", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_available_resource.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_available_resource.go index 8a99f38de..93129c378 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_available_resource.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_available_resource.go @@ -21,7 +21,6 @@ import ( ) // DescribeAvailableResource invokes the ecs.DescribeAvailableResource API synchronously -// api document: https://help.aliyun.com/api/ecs/describeavailableresource.html func (client *Client) DescribeAvailableResource(request *DescribeAvailableResourceRequest) (response *DescribeAvailableResourceResponse, err error) { response = CreateDescribeAvailableResourceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeAvailableResource(request *DescribeAvailableResour } // DescribeAvailableResourceWithChan invokes the ecs.DescribeAvailableResource API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeavailableresource.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeAvailableResourceWithChan(request *DescribeAvailableResourceRequest) (<-chan *DescribeAvailableResourceResponse, <-chan error) { responseChan := make(chan *DescribeAvailableResourceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeAvailableResourceWithChan(request *DescribeAvailab } // DescribeAvailableResourceWithCallback invokes the ecs.DescribeAvailableResource API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeavailableresource.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeAvailableResourceWithCallback(request *DescribeAvailableResourceRequest, callback func(response *DescribeAvailableResourceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -90,6 +85,7 @@ type DescribeAvailableResourceRequest struct { OwnerAccount string `position:"Query" name:"OwnerAccount"` DedicatedHostId string `position:"Query" name:"DedicatedHostId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SpotDuration requests.Integer `position:"Query" name:"SpotDuration"` ResourceType string `position:"Query" name:"ResourceType"` SpotStrategy string `position:"Query" name:"SpotStrategy"` DestinationResource string `position:"Query" name:"DestinationResource"` @@ -109,6 +105,7 @@ func CreateDescribeAvailableResourceRequest() (request *DescribeAvailableResourc RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeAvailableResource", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_bandwidth_limitation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_bandwidth_limitation.go index 4fc98a4f6..db1b03142 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_bandwidth_limitation.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_bandwidth_limitation.go @@ -21,7 +21,6 @@ import ( ) // DescribeBandwidthLimitation invokes the ecs.DescribeBandwidthLimitation API synchronously -// api document: https://help.aliyun.com/api/ecs/describebandwidthlimitation.html func (client *Client) DescribeBandwidthLimitation(request *DescribeBandwidthLimitationRequest) (response *DescribeBandwidthLimitationResponse, err error) { response = CreateDescribeBandwidthLimitationResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeBandwidthLimitation(request *DescribeBandwidthLimi } // DescribeBandwidthLimitationWithChan invokes the ecs.DescribeBandwidthLimitation API asynchronously -// api document: https://help.aliyun.com/api/ecs/describebandwidthlimitation.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeBandwidthLimitationWithChan(request *DescribeBandwidthLimitationRequest) (<-chan *DescribeBandwidthLimitationResponse, <-chan error) { responseChan := make(chan *DescribeBandwidthLimitationResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeBandwidthLimitationWithChan(request *DescribeBandw } // DescribeBandwidthLimitationWithCallback invokes the ecs.DescribeBandwidthLimitation API asynchronously -// api document: https://help.aliyun.com/api/ecs/describebandwidthlimitation.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeBandwidthLimitationWithCallback(request *DescribeBandwidthLimitationRequest, callback func(response *DescribeBandwidthLimitationResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -100,6 +95,7 @@ func CreateDescribeBandwidthLimitationRequest() (request *DescribeBandwidthLimit RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeBandwidthLimitation", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_bandwidth_packages.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_bandwidth_packages.go index b42218d5f..c70276960 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_bandwidth_packages.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_bandwidth_packages.go @@ -21,7 +21,6 @@ import ( ) // DescribeBandwidthPackages invokes the ecs.DescribeBandwidthPackages API synchronously -// api document: https://help.aliyun.com/api/ecs/describebandwidthpackages.html func (client *Client) DescribeBandwidthPackages(request *DescribeBandwidthPackagesRequest) (response *DescribeBandwidthPackagesResponse, err error) { response = CreateDescribeBandwidthPackagesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeBandwidthPackages(request *DescribeBandwidthPackag } // DescribeBandwidthPackagesWithChan invokes the ecs.DescribeBandwidthPackages API asynchronously -// api document: https://help.aliyun.com/api/ecs/describebandwidthpackages.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeBandwidthPackagesWithChan(request *DescribeBandwidthPackagesRequest) (<-chan *DescribeBandwidthPackagesResponse, <-chan error) { responseChan := make(chan *DescribeBandwidthPackagesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeBandwidthPackagesWithChan(request *DescribeBandwid } // DescribeBandwidthPackagesWithCallback invokes the ecs.DescribeBandwidthPackages API asynchronously -// api document: https://help.aliyun.com/api/ecs/describebandwidthpackages.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeBandwidthPackagesWithCallback(request *DescribeBandwidthPackagesRequest, callback func(response *DescribeBandwidthPackagesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,13 @@ func (client *Client) DescribeBandwidthPackagesWithCallback(request *DescribeBan type DescribeBandwidthPackagesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + NatGatewayId string `position:"Query" name:"NatGatewayId"` BandwidthPackageId string `position:"Query" name:"BandwidthPackageId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - NatGatewayId string `position:"Query" name:"NatGatewayId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` } // DescribeBandwidthPackagesResponse is the response struct for api DescribeBandwidthPackages @@ -102,6 +97,7 @@ func CreateDescribeBandwidthPackagesRequest() (request *DescribeBandwidthPackage RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeBandwidthPackages", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_capacity_reservation_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_capacity_reservation_instances.go new file mode 100644 index 000000000..6bdb080d2 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_capacity_reservation_instances.go @@ -0,0 +1,110 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeCapacityReservationInstances invokes the ecs.DescribeCapacityReservationInstances API synchronously +func (client *Client) DescribeCapacityReservationInstances(request *DescribeCapacityReservationInstancesRequest) (response *DescribeCapacityReservationInstancesResponse, err error) { + response = CreateDescribeCapacityReservationInstancesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeCapacityReservationInstancesWithChan invokes the ecs.DescribeCapacityReservationInstances API asynchronously +func (client *Client) DescribeCapacityReservationInstancesWithChan(request *DescribeCapacityReservationInstancesRequest) (<-chan *DescribeCapacityReservationInstancesResponse, <-chan error) { + responseChan := make(chan *DescribeCapacityReservationInstancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeCapacityReservationInstances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeCapacityReservationInstancesWithCallback invokes the ecs.DescribeCapacityReservationInstances API asynchronously +func (client *Client) DescribeCapacityReservationInstancesWithCallback(request *DescribeCapacityReservationInstancesRequest, callback func(response *DescribeCapacityReservationInstancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeCapacityReservationInstancesResponse + var err error + defer close(result) + response, err = client.DescribeCapacityReservationInstances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeCapacityReservationInstancesRequest is the request struct for api DescribeCapacityReservationInstances +type DescribeCapacityReservationInstancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + NextToken string `position:"Query" name:"NextToken"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + PackageType string `position:"Query" name:"PackageType"` +} + +// DescribeCapacityReservationInstancesResponse is the response struct for api DescribeCapacityReservationInstances +type DescribeCapacityReservationInstancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + NextToken string `json:"NextToken" xml:"NextToken"` + MaxResults int `json:"MaxResults" xml:"MaxResults"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + CapacityReservationItem CapacityReservationItemInDescribeCapacityReservationInstances `json:"CapacityReservationItem" xml:"CapacityReservationItem"` +} + +// CreateDescribeCapacityReservationInstancesRequest creates a request to invoke DescribeCapacityReservationInstances API +func CreateDescribeCapacityReservationInstancesRequest() (request *DescribeCapacityReservationInstancesRequest) { + request = &DescribeCapacityReservationInstancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeCapacityReservationInstances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeCapacityReservationInstancesResponse creates a response to parse from DescribeCapacityReservationInstances response +func CreateDescribeCapacityReservationInstancesResponse() (response *DescribeCapacityReservationInstancesResponse) { + response = &DescribeCapacityReservationInstancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_capacity_reservations.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_capacity_reservations.go new file mode 100644 index 000000000..e04fcc7ee --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_capacity_reservations.go @@ -0,0 +1,123 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeCapacityReservations invokes the ecs.DescribeCapacityReservations API synchronously +func (client *Client) DescribeCapacityReservations(request *DescribeCapacityReservationsRequest) (response *DescribeCapacityReservationsResponse, err error) { + response = CreateDescribeCapacityReservationsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeCapacityReservationsWithChan invokes the ecs.DescribeCapacityReservations API asynchronously +func (client *Client) DescribeCapacityReservationsWithChan(request *DescribeCapacityReservationsRequest) (<-chan *DescribeCapacityReservationsResponse, <-chan error) { + responseChan := make(chan *DescribeCapacityReservationsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeCapacityReservations(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeCapacityReservationsWithCallback invokes the ecs.DescribeCapacityReservations API asynchronously +func (client *Client) DescribeCapacityReservationsWithCallback(request *DescribeCapacityReservationsRequest, callback func(response *DescribeCapacityReservationsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeCapacityReservationsResponse + var err error + defer close(result) + response, err = client.DescribeCapacityReservations(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeCapacityReservationsRequest is the request struct for api DescribeCapacityReservations +type DescribeCapacityReservationsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Platform string `position:"Query" name:"Platform"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + NextToken string `position:"Query" name:"NextToken"` + InstanceType string `position:"Query" name:"InstanceType"` + Tag *[]DescribeCapacityReservationsTag `position:"Query" name:"Tag" type:"Repeated"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PrivatePoolOptionsIds string `position:"Query" name:"PrivatePoolOptions.Ids"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + ZoneId string `position:"Query" name:"ZoneId"` + PackageType string `position:"Query" name:"PackageType"` + Status string `position:"Query" name:"Status"` +} + +// DescribeCapacityReservationsTag is a repeated param struct in DescribeCapacityReservationsRequest +type DescribeCapacityReservationsTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DescribeCapacityReservationsResponse is the response struct for api DescribeCapacityReservations +type DescribeCapacityReservationsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + NextToken string `json:"NextToken" xml:"NextToken"` + MaxResults int `json:"MaxResults" xml:"MaxResults"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + CapacityReservationSet CapacityReservationSet `json:"CapacityReservationSet" xml:"CapacityReservationSet"` +} + +// CreateDescribeCapacityReservationsRequest creates a request to invoke DescribeCapacityReservations API +func CreateDescribeCapacityReservationsRequest() (request *DescribeCapacityReservationsRequest) { + request = &DescribeCapacityReservationsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeCapacityReservations", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeCapacityReservationsResponse creates a response to parse from DescribeCapacityReservations response +func CreateDescribeCapacityReservationsResponse() (response *DescribeCapacityReservationsResponse) { + response = &DescribeCapacityReservationsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_classic_link_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_classic_link_instances.go index ac277cdaf..4a5f0e285 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_classic_link_instances.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_classic_link_instances.go @@ -21,7 +21,6 @@ import ( ) // DescribeClassicLinkInstances invokes the ecs.DescribeClassicLinkInstances API synchronously -// api document: https://help.aliyun.com/api/ecs/describeclassiclinkinstances.html func (client *Client) DescribeClassicLinkInstances(request *DescribeClassicLinkInstancesRequest) (response *DescribeClassicLinkInstancesResponse, err error) { response = CreateDescribeClassicLinkInstancesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeClassicLinkInstances(request *DescribeClassicLinkI } // DescribeClassicLinkInstancesWithChan invokes the ecs.DescribeClassicLinkInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeclassiclinkinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeClassicLinkInstancesWithChan(request *DescribeClassicLinkInstancesRequest) (<-chan *DescribeClassicLinkInstancesResponse, <-chan error) { responseChan := make(chan *DescribeClassicLinkInstancesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeClassicLinkInstancesWithChan(request *DescribeClas } // DescribeClassicLinkInstancesWithCallback invokes the ecs.DescribeClassicLinkInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeclassiclinkinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeClassicLinkInstancesWithCallback(request *DescribeClassicLinkInstancesRequest, callback func(response *DescribeClassicLinkInstancesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) DescribeClassicLinkInstancesWithCallback(request *Describe type DescribeClassicLinkInstancesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - VpcId string `position:"Query" name:"VpcId"` - PageSize string `position:"Query" name:"PageSize"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber string `position:"Query" name:"PageNumber"` + PageSize string `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + VpcId string `position:"Query" name:"VpcId"` } // DescribeClassicLinkInstancesResponse is the response struct for api DescribeClassicLinkInstances @@ -101,6 +96,7 @@ func CreateDescribeClassicLinkInstancesRequest() (request *DescribeClassicLinkIn RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeClassicLinkInstances", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_cloud_assistant_status.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_cloud_assistant_status.go index 94f60a951..101cff195 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_cloud_assistant_status.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_cloud_assistant_status.go @@ -21,7 +21,6 @@ import ( ) // DescribeCloudAssistantStatus invokes the ecs.DescribeCloudAssistantStatus API synchronously -// api document: https://help.aliyun.com/api/ecs/describecloudassistantstatus.html func (client *Client) DescribeCloudAssistantStatus(request *DescribeCloudAssistantStatusRequest) (response *DescribeCloudAssistantStatusResponse, err error) { response = CreateDescribeCloudAssistantStatusResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeCloudAssistantStatus(request *DescribeCloudAssista } // DescribeCloudAssistantStatusWithChan invokes the ecs.DescribeCloudAssistantStatus API asynchronously -// api document: https://help.aliyun.com/api/ecs/describecloudassistantstatus.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeCloudAssistantStatusWithChan(request *DescribeCloudAssistantStatusRequest) (<-chan *DescribeCloudAssistantStatusResponse, <-chan error) { responseChan := make(chan *DescribeCloudAssistantStatusResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeCloudAssistantStatusWithChan(request *DescribeClou } // DescribeCloudAssistantStatusWithCallback invokes the ecs.DescribeCloudAssistantStatus API asynchronously -// api document: https://help.aliyun.com/api/ecs/describecloudassistantstatus.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeCloudAssistantStatusWithCallback(request *DescribeCloudAssistantStatusRequest, callback func(response *DescribeCloudAssistantStatusResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,8 +72,11 @@ func (client *Client) DescribeCloudAssistantStatusWithCallback(request *Describe type DescribeCloudAssistantStatusRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` + OSType string `position:"Query" name:"OSType"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` } @@ -87,6 +85,9 @@ type DescribeCloudAssistantStatusRequest struct { type DescribeCloudAssistantStatusResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + PageSize int64 `json:"PageSize" xml:"PageSize"` InstanceCloudAssistantStatusSet InstanceCloudAssistantStatusSet `json:"InstanceCloudAssistantStatusSet" xml:"InstanceCloudAssistantStatusSet"` } @@ -96,6 +97,7 @@ func CreateDescribeCloudAssistantStatusRequest() (request *DescribeCloudAssistan RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeCloudAssistantStatus", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_clusters.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_clusters.go index e6307d9e9..2caac9d64 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_clusters.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_clusters.go @@ -21,7 +21,6 @@ import ( ) // DescribeClusters invokes the ecs.DescribeClusters API synchronously -// api document: https://help.aliyun.com/api/ecs/describeclusters.html func (client *Client) DescribeClusters(request *DescribeClustersRequest) (response *DescribeClustersResponse, err error) { response = CreateDescribeClustersResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeClusters(request *DescribeClustersRequest) (respon } // DescribeClustersWithChan invokes the ecs.DescribeClusters API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeclusters.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeClustersWithChan(request *DescribeClustersRequest) (<-chan *DescribeClustersResponse, <-chan error) { responseChan := make(chan *DescribeClustersResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeClustersWithChan(request *DescribeClustersRequest) } // DescribeClustersWithCallback invokes the ecs.DescribeClusters API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeclusters.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeClustersWithCallback(request *DescribeClustersRequest, callback func(response *DescribeClustersResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateDescribeClustersRequest() (request *DescribeClustersRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeClusters", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_commands.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_commands.go index bddf8f404..c265f35b7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_commands.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_commands.go @@ -21,7 +21,6 @@ import ( ) // DescribeCommands invokes the ecs.DescribeCommands API synchronously -// api document: https://help.aliyun.com/api/ecs/describecommands.html func (client *Client) DescribeCommands(request *DescribeCommandsRequest) (response *DescribeCommandsResponse, err error) { response = CreateDescribeCommandsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeCommands(request *DescribeCommandsRequest) (respon } // DescribeCommandsWithChan invokes the ecs.DescribeCommands API asynchronously -// api document: https://help.aliyun.com/api/ecs/describecommands.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeCommandsWithChan(request *DescribeCommandsRequest) (<-chan *DescribeCommandsResponse, <-chan error) { responseChan := make(chan *DescribeCommandsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeCommandsWithChan(request *DescribeCommandsRequest) } // DescribeCommandsWithCallback invokes the ecs.DescribeCommands API asynchronously -// api document: https://help.aliyun.com/api/ecs/describecommands.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeCommandsWithCallback(request *DescribeCommandsRequest, callback func(response *DescribeCommandsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -81,6 +76,8 @@ type DescribeCommandsRequest struct { Type string `position:"Query" name:"Type"` CommandId string `position:"Query" name:"CommandId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + Provider string `position:"Query" name:"Provider"` + ContentEncoding string `position:"Query" name:"ContentEncoding"` PageSize requests.Integer `position:"Query" name:"PageSize"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` @@ -92,9 +89,9 @@ type DescribeCommandsRequest struct { type DescribeCommandsResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - PageNumber int `json:"PageNumber" xml:"PageNumber"` - PageSize int `json:"PageSize" xml:"PageSize"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + PageSize int64 `json:"PageSize" xml:"PageSize"` Commands Commands `json:"Commands" xml:"Commands"` } @@ -104,6 +101,7 @@ func CreateDescribeCommandsRequest() (request *DescribeCommandsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeCommands", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_auto_renew.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_auto_renew.go index 5ce5dfca6..5bcbad121 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_auto_renew.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_auto_renew.go @@ -21,7 +21,6 @@ import ( ) // DescribeDedicatedHostAutoRenew invokes the ecs.DescribeDedicatedHostAutoRenew API synchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhostautorenew.html func (client *Client) DescribeDedicatedHostAutoRenew(request *DescribeDedicatedHostAutoRenewRequest) (response *DescribeDedicatedHostAutoRenewResponse, err error) { response = CreateDescribeDedicatedHostAutoRenewResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeDedicatedHostAutoRenew(request *DescribeDedicatedH } // DescribeDedicatedHostAutoRenewWithChan invokes the ecs.DescribeDedicatedHostAutoRenew API asynchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhostautorenew.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDedicatedHostAutoRenewWithChan(request *DescribeDedicatedHostAutoRenewRequest) (<-chan *DescribeDedicatedHostAutoRenewResponse, <-chan error) { responseChan := make(chan *DescribeDedicatedHostAutoRenewResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeDedicatedHostAutoRenewWithChan(request *DescribeDe } // DescribeDedicatedHostAutoRenewWithCallback invokes the ecs.DescribeDedicatedHostAutoRenew API asynchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhostautorenew.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDedicatedHostAutoRenewWithCallback(request *DescribeDedicatedHostAutoRenewRequest, callback func(response *DescribeDedicatedHostAutoRenewResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateDescribeDedicatedHostAutoRenewRequest() (request *DescribeDedicatedHo RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDedicatedHostAutoRenew", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_clusters.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_clusters.go new file mode 100644 index 000000000..bdf4fcf98 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_clusters.go @@ -0,0 +1,121 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeDedicatedHostClusters invokes the ecs.DescribeDedicatedHostClusters API synchronously +func (client *Client) DescribeDedicatedHostClusters(request *DescribeDedicatedHostClustersRequest) (response *DescribeDedicatedHostClustersResponse, err error) { + response = CreateDescribeDedicatedHostClustersResponse() + err = client.DoAction(request, response) + return +} + +// DescribeDedicatedHostClustersWithChan invokes the ecs.DescribeDedicatedHostClusters API asynchronously +func (client *Client) DescribeDedicatedHostClustersWithChan(request *DescribeDedicatedHostClustersRequest) (<-chan *DescribeDedicatedHostClustersResponse, <-chan error) { + responseChan := make(chan *DescribeDedicatedHostClustersResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeDedicatedHostClusters(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeDedicatedHostClustersWithCallback invokes the ecs.DescribeDedicatedHostClusters API asynchronously +func (client *Client) DescribeDedicatedHostClustersWithCallback(request *DescribeDedicatedHostClustersRequest, callback func(response *DescribeDedicatedHostClustersResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeDedicatedHostClustersResponse + var err error + defer close(result) + response, err = client.DescribeDedicatedHostClusters(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeDedicatedHostClustersRequest is the request struct for api DescribeDedicatedHostClusters +type DescribeDedicatedHostClustersRequest struct { + *requests.RpcRequest + DedicatedHostClusterName string `position:"Query" name:"DedicatedHostClusterName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + DedicatedHostClusterIds string `position:"Query" name:"DedicatedHostClusterIds"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + LockReason string `position:"Query" name:"LockReason"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + Tag *[]DescribeDedicatedHostClustersTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ZoneId string `position:"Query" name:"ZoneId"` + Status string `position:"Query" name:"Status"` +} + +// DescribeDedicatedHostClustersTag is a repeated param struct in DescribeDedicatedHostClustersRequest +type DescribeDedicatedHostClustersTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DescribeDedicatedHostClustersResponse is the response struct for api DescribeDedicatedHostClusters +type DescribeDedicatedHostClustersResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + DedicatedHostClusters DedicatedHostClusters `json:"DedicatedHostClusters" xml:"DedicatedHostClusters"` +} + +// CreateDescribeDedicatedHostClustersRequest creates a request to invoke DescribeDedicatedHostClusters API +func CreateDescribeDedicatedHostClustersRequest() (request *DescribeDedicatedHostClustersRequest) { + request = &DescribeDedicatedHostClustersRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDedicatedHostClusters", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeDedicatedHostClustersResponse creates a response to parse from DescribeDedicatedHostClusters response +func CreateDescribeDedicatedHostClustersResponse() (response *DescribeDedicatedHostClustersResponse) { + response = &DescribeDedicatedHostClustersResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_types.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_types.go index d708f87d7..af8f9accf 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_types.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_host_types.go @@ -21,7 +21,6 @@ import ( ) // DescribeDedicatedHostTypes invokes the ecs.DescribeDedicatedHostTypes API synchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhosttypes.html func (client *Client) DescribeDedicatedHostTypes(request *DescribeDedicatedHostTypesRequest) (response *DescribeDedicatedHostTypesResponse, err error) { response = CreateDescribeDedicatedHostTypesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeDedicatedHostTypes(request *DescribeDedicatedHostT } // DescribeDedicatedHostTypesWithChan invokes the ecs.DescribeDedicatedHostTypes API asynchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhosttypes.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDedicatedHostTypesWithChan(request *DescribeDedicatedHostTypesRequest) (<-chan *DescribeDedicatedHostTypesResponse, <-chan error) { responseChan := make(chan *DescribeDedicatedHostTypesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeDedicatedHostTypesWithChan(request *DescribeDedica } // DescribeDedicatedHostTypesWithCallback invokes the ecs.DescribeDedicatedHostTypes API asynchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhosttypes.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDedicatedHostTypesWithCallback(request *DescribeDedicatedHostTypesRequest, callback func(response *DescribeDedicatedHostTypesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -97,6 +92,7 @@ func CreateDescribeDedicatedHostTypesRequest() (request *DescribeDedicatedHostTy RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDedicatedHostTypes", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_hosts.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_hosts.go index ae0363c3e..921fc82fe 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_hosts.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_dedicated_hosts.go @@ -21,7 +21,6 @@ import ( ) // DescribeDedicatedHosts invokes the ecs.DescribeDedicatedHosts API synchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhosts.html func (client *Client) DescribeDedicatedHosts(request *DescribeDedicatedHostsRequest) (response *DescribeDedicatedHostsResponse, err error) { response = CreateDescribeDedicatedHostsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeDedicatedHosts(request *DescribeDedicatedHostsRequ } // DescribeDedicatedHostsWithChan invokes the ecs.DescribeDedicatedHosts API asynchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhosts.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDedicatedHostsWithChan(request *DescribeDedicatedHostsRequest) (<-chan *DescribeDedicatedHostsResponse, <-chan error) { responseChan := make(chan *DescribeDedicatedHostsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeDedicatedHostsWithChan(request *DescribeDedicatedH } // DescribeDedicatedHostsWithCallback invokes the ecs.DescribeDedicatedHosts API asynchronously -// api document: https://help.aliyun.com/api/ecs/describededicatedhosts.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDedicatedHostsWithCallback(request *DescribeDedicatedHostsRequest, callback func(response *DescribeDedicatedHostsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,17 +73,18 @@ type DescribeDedicatedHostsRequest struct { *requests.RpcRequest DedicatedHostIds string `position:"Query" name:"DedicatedHostIds"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - DedicatedHostName string `position:"Query" name:"DedicatedHostName"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` LockReason string `position:"Query" name:"LockReason"` PageSize requests.Integer `position:"Query" name:"PageSize"` - ZoneId string `position:"Query" name:"ZoneId"` DedicatedHostType string `position:"Query" name:"DedicatedHostType"` Tag *[]DescribeDedicatedHostsTag `position:"Query" name:"Tag" type:"Repeated"` + NeedHostDetail string `position:"Query" name:"NeedHostDetail"` + DedicatedHostName string `position:"Query" name:"DedicatedHostName"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ZoneId string `position:"Query" name:"ZoneId"` Status string `position:"Query" name:"Status"` } @@ -114,6 +110,7 @@ func CreateDescribeDedicatedHostsRequest() (request *DescribeDedicatedHostsReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDedicatedHosts", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_demands.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_demands.go index f7f07e2a4..de8a9c6b1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_demands.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_demands.go @@ -21,7 +21,6 @@ import ( ) // DescribeDemands invokes the ecs.DescribeDemands API synchronously -// api document: https://help.aliyun.com/api/ecs/describedemands.html func (client *Client) DescribeDemands(request *DescribeDemandsRequest) (response *DescribeDemandsResponse, err error) { response = CreateDescribeDemandsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeDemands(request *DescribeDemandsRequest) (response } // DescribeDemandsWithChan invokes the ecs.DescribeDemands API asynchronously -// api document: https://help.aliyun.com/api/ecs/describedemands.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDemandsWithChan(request *DescribeDemandsRequest) (<-chan *DescribeDemandsResponse, <-chan error) { responseChan := make(chan *DescribeDemandsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeDemandsWithChan(request *DescribeDemandsRequest) ( } // DescribeDemandsWithCallback invokes the ecs.DescribeDemands API asynchronously -// api document: https://help.aliyun.com/api/ecs/describedemands.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDemandsWithCallback(request *DescribeDemandsRequest, callback func(response *DescribeDemandsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -88,7 +83,9 @@ type DescribeDemandsRequest struct { InstanceTypeFamily string `position:"Query" name:"InstanceTypeFamily"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` DemandStatus *[]string `position:"Query" name:"DemandStatus" type:"Repeated"` + DemandId string `position:"Query" name:"DemandId"` ZoneId string `position:"Query" name:"ZoneId"` + DemandType string `position:"Query" name:"DemandType"` } // DescribeDemandsTag is a repeated param struct in DescribeDemandsRequest @@ -114,6 +111,7 @@ func CreateDescribeDemandsRequest() (request *DescribeDemandsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDemands", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_deployment_set_supported_instance_type_family.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_deployment_set_supported_instance_type_family.go new file mode 100644 index 000000000..c40fb62bd --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_deployment_set_supported_instance_type_family.go @@ -0,0 +1,103 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeDeploymentSetSupportedInstanceTypeFamily invokes the ecs.DescribeDeploymentSetSupportedInstanceTypeFamily API synchronously +func (client *Client) DescribeDeploymentSetSupportedInstanceTypeFamily(request *DescribeDeploymentSetSupportedInstanceTypeFamilyRequest) (response *DescribeDeploymentSetSupportedInstanceTypeFamilyResponse, err error) { + response = CreateDescribeDeploymentSetSupportedInstanceTypeFamilyResponse() + err = client.DoAction(request, response) + return +} + +// DescribeDeploymentSetSupportedInstanceTypeFamilyWithChan invokes the ecs.DescribeDeploymentSetSupportedInstanceTypeFamily API asynchronously +func (client *Client) DescribeDeploymentSetSupportedInstanceTypeFamilyWithChan(request *DescribeDeploymentSetSupportedInstanceTypeFamilyRequest) (<-chan *DescribeDeploymentSetSupportedInstanceTypeFamilyResponse, <-chan error) { + responseChan := make(chan *DescribeDeploymentSetSupportedInstanceTypeFamilyResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeDeploymentSetSupportedInstanceTypeFamily(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeDeploymentSetSupportedInstanceTypeFamilyWithCallback invokes the ecs.DescribeDeploymentSetSupportedInstanceTypeFamily API asynchronously +func (client *Client) DescribeDeploymentSetSupportedInstanceTypeFamilyWithCallback(request *DescribeDeploymentSetSupportedInstanceTypeFamilyRequest, callback func(response *DescribeDeploymentSetSupportedInstanceTypeFamilyResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeDeploymentSetSupportedInstanceTypeFamilyResponse + var err error + defer close(result) + response, err = client.DescribeDeploymentSetSupportedInstanceTypeFamily(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeDeploymentSetSupportedInstanceTypeFamilyRequest is the request struct for api DescribeDeploymentSetSupportedInstanceTypeFamily +type DescribeDeploymentSetSupportedInstanceTypeFamilyRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// DescribeDeploymentSetSupportedInstanceTypeFamilyResponse is the response struct for api DescribeDeploymentSetSupportedInstanceTypeFamily +type DescribeDeploymentSetSupportedInstanceTypeFamilyResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceTypeFamilies string `json:"InstanceTypeFamilies" xml:"InstanceTypeFamilies"` +} + +// CreateDescribeDeploymentSetSupportedInstanceTypeFamilyRequest creates a request to invoke DescribeDeploymentSetSupportedInstanceTypeFamily API +func CreateDescribeDeploymentSetSupportedInstanceTypeFamilyRequest() (request *DescribeDeploymentSetSupportedInstanceTypeFamilyRequest) { + request = &DescribeDeploymentSetSupportedInstanceTypeFamilyRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDeploymentSetSupportedInstanceTypeFamily", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeDeploymentSetSupportedInstanceTypeFamilyResponse creates a response to parse from DescribeDeploymentSetSupportedInstanceTypeFamily response +func CreateDescribeDeploymentSetSupportedInstanceTypeFamilyResponse() (response *DescribeDeploymentSetSupportedInstanceTypeFamilyResponse) { + response = &DescribeDeploymentSetSupportedInstanceTypeFamilyResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_deployment_sets.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_deployment_sets.go index 05ed0b56b..d46755a4b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_deployment_sets.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_deployment_sets.go @@ -21,7 +21,6 @@ import ( ) // DescribeDeploymentSets invokes the ecs.DescribeDeploymentSets API synchronously -// api document: https://help.aliyun.com/api/ecs/describedeploymentsets.html func (client *Client) DescribeDeploymentSets(request *DescribeDeploymentSetsRequest) (response *DescribeDeploymentSetsResponse, err error) { response = CreateDescribeDeploymentSetsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeDeploymentSets(request *DescribeDeploymentSetsRequ } // DescribeDeploymentSetsWithChan invokes the ecs.DescribeDeploymentSets API asynchronously -// api document: https://help.aliyun.com/api/ecs/describedeploymentsets.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDeploymentSetsWithChan(request *DescribeDeploymentSetsRequest) (<-chan *DescribeDeploymentSetsResponse, <-chan error) { responseChan := make(chan *DescribeDeploymentSetsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeDeploymentSetsWithChan(request *DescribeDeployment } // DescribeDeploymentSetsWithCallback invokes the ecs.DescribeDeploymentSets API asynchronously -// api document: https://help.aliyun.com/api/ecs/describedeploymentsets.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDeploymentSetsWithCallback(request *DescribeDeploymentSetsRequest, callback func(response *DescribeDeploymentSetsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,16 +72,16 @@ func (client *Client) DescribeDeploymentSetsWithCallback(request *DescribeDeploy type DescribeDeploymentSetsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` NetworkType string `position:"Query" name:"NetworkType"` - DeploymentSetName string `position:"Query" name:"DeploymentSetName"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` DeploymentSetIds string `position:"Query" name:"DeploymentSetIds"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + DeploymentSetName string `position:"Query" name:"DeploymentSetName"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` Granularity string `position:"Query" name:"Granularity"` Domain string `position:"Query" name:"Domain"` - PageSize requests.Integer `position:"Query" name:"PageSize"` Strategy string `position:"Query" name:"Strategy"` } @@ -107,6 +102,7 @@ func CreateDescribeDeploymentSetsRequest() (request *DescribeDeploymentSetsReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDeploymentSets", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disk_monitor_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disk_monitor_data.go index ee9ed6ea4..194d10f39 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disk_monitor_data.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disk_monitor_data.go @@ -21,7 +21,6 @@ import ( ) // DescribeDiskMonitorData invokes the ecs.DescribeDiskMonitorData API synchronously -// api document: https://help.aliyun.com/api/ecs/describediskmonitordata.html func (client *Client) DescribeDiskMonitorData(request *DescribeDiskMonitorDataRequest) (response *DescribeDiskMonitorDataResponse, err error) { response = CreateDescribeDiskMonitorDataResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeDiskMonitorData(request *DescribeDiskMonitorDataRe } // DescribeDiskMonitorDataWithChan invokes the ecs.DescribeDiskMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describediskmonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDiskMonitorDataWithChan(request *DescribeDiskMonitorDataRequest) (<-chan *DescribeDiskMonitorDataResponse, <-chan error) { responseChan := make(chan *DescribeDiskMonitorDataResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeDiskMonitorDataWithChan(request *DescribeDiskMonit } // DescribeDiskMonitorDataWithCallback invokes the ecs.DescribeDiskMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describediskmonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDiskMonitorDataWithCallback(request *DescribeDiskMonitorDataRequest, callback func(response *DescribeDiskMonitorDataResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -100,6 +95,7 @@ func CreateDescribeDiskMonitorDataRequest() (request *DescribeDiskMonitorDataReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDiskMonitorData", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disks.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disks.go index 7eab79e63..6beb8feb9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disks.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disks.go @@ -21,7 +21,6 @@ import ( ) // DescribeDisks invokes the ecs.DescribeDisks API synchronously -// api document: https://help.aliyun.com/api/ecs/describedisks.html func (client *Client) DescribeDisks(request *DescribeDisksRequest) (response *DescribeDisksResponse, err error) { response = CreateDescribeDisksResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeDisks(request *DescribeDisksRequest) (response *De } // DescribeDisksWithChan invokes the ecs.DescribeDisks API asynchronously -// api document: https://help.aliyun.com/api/ecs/describedisks.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDisksWithChan(request *DescribeDisksRequest) (<-chan *DescribeDisksResponse, <-chan error) { responseChan := make(chan *DescribeDisksResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeDisksWithChan(request *DescribeDisksRequest) (<-ch } // DescribeDisksWithCallback invokes the ecs.DescribeDisks API asynchronously -// api document: https://help.aliyun.com/api/ecs/describedisks.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDisksWithCallback(request *DescribeDisksRequest, callback func(response *DescribeDisksResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,38 +72,40 @@ func (client *Client) DescribeDisksWithCallback(request *DescribeDisksRequest, c type DescribeDisksRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - SnapshotId string `position:"Query" name:"SnapshotId"` Filter2Value string `position:"Query" name:"Filter.2.Value"` AutoSnapshotPolicyId string `position:"Query" name:"AutoSnapshotPolicyId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` DiskName string `position:"Query" name:"DiskName"` DeleteAutoSnapshot requests.Boolean `position:"Query" name:"DeleteAutoSnapshot"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` DiskChargeType string `position:"Query" name:"DiskChargeType"` LockReason string `position:"Query" name:"LockReason"` Filter1Key string `position:"Query" name:"Filter.1.Key"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - DiskIds string `position:"Query" name:"DiskIds"` Tag *[]DescribeDisksTag `position:"Query" name:"Tag" type:"Repeated"` - DeleteWithInstance requests.Boolean `position:"Query" name:"DeleteWithInstance"` EnableAutoSnapshot requests.Boolean `position:"Query" name:"EnableAutoSnapshot"` DryRun requests.Boolean `position:"Query" name:"DryRun"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Filter1Value string `position:"Query" name:"Filter.1.Value"` Portable requests.Boolean `position:"Query" name:"Portable"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AdditionalAttributes *[]string `position:"Query" name:"AdditionalAttributes" type:"Repeated"` + InstanceId string `position:"Query" name:"InstanceId"` + ZoneId string `position:"Query" name:"ZoneId"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + Status string `position:"Query" name:"Status"` + SnapshotId string `position:"Query" name:"SnapshotId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + NextToken string `position:"Query" name:"NextToken"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + DiskIds string `position:"Query" name:"DiskIds"` + DeleteWithInstance requests.Boolean `position:"Query" name:"DeleteWithInstance"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` EnableAutomatedSnapshotPolicy requests.Boolean `position:"Query" name:"EnableAutomatedSnapshotPolicy"` Filter2Key string `position:"Query" name:"Filter.2.Key"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` DiskType string `position:"Query" name:"DiskType"` - AdditionalAttributes *[]string `position:"Query" name:"AdditionalAttributes" type:"Repeated"` EnableShared requests.Boolean `position:"Query" name:"EnableShared"` - InstanceId string `position:"Query" name:"InstanceId"` Encrypted requests.Boolean `position:"Query" name:"Encrypted"` - ZoneId string `position:"Query" name:"ZoneId"` Category string `position:"Query" name:"Category"` KMSKeyId string `position:"Query" name:"KMSKeyId"` - Status string `position:"Query" name:"Status"` } // DescribeDisksTag is a repeated param struct in DescribeDisksRequest @@ -120,11 +117,12 @@ type DescribeDisksTag struct { // DescribeDisksResponse is the response struct for api DescribeDisks type DescribeDisksResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - PageNumber int `json:"PageNumber" xml:"PageNumber"` - PageSize int `json:"PageSize" xml:"PageSize"` - Disks Disks `json:"Disks" xml:"Disks"` + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + NextToken string `json:"NextToken" xml:"NextToken"` + Disks DisksInDescribeDisks `json:"Disks" xml:"Disks"` } // CreateDescribeDisksRequest creates a request to invoke DescribeDisks API @@ -133,6 +131,7 @@ func CreateDescribeDisksRequest() (request *DescribeDisksRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDisks", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disks_full_status.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disks_full_status.go index d9ec70e3f..4990b7c54 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disks_full_status.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_disks_full_status.go @@ -21,7 +21,6 @@ import ( ) // DescribeDisksFullStatus invokes the ecs.DescribeDisksFullStatus API synchronously -// api document: https://help.aliyun.com/api/ecs/describedisksfullstatus.html func (client *Client) DescribeDisksFullStatus(request *DescribeDisksFullStatusRequest) (response *DescribeDisksFullStatusResponse, err error) { response = CreateDescribeDisksFullStatusResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeDisksFullStatus(request *DescribeDisksFullStatusRe } // DescribeDisksFullStatusWithChan invokes the ecs.DescribeDisksFullStatus API asynchronously -// api document: https://help.aliyun.com/api/ecs/describedisksfullstatus.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDisksFullStatusWithChan(request *DescribeDisksFullStatusRequest) (<-chan *DescribeDisksFullStatusResponse, <-chan error) { responseChan := make(chan *DescribeDisksFullStatusResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeDisksFullStatusWithChan(request *DescribeDisksFull } // DescribeDisksFullStatusWithCallback invokes the ecs.DescribeDisksFullStatus API asynchronously -// api document: https://help.aliyun.com/api/ecs/describedisksfullstatus.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeDisksFullStatusWithCallback(request *DescribeDisksFullStatusRequest, callback func(response *DescribeDisksFullStatusResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -107,6 +102,7 @@ func CreateDescribeDisksFullStatusRequest() (request *DescribeDisksFullStatusReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeDisksFullStatus", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eip_addresses.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eip_addresses.go index 6f72aff39..248da1f02 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eip_addresses.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eip_addresses.go @@ -21,7 +21,6 @@ import ( ) // DescribeEipAddresses invokes the ecs.DescribeEipAddresses API synchronously -// api document: https://help.aliyun.com/api/ecs/describeeipaddresses.html func (client *Client) DescribeEipAddresses(request *DescribeEipAddressesRequest) (response *DescribeEipAddressesResponse, err error) { response = CreateDescribeEipAddressesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeEipAddresses(request *DescribeEipAddressesRequest) } // DescribeEipAddressesWithChan invokes the ecs.DescribeEipAddresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeeipaddresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeEipAddressesWithChan(request *DescribeEipAddressesRequest) (<-chan *DescribeEipAddressesResponse, <-chan error) { responseChan := make(chan *DescribeEipAddressesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeEipAddressesWithChan(request *DescribeEipAddresses } // DescribeEipAddressesWithCallback invokes the ecs.DescribeEipAddresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeeipaddresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeEipAddressesWithCallback(request *DescribeEipAddressesRequest, callback func(response *DescribeEipAddressesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,20 +72,20 @@ func (client *Client) DescribeEipAddressesWithCallback(request *DescribeEipAddre type DescribeEipAddressesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` Filter2Value string `position:"Query" name:"Filter.2.Value"` ISP string `position:"Query" name:"ISP"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` AllocationId string `position:"Query" name:"AllocationId"` - Filter1Value string `position:"Query" name:"Filter.1.Value"` - Filter2Key string `position:"Query" name:"Filter.2.Key"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` EipAddress string `position:"Query" name:"EipAddress"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` LockReason string `position:"Query" name:"LockReason"` Filter1Key string `position:"Query" name:"Filter.1.Key"` AssociatedInstanceType string `position:"Query" name:"AssociatedInstanceType"` PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + Filter1Value string `position:"Query" name:"Filter.1.Value"` + Filter2Key string `position:"Query" name:"Filter.2.Key"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` ChargeType string `position:"Query" name:"ChargeType"` AssociatedInstanceId string `position:"Query" name:"AssociatedInstanceId"` Status string `position:"Query" name:"Status"` @@ -112,6 +107,7 @@ func CreateDescribeEipAddressesRequest() (request *DescribeEipAddressesRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeEipAddresses", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eip_monitor_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eip_monitor_data.go index 4efa1d896..cb37c4e57 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eip_monitor_data.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eip_monitor_data.go @@ -21,7 +21,6 @@ import ( ) // DescribeEipMonitorData invokes the ecs.DescribeEipMonitorData API synchronously -// api document: https://help.aliyun.com/api/ecs/describeeipmonitordata.html func (client *Client) DescribeEipMonitorData(request *DescribeEipMonitorDataRequest) (response *DescribeEipMonitorDataResponse, err error) { response = CreateDescribeEipMonitorDataResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeEipMonitorData(request *DescribeEipMonitorDataRequ } // DescribeEipMonitorDataWithChan invokes the ecs.DescribeEipMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeeipmonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeEipMonitorDataWithChan(request *DescribeEipMonitorDataRequest) (<-chan *DescribeEipMonitorDataResponse, <-chan error) { responseChan := make(chan *DescribeEipMonitorDataResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeEipMonitorDataWithChan(request *DescribeEipMonitor } // DescribeEipMonitorDataWithCallback invokes the ecs.DescribeEipMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeeipmonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeEipMonitorDataWithCallback(request *DescribeEipMonitorDataRequest, callback func(response *DescribeEipMonitorDataResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) DescribeEipMonitorDataWithCallback(request *DescribeEipMon type DescribeEipMonitorDataRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + AllocationId string `position:"Query" name:"AllocationId"` + StartTime string `position:"Query" name:"StartTime"` Period requests.Integer `position:"Query" name:"Period"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` EndTime string `position:"Query" name:"EndTime"` - AllocationId string `position:"Query" name:"AllocationId"` - StartTime string `position:"Query" name:"StartTime"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -99,6 +94,7 @@ func CreateDescribeEipMonitorDataRequest() (request *DescribeEipMonitorDataReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeEipMonitorData", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_elasticity_assurance_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_elasticity_assurance_instances.go new file mode 100644 index 000000000..8c5676269 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_elasticity_assurance_instances.go @@ -0,0 +1,110 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeElasticityAssuranceInstances invokes the ecs.DescribeElasticityAssuranceInstances API synchronously +func (client *Client) DescribeElasticityAssuranceInstances(request *DescribeElasticityAssuranceInstancesRequest) (response *DescribeElasticityAssuranceInstancesResponse, err error) { + response = CreateDescribeElasticityAssuranceInstancesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeElasticityAssuranceInstancesWithChan invokes the ecs.DescribeElasticityAssuranceInstances API asynchronously +func (client *Client) DescribeElasticityAssuranceInstancesWithChan(request *DescribeElasticityAssuranceInstancesRequest) (<-chan *DescribeElasticityAssuranceInstancesResponse, <-chan error) { + responseChan := make(chan *DescribeElasticityAssuranceInstancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeElasticityAssuranceInstances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeElasticityAssuranceInstancesWithCallback invokes the ecs.DescribeElasticityAssuranceInstances API asynchronously +func (client *Client) DescribeElasticityAssuranceInstancesWithCallback(request *DescribeElasticityAssuranceInstancesRequest, callback func(response *DescribeElasticityAssuranceInstancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeElasticityAssuranceInstancesResponse + var err error + defer close(result) + response, err = client.DescribeElasticityAssuranceInstances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeElasticityAssuranceInstancesRequest is the request struct for api DescribeElasticityAssuranceInstances +type DescribeElasticityAssuranceInstancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + NextToken string `position:"Query" name:"NextToken"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + PackageType string `position:"Query" name:"PackageType"` +} + +// DescribeElasticityAssuranceInstancesResponse is the response struct for api DescribeElasticityAssuranceInstances +type DescribeElasticityAssuranceInstancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + NextToken string `json:"NextToken" xml:"NextToken"` + MaxResults int `json:"MaxResults" xml:"MaxResults"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + ElasticityAssuranceItem ElasticityAssuranceItemInDescribeElasticityAssuranceInstances `json:"ElasticityAssuranceItem" xml:"ElasticityAssuranceItem"` +} + +// CreateDescribeElasticityAssuranceInstancesRequest creates a request to invoke DescribeElasticityAssuranceInstances API +func CreateDescribeElasticityAssuranceInstancesRequest() (request *DescribeElasticityAssuranceInstancesRequest) { + request = &DescribeElasticityAssuranceInstancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeElasticityAssuranceInstances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeElasticityAssuranceInstancesResponse creates a response to parse from DescribeElasticityAssuranceInstances response +func CreateDescribeElasticityAssuranceInstancesResponse() (response *DescribeElasticityAssuranceInstancesResponse) { + response = &DescribeElasticityAssuranceInstancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_elasticity_assurances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_elasticity_assurances.go new file mode 100644 index 000000000..b38795a5f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_elasticity_assurances.go @@ -0,0 +1,123 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeElasticityAssurances invokes the ecs.DescribeElasticityAssurances API synchronously +func (client *Client) DescribeElasticityAssurances(request *DescribeElasticityAssurancesRequest) (response *DescribeElasticityAssurancesResponse, err error) { + response = CreateDescribeElasticityAssurancesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeElasticityAssurancesWithChan invokes the ecs.DescribeElasticityAssurances API asynchronously +func (client *Client) DescribeElasticityAssurancesWithChan(request *DescribeElasticityAssurancesRequest) (<-chan *DescribeElasticityAssurancesResponse, <-chan error) { + responseChan := make(chan *DescribeElasticityAssurancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeElasticityAssurances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeElasticityAssurancesWithCallback invokes the ecs.DescribeElasticityAssurances API asynchronously +func (client *Client) DescribeElasticityAssurancesWithCallback(request *DescribeElasticityAssurancesRequest, callback func(response *DescribeElasticityAssurancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeElasticityAssurancesResponse + var err error + defer close(result) + response, err = client.DescribeElasticityAssurances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeElasticityAssurancesRequest is the request struct for api DescribeElasticityAssurances +type DescribeElasticityAssurancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Platform string `position:"Query" name:"Platform"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + NextToken string `position:"Query" name:"NextToken"` + InstanceType string `position:"Query" name:"InstanceType"` + Tag *[]DescribeElasticityAssurancesTag `position:"Query" name:"Tag" type:"Repeated"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PrivatePoolOptionsIds string `position:"Query" name:"PrivatePoolOptions.Ids"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + ZoneId string `position:"Query" name:"ZoneId"` + PackageType string `position:"Query" name:"PackageType"` + Status string `position:"Query" name:"Status"` +} + +// DescribeElasticityAssurancesTag is a repeated param struct in DescribeElasticityAssurancesRequest +type DescribeElasticityAssurancesTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DescribeElasticityAssurancesResponse is the response struct for api DescribeElasticityAssurances +type DescribeElasticityAssurancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + NextToken string `json:"NextToken" xml:"NextToken"` + MaxResults int `json:"MaxResults" xml:"MaxResults"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + ElasticityAssuranceSet ElasticityAssuranceSet `json:"ElasticityAssuranceSet" xml:"ElasticityAssuranceSet"` +} + +// CreateDescribeElasticityAssurancesRequest creates a request to invoke DescribeElasticityAssurances API +func CreateDescribeElasticityAssurancesRequest() (request *DescribeElasticityAssurancesRequest) { + request = &DescribeElasticityAssurancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeElasticityAssurances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeElasticityAssurancesResponse creates a response to parse from DescribeElasticityAssurances response +func CreateDescribeElasticityAssurancesResponse() (response *DescribeElasticityAssurancesResponse) { + response = &DescribeElasticityAssurancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eni_monitor_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eni_monitor_data.go index 75c143c8b..0dcb4b2d3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eni_monitor_data.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_eni_monitor_data.go @@ -21,7 +21,6 @@ import ( ) // DescribeEniMonitorData invokes the ecs.DescribeEniMonitorData API synchronously -// api document: https://help.aliyun.com/api/ecs/describeenimonitordata.html func (client *Client) DescribeEniMonitorData(request *DescribeEniMonitorDataRequest) (response *DescribeEniMonitorDataResponse, err error) { response = CreateDescribeEniMonitorDataResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeEniMonitorData(request *DescribeEniMonitorDataRequ } // DescribeEniMonitorDataWithChan invokes the ecs.DescribeEniMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeenimonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeEniMonitorDataWithChan(request *DescribeEniMonitorDataRequest) (<-chan *DescribeEniMonitorDataResponse, <-chan error) { responseChan := make(chan *DescribeEniMonitorDataResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeEniMonitorDataWithChan(request *DescribeEniMonitor } // DescribeEniMonitorDataWithCallback invokes the ecs.DescribeEniMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeenimonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeEniMonitorDataWithCallback(request *DescribeEniMonitorDataRequest, callback func(response *DescribeEniMonitorDataResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -101,6 +96,7 @@ func CreateDescribeEniMonitorDataRequest() (request *DescribeEniMonitorDataReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeEniMonitorData", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_forward_table_entries.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_forward_table_entries.go index 674c92966..72007ba12 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_forward_table_entries.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_forward_table_entries.go @@ -21,7 +21,6 @@ import ( ) // DescribeForwardTableEntries invokes the ecs.DescribeForwardTableEntries API synchronously -// api document: https://help.aliyun.com/api/ecs/describeforwardtableentries.html func (client *Client) DescribeForwardTableEntries(request *DescribeForwardTableEntriesRequest) (response *DescribeForwardTableEntriesResponse, err error) { response = CreateDescribeForwardTableEntriesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeForwardTableEntries(request *DescribeForwardTableE } // DescribeForwardTableEntriesWithChan invokes the ecs.DescribeForwardTableEntries API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeforwardtableentries.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeForwardTableEntriesWithChan(request *DescribeForwardTableEntriesRequest) (<-chan *DescribeForwardTableEntriesResponse, <-chan error) { responseChan := make(chan *DescribeForwardTableEntriesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeForwardTableEntriesWithChan(request *DescribeForwa } // DescribeForwardTableEntriesWithCallback invokes the ecs.DescribeForwardTableEntries API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeforwardtableentries.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeForwardTableEntriesWithCallback(request *DescribeForwardTableEntriesRequest, callback func(response *DescribeForwardTableEntriesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,13 @@ func (client *Client) DescribeForwardTableEntriesWithCallback(request *DescribeF type DescribeForwardTableEntriesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ForwardEntryId string `position:"Query" name:"ForwardEntryId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` ForwardTableId string `position:"Query" name:"ForwardTableId"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + ForwardEntryId string `position:"Query" name:"ForwardEntryId"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` } // DescribeForwardTableEntriesResponse is the response struct for api DescribeForwardTableEntries @@ -102,6 +97,7 @@ func CreateDescribeForwardTableEntriesRequest() (request *DescribeForwardTableEn RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeForwardTableEntries", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_ha_vips.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_ha_vips.go index 9dbe5b13c..42db67289 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_ha_vips.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_ha_vips.go @@ -21,7 +21,6 @@ import ( ) // DescribeHaVips invokes the ecs.DescribeHaVips API synchronously -// api document: https://help.aliyun.com/api/ecs/describehavips.html func (client *Client) DescribeHaVips(request *DescribeHaVipsRequest) (response *DescribeHaVipsResponse, err error) { response = CreateDescribeHaVipsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeHaVips(request *DescribeHaVipsRequest) (response * } // DescribeHaVipsWithChan invokes the ecs.DescribeHaVips API asynchronously -// api document: https://help.aliyun.com/api/ecs/describehavips.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeHaVipsWithChan(request *DescribeHaVipsRequest) (<-chan *DescribeHaVipsResponse, <-chan error) { responseChan := make(chan *DescribeHaVipsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeHaVipsWithChan(request *DescribeHaVipsRequest) (<- } // DescribeHaVipsWithCallback invokes the ecs.DescribeHaVips API asynchronously -// api document: https://help.aliyun.com/api/ecs/describehavips.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeHaVipsWithCallback(request *DescribeHaVipsRequest, callback func(response *DescribeHaVipsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,13 +71,13 @@ func (client *Client) DescribeHaVipsWithCallback(request *DescribeHaVipsRequest, // DescribeHaVipsRequest is the request struct for api DescribeHaVips type DescribeHaVipsRequest struct { *requests.RpcRequest - Filter *[]DescribeHaVipsFilter `position:"Query" name:"Filter" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + Filter *[]DescribeHaVipsFilter `position:"Query" name:"Filter" type:"Repeated"` } // DescribeHaVipsFilter is a repeated param struct in DescribeHaVipsRequest @@ -107,6 +102,7 @@ func CreateDescribeHaVipsRequest() (request *DescribeHaVipsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeHaVips", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_hpc_clusters.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_hpc_clusters.go index 637ddc073..bea7419a6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_hpc_clusters.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_hpc_clusters.go @@ -21,7 +21,6 @@ import ( ) // DescribeHpcClusters invokes the ecs.DescribeHpcClusters API synchronously -// api document: https://help.aliyun.com/api/ecs/describehpcclusters.html func (client *Client) DescribeHpcClusters(request *DescribeHpcClustersRequest) (response *DescribeHpcClustersResponse, err error) { response = CreateDescribeHpcClustersResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeHpcClusters(request *DescribeHpcClustersRequest) ( } // DescribeHpcClustersWithChan invokes the ecs.DescribeHpcClusters API asynchronously -// api document: https://help.aliyun.com/api/ecs/describehpcclusters.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeHpcClustersWithChan(request *DescribeHpcClustersRequest) (<-chan *DescribeHpcClustersResponse, <-chan error) { responseChan := make(chan *DescribeHpcClustersResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeHpcClustersWithChan(request *DescribeHpcClustersRe } // DescribeHpcClustersWithCallback invokes the ecs.DescribeHpcClusters API asynchronously -// api document: https://help.aliyun.com/api/ecs/describehpcclusters.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeHpcClustersWithCallback(request *DescribeHpcClustersRequest, callback func(response *DescribeHpcClustersResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -102,6 +97,7 @@ func CreateDescribeHpcClustersRequest() (request *DescribeHpcClustersRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeHpcClusters", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_components.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_components.go new file mode 100644 index 000000000..34af17001 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_components.go @@ -0,0 +1,118 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeImageComponents invokes the ecs.DescribeImageComponents API synchronously +func (client *Client) DescribeImageComponents(request *DescribeImageComponentsRequest) (response *DescribeImageComponentsResponse, err error) { + response = CreateDescribeImageComponentsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeImageComponentsWithChan invokes the ecs.DescribeImageComponents API asynchronously +func (client *Client) DescribeImageComponentsWithChan(request *DescribeImageComponentsRequest) (<-chan *DescribeImageComponentsResponse, <-chan error) { + responseChan := make(chan *DescribeImageComponentsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeImageComponents(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeImageComponentsWithCallback invokes the ecs.DescribeImageComponents API asynchronously +func (client *Client) DescribeImageComponentsWithCallback(request *DescribeImageComponentsRequest, callback func(response *DescribeImageComponentsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeImageComponentsResponse + var err error + defer close(result) + response, err = client.DescribeImageComponents(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeImageComponentsRequest is the request struct for api DescribeImageComponents +type DescribeImageComponentsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ImageComponentId *[]string `position:"Query" name:"ImageComponentId" type:"Repeated"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + NextToken string `position:"Query" name:"NextToken"` + Tag *[]DescribeImageComponentsTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Name string `position:"Query" name:"Name"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` +} + +// DescribeImageComponentsTag is a repeated param struct in DescribeImageComponentsRequest +type DescribeImageComponentsTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DescribeImageComponentsResponse is the response struct for api DescribeImageComponents +type DescribeImageComponentsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + NextToken string `json:"NextToken" xml:"NextToken"` + MaxResults int `json:"MaxResults" xml:"MaxResults"` + ImageComponent ImageComponent `json:"ImageComponent" xml:"ImageComponent"` +} + +// CreateDescribeImageComponentsRequest creates a request to invoke DescribeImageComponents API +func CreateDescribeImageComponentsRequest() (request *DescribeImageComponentsRequest) { + request = &DescribeImageComponentsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeImageComponents", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeImageComponentsResponse creates a response to parse from DescribeImageComponents response +func CreateDescribeImageComponentsResponse() (response *DescribeImageComponentsResponse) { + response = &DescribeImageComponentsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_from_family.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_from_family.go new file mode 100644 index 000000000..85cfe891f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_from_family.go @@ -0,0 +1,104 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeImageFromFamily invokes the ecs.DescribeImageFromFamily API synchronously +func (client *Client) DescribeImageFromFamily(request *DescribeImageFromFamilyRequest) (response *DescribeImageFromFamilyResponse, err error) { + response = CreateDescribeImageFromFamilyResponse() + err = client.DoAction(request, response) + return +} + +// DescribeImageFromFamilyWithChan invokes the ecs.DescribeImageFromFamily API asynchronously +func (client *Client) DescribeImageFromFamilyWithChan(request *DescribeImageFromFamilyRequest) (<-chan *DescribeImageFromFamilyResponse, <-chan error) { + responseChan := make(chan *DescribeImageFromFamilyResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeImageFromFamily(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeImageFromFamilyWithCallback invokes the ecs.DescribeImageFromFamily API asynchronously +func (client *Client) DescribeImageFromFamilyWithCallback(request *DescribeImageFromFamilyRequest, callback func(response *DescribeImageFromFamilyResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeImageFromFamilyResponse + var err error + defer close(result) + response, err = client.DescribeImageFromFamily(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeImageFromFamilyRequest is the request struct for api DescribeImageFromFamily +type DescribeImageFromFamilyRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ImageFamily string `position:"Query" name:"ImageFamily"` +} + +// DescribeImageFromFamilyResponse is the response struct for api DescribeImageFromFamily +type DescribeImageFromFamilyResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Image Image `json:"Image" xml:"Image"` +} + +// CreateDescribeImageFromFamilyRequest creates a request to invoke DescribeImageFromFamily API +func CreateDescribeImageFromFamilyRequest() (request *DescribeImageFromFamilyRequest) { + request = &DescribeImageFromFamilyRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeImageFromFamily", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeImageFromFamilyResponse creates a response to parse from DescribeImageFromFamily response +func CreateDescribeImageFromFamilyResponse() (response *DescribeImageFromFamilyResponse) { + response = &DescribeImageFromFamilyResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_pipeline_executions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_pipeline_executions.go new file mode 100644 index 000000000..12ef8d1d7 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_pipeline_executions.go @@ -0,0 +1,118 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeImagePipelineExecutions invokes the ecs.DescribeImagePipelineExecutions API synchronously +func (client *Client) DescribeImagePipelineExecutions(request *DescribeImagePipelineExecutionsRequest) (response *DescribeImagePipelineExecutionsResponse, err error) { + response = CreateDescribeImagePipelineExecutionsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeImagePipelineExecutionsWithChan invokes the ecs.DescribeImagePipelineExecutions API asynchronously +func (client *Client) DescribeImagePipelineExecutionsWithChan(request *DescribeImagePipelineExecutionsRequest) (<-chan *DescribeImagePipelineExecutionsResponse, <-chan error) { + responseChan := make(chan *DescribeImagePipelineExecutionsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeImagePipelineExecutions(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeImagePipelineExecutionsWithCallback invokes the ecs.DescribeImagePipelineExecutions API asynchronously +func (client *Client) DescribeImagePipelineExecutionsWithCallback(request *DescribeImagePipelineExecutionsRequest, callback func(response *DescribeImagePipelineExecutionsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeImagePipelineExecutionsResponse + var err error + defer close(result) + response, err = client.DescribeImagePipelineExecutions(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeImagePipelineExecutionsRequest is the request struct for api DescribeImagePipelineExecutions +type DescribeImagePipelineExecutionsRequest struct { + *requests.RpcRequest + ImagePipelineId string `position:"Query" name:"ImagePipelineId"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ExecutionId string `position:"Query" name:"ExecutionId"` + NextToken string `position:"Query" name:"NextToken"` + Tag *[]DescribeImagePipelineExecutionsTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + Status string `position:"Query" name:"Status"` +} + +// DescribeImagePipelineExecutionsTag is a repeated param struct in DescribeImagePipelineExecutionsRequest +type DescribeImagePipelineExecutionsTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DescribeImagePipelineExecutionsResponse is the response struct for api DescribeImagePipelineExecutions +type DescribeImagePipelineExecutionsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + NextToken string `json:"NextToken" xml:"NextToken"` + MaxResults int `json:"MaxResults" xml:"MaxResults"` + ImagePipelineExecution ImagePipelineExecution `json:"ImagePipelineExecution" xml:"ImagePipelineExecution"` +} + +// CreateDescribeImagePipelineExecutionsRequest creates a request to invoke DescribeImagePipelineExecutions API +func CreateDescribeImagePipelineExecutionsRequest() (request *DescribeImagePipelineExecutionsRequest) { + request = &DescribeImagePipelineExecutionsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeImagePipelineExecutions", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeImagePipelineExecutionsResponse creates a response to parse from DescribeImagePipelineExecutions response +func CreateDescribeImagePipelineExecutionsResponse() (response *DescribeImagePipelineExecutionsResponse) { + response = &DescribeImagePipelineExecutionsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_pipelines.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_pipelines.go new file mode 100644 index 000000000..fd5897cd2 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_pipelines.go @@ -0,0 +1,118 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeImagePipelines invokes the ecs.DescribeImagePipelines API synchronously +func (client *Client) DescribeImagePipelines(request *DescribeImagePipelinesRequest) (response *DescribeImagePipelinesResponse, err error) { + response = CreateDescribeImagePipelinesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeImagePipelinesWithChan invokes the ecs.DescribeImagePipelines API asynchronously +func (client *Client) DescribeImagePipelinesWithChan(request *DescribeImagePipelinesRequest) (<-chan *DescribeImagePipelinesResponse, <-chan error) { + responseChan := make(chan *DescribeImagePipelinesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeImagePipelines(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeImagePipelinesWithCallback invokes the ecs.DescribeImagePipelines API asynchronously +func (client *Client) DescribeImagePipelinesWithCallback(request *DescribeImagePipelinesRequest, callback func(response *DescribeImagePipelinesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeImagePipelinesResponse + var err error + defer close(result) + response, err = client.DescribeImagePipelines(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeImagePipelinesRequest is the request struct for api DescribeImagePipelines +type DescribeImagePipelinesRequest struct { + *requests.RpcRequest + ImagePipelineId *[]string `position:"Query" name:"ImagePipelineId" type:"Repeated"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + NextToken string `position:"Query" name:"NextToken"` + Tag *[]DescribeImagePipelinesTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Name string `position:"Query" name:"Name"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` +} + +// DescribeImagePipelinesTag is a repeated param struct in DescribeImagePipelinesRequest +type DescribeImagePipelinesTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DescribeImagePipelinesResponse is the response struct for api DescribeImagePipelines +type DescribeImagePipelinesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + NextToken string `json:"NextToken" xml:"NextToken"` + MaxResults int `json:"MaxResults" xml:"MaxResults"` + ImagePipeline ImagePipeline `json:"ImagePipeline" xml:"ImagePipeline"` +} + +// CreateDescribeImagePipelinesRequest creates a request to invoke DescribeImagePipelines API +func CreateDescribeImagePipelinesRequest() (request *DescribeImagePipelinesRequest) { + request = &DescribeImagePipelinesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeImagePipelines", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeImagePipelinesResponse creates a response to parse from DescribeImagePipelines response +func CreateDescribeImagePipelinesResponse() (response *DescribeImagePipelinesResponse) { + response = &DescribeImagePipelinesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_share_permission.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_share_permission.go index ff10b8d4b..46266b1f9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_share_permission.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_share_permission.go @@ -21,7 +21,6 @@ import ( ) // DescribeImageSharePermission invokes the ecs.DescribeImageSharePermission API synchronously -// api document: https://help.aliyun.com/api/ecs/describeimagesharepermission.html func (client *Client) DescribeImageSharePermission(request *DescribeImageSharePermissionRequest) (response *DescribeImageSharePermissionResponse, err error) { response = CreateDescribeImageSharePermissionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeImageSharePermission(request *DescribeImageSharePe } // DescribeImageSharePermissionWithChan invokes the ecs.DescribeImageSharePermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeimagesharepermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeImageSharePermissionWithChan(request *DescribeImageSharePermissionRequest) (<-chan *DescribeImageSharePermissionResponse, <-chan error) { responseChan := make(chan *DescribeImageSharePermissionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeImageSharePermissionWithChan(request *DescribeImag } // DescribeImageSharePermissionWithCallback invokes the ecs.DescribeImageSharePermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeimagesharepermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeImageSharePermissionWithCallback(request *DescribeImageSharePermissionRequest, callback func(response *DescribeImageSharePermissionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,11 +73,11 @@ type DescribeImageSharePermissionRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ImageId string `position:"Query" name:"ImageId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` } // DescribeImageSharePermissionResponse is the response struct for api DescribeImageSharePermission @@ -104,6 +99,7 @@ func CreateDescribeImageSharePermissionRequest() (request *DescribeImageSharePer RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeImageSharePermission", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_support_instance_types.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_support_instance_types.go index bb11efd6c..b55004e21 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_support_instance_types.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_image_support_instance_types.go @@ -21,7 +21,6 @@ import ( ) // DescribeImageSupportInstanceTypes invokes the ecs.DescribeImageSupportInstanceTypes API synchronously -// api document: https://help.aliyun.com/api/ecs/describeimagesupportinstancetypes.html func (client *Client) DescribeImageSupportInstanceTypes(request *DescribeImageSupportInstanceTypesRequest) (response *DescribeImageSupportInstanceTypesResponse, err error) { response = CreateDescribeImageSupportInstanceTypesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeImageSupportInstanceTypes(request *DescribeImageSu } // DescribeImageSupportInstanceTypesWithChan invokes the ecs.DescribeImageSupportInstanceTypes API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeimagesupportinstancetypes.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeImageSupportInstanceTypesWithChan(request *DescribeImageSupportInstanceTypesRequest) (<-chan *DescribeImageSupportInstanceTypesResponse, <-chan error) { responseChan := make(chan *DescribeImageSupportInstanceTypesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeImageSupportInstanceTypesWithChan(request *Describ } // DescribeImageSupportInstanceTypesWithCallback invokes the ecs.DescribeImageSupportInstanceTypes API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeimagesupportinstancetypes.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeImageSupportInstanceTypesWithCallback(request *DescribeImageSupportInstanceTypesRequest, callback func(response *DescribeImageSupportInstanceTypesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,11 @@ func (client *Client) DescribeImageSupportInstanceTypesWithCallback(request *Des type DescribeImageSupportInstanceTypesRequest struct { *requests.RpcRequest ActionType string `position:"Query" name:"ActionType"` - Filter *[]DescribeImageSupportInstanceTypesFilter `position:"Query" name:"Filter" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ImageId string `position:"Query" name:"ImageId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Filter *[]DescribeImageSupportInstanceTypesFilter `position:"Query" name:"Filter" type:"Repeated"` } // DescribeImageSupportInstanceTypesFilter is a repeated param struct in DescribeImageSupportInstanceTypesRequest @@ -105,6 +100,7 @@ func CreateDescribeImageSupportInstanceTypesRequest() (request *DescribeImageSup RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeImageSupportInstanceTypes", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_images.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_images.go index d0b64ab64..2191c9b65 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_images.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_images.go @@ -21,7 +21,6 @@ import ( ) // DescribeImages invokes the ecs.DescribeImages API synchronously -// api document: https://help.aliyun.com/api/ecs/describeimages.html func (client *Client) DescribeImages(request *DescribeImagesRequest) (response *DescribeImagesResponse, err error) { response = CreateDescribeImagesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeImages(request *DescribeImagesRequest) (response * } // DescribeImagesWithChan invokes the ecs.DescribeImages API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeimages.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeImagesWithChan(request *DescribeImagesRequest) (<-chan *DescribeImagesResponse, <-chan error) { responseChan := make(chan *DescribeImagesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeImagesWithChan(request *DescribeImagesRequest) (<- } // DescribeImagesWithCallback invokes the ecs.DescribeImages API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeimages.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeImagesWithCallback(request *DescribeImagesRequest, callback func(response *DescribeImagesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -98,6 +93,7 @@ type DescribeImagesRequest struct { OSType string `position:"Query" name:"OSType"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` Filter *[]DescribeImagesFilter `position:"Query" name:"Filter" type:"Repeated"` + ImageFamily string `position:"Query" name:"ImageFamily"` Status string `position:"Query" name:"Status"` } @@ -130,6 +126,7 @@ func CreateDescribeImagesRequest() (request *DescribeImagesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeImages", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_attachment_attributes.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_attachment_attributes.go new file mode 100644 index 000000000..c8b9a9036 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_attachment_attributes.go @@ -0,0 +1,109 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeInstanceAttachmentAttributes invokes the ecs.DescribeInstanceAttachmentAttributes API synchronously +func (client *Client) DescribeInstanceAttachmentAttributes(request *DescribeInstanceAttachmentAttributesRequest) (response *DescribeInstanceAttachmentAttributesResponse, err error) { + response = CreateDescribeInstanceAttachmentAttributesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeInstanceAttachmentAttributesWithChan invokes the ecs.DescribeInstanceAttachmentAttributes API asynchronously +func (client *Client) DescribeInstanceAttachmentAttributesWithChan(request *DescribeInstanceAttachmentAttributesRequest) (<-chan *DescribeInstanceAttachmentAttributesResponse, <-chan error) { + responseChan := make(chan *DescribeInstanceAttachmentAttributesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeInstanceAttachmentAttributes(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeInstanceAttachmentAttributesWithCallback invokes the ecs.DescribeInstanceAttachmentAttributes API asynchronously +func (client *Client) DescribeInstanceAttachmentAttributesWithCallback(request *DescribeInstanceAttachmentAttributesRequest, callback func(response *DescribeInstanceAttachmentAttributesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeInstanceAttachmentAttributesResponse + var err error + defer close(result) + response, err = client.DescribeInstanceAttachmentAttributes(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeInstanceAttachmentAttributesRequest is the request struct for api DescribeInstanceAttachmentAttributes +type DescribeInstanceAttachmentAttributesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceIds string `position:"Query" name:"InstanceIds"` +} + +// DescribeInstanceAttachmentAttributesResponse is the response struct for api DescribeInstanceAttachmentAttributes +type DescribeInstanceAttachmentAttributesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + Instances InstancesInDescribeInstanceAttachmentAttributes `json:"Instances" xml:"Instances"` +} + +// CreateDescribeInstanceAttachmentAttributesRequest creates a request to invoke DescribeInstanceAttachmentAttributes API +func CreateDescribeInstanceAttachmentAttributesRequest() (request *DescribeInstanceAttachmentAttributesRequest) { + request = &DescribeInstanceAttachmentAttributesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceAttachmentAttributes", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeInstanceAttachmentAttributesResponse creates a response to parse from DescribeInstanceAttachmentAttributes response +func CreateDescribeInstanceAttachmentAttributesResponse() (response *DescribeInstanceAttachmentAttributesResponse) { + response = &DescribeInstanceAttachmentAttributesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_attribute.go index 66d399089..f38378338 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_attribute.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceAttribute invokes the ecs.DescribeInstanceAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceattribute.html func (client *Client) DescribeInstanceAttribute(request *DescribeInstanceAttributeRequest) (response *DescribeInstanceAttributeResponse, err error) { response = CreateDescribeInstanceAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceAttribute(request *DescribeInstanceAttribu } // DescribeInstanceAttributeWithChan invokes the ecs.DescribeInstanceAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceAttributeWithChan(request *DescribeInstanceAttributeRequest) (<-chan *DescribeInstanceAttributeResponse, <-chan error) { responseChan := make(chan *DescribeInstanceAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceAttributeWithChan(request *DescribeInstanc } // DescribeInstanceAttributeWithCallback invokes the ecs.DescribeInstanceAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceAttributeWithCallback(request *DescribeInstanceAttributeRequest, callback func(response *DescribeInstanceAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) DescribeInstanceAttributeWithCallback(request *DescribeIns type DescribeInstanceAttributeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeInstanceAttributeResponse is the response struct for api DescribeInstanceAttribute @@ -115,7 +110,7 @@ type DescribeInstanceAttributeResponse struct { PublicIpAddress PublicIpAddressInDescribeInstanceAttribute `json:"PublicIpAddress" xml:"PublicIpAddress"` InnerIpAddress InnerIpAddressInDescribeInstanceAttribute `json:"InnerIpAddress" xml:"InnerIpAddress"` VpcAttributes VpcAttributes `json:"VpcAttributes" xml:"VpcAttributes"` - EipAddress EipAddress `json:"EipAddress" xml:"EipAddress"` + EipAddress EipAddressInDescribeInstanceAttribute `json:"EipAddress" xml:"EipAddress"` DedicatedHostAttribute DedicatedHostAttribute `json:"DedicatedHostAttribute" xml:"DedicatedHostAttribute"` OperationLocks OperationLocksInDescribeInstanceAttribute `json:"OperationLocks" xml:"OperationLocks"` } @@ -126,6 +121,7 @@ func CreateDescribeInstanceAttributeRequest() (request *DescribeInstanceAttribut RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_auto_renew_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_auto_renew_attribute.go index 7f04ff3de..33c639c7e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_auto_renew_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_auto_renew_attribute.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceAutoRenewAttribute invokes the ecs.DescribeInstanceAutoRenewAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceautorenewattribute.html func (client *Client) DescribeInstanceAutoRenewAttribute(request *DescribeInstanceAutoRenewAttributeRequest) (response *DescribeInstanceAutoRenewAttributeResponse, err error) { response = CreateDescribeInstanceAutoRenewAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceAutoRenewAttribute(request *DescribeInstan } // DescribeInstanceAutoRenewAttributeWithChan invokes the ecs.DescribeInstanceAutoRenewAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceautorenewattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceAutoRenewAttributeWithChan(request *DescribeInstanceAutoRenewAttributeRequest) (<-chan *DescribeInstanceAutoRenewAttributeResponse, <-chan error) { responseChan := make(chan *DescribeInstanceAutoRenewAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceAutoRenewAttributeWithChan(request *Descri } // DescribeInstanceAutoRenewAttributeWithCallback invokes the ecs.DescribeInstanceAutoRenewAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceautorenewattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceAutoRenewAttributeWithCallback(request *DescribeInstanceAutoRenewAttributeRequest, callback func(response *DescribeInstanceAutoRenewAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,13 @@ func (client *Client) DescribeInstanceAutoRenewAttributeWithCallback(request *De type DescribeInstanceAutoRenewAttributeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` + PageNumber string `position:"Query" name:"PageNumber"` RenewalStatus string `position:"Query" name:"RenewalStatus"` PageSize string `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber string `position:"Query" name:"PageNumber"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeInstanceAutoRenewAttributeResponse is the response struct for api DescribeInstanceAutoRenewAttribute @@ -102,6 +97,7 @@ func CreateDescribeInstanceAutoRenewAttributeRequest() (request *DescribeInstanc RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceAutoRenewAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_history_events.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_history_events.go index b4ab9f06b..dc43f07c6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_history_events.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_history_events.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceHistoryEvents invokes the ecs.DescribeInstanceHistoryEvents API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancehistoryevents.html func (client *Client) DescribeInstanceHistoryEvents(request *DescribeInstanceHistoryEventsRequest) (response *DescribeInstanceHistoryEventsResponse, err error) { response = CreateDescribeInstanceHistoryEventsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceHistoryEvents(request *DescribeInstanceHis } // DescribeInstanceHistoryEventsWithChan invokes the ecs.DescribeInstanceHistoryEvents API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancehistoryevents.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceHistoryEventsWithChan(request *DescribeInstanceHistoryEventsRequest) (<-chan *DescribeInstanceHistoryEventsResponse, <-chan error) { responseChan := make(chan *DescribeInstanceHistoryEventsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceHistoryEventsWithChan(request *DescribeIns } // DescribeInstanceHistoryEventsWithCallback invokes the ecs.DescribeInstanceHistoryEvents API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancehistoryevents.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceHistoryEventsWithCallback(request *DescribeInstanceHistoryEventsRequest, callback func(response *DescribeInstanceHistoryEventsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -80,6 +75,7 @@ type DescribeInstanceHistoryEventsRequest struct { ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` EventCycleStatus string `position:"Query" name:"EventCycleStatus"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + ImpactLevel string `position:"Query" name:"ImpactLevel"` PageSize requests.Integer `position:"Query" name:"PageSize"` InstanceEventCycleStatus *[]string `position:"Query" name:"InstanceEventCycleStatus" type:"Repeated"` EventPublishTimeEnd string `position:"Query" name:"EventPublishTime.End"` @@ -110,6 +106,7 @@ func CreateDescribeInstanceHistoryEventsRequest() (request *DescribeInstanceHist RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceHistoryEvents", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_maintenance_attributes.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_maintenance_attributes.go new file mode 100644 index 000000000..482282d52 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_maintenance_attributes.go @@ -0,0 +1,109 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeInstanceMaintenanceAttributes invokes the ecs.DescribeInstanceMaintenanceAttributes API synchronously +func (client *Client) DescribeInstanceMaintenanceAttributes(request *DescribeInstanceMaintenanceAttributesRequest) (response *DescribeInstanceMaintenanceAttributesResponse, err error) { + response = CreateDescribeInstanceMaintenanceAttributesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeInstanceMaintenanceAttributesWithChan invokes the ecs.DescribeInstanceMaintenanceAttributes API asynchronously +func (client *Client) DescribeInstanceMaintenanceAttributesWithChan(request *DescribeInstanceMaintenanceAttributesRequest) (<-chan *DescribeInstanceMaintenanceAttributesResponse, <-chan error) { + responseChan := make(chan *DescribeInstanceMaintenanceAttributesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeInstanceMaintenanceAttributes(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeInstanceMaintenanceAttributesWithCallback invokes the ecs.DescribeInstanceMaintenanceAttributes API asynchronously +func (client *Client) DescribeInstanceMaintenanceAttributesWithCallback(request *DescribeInstanceMaintenanceAttributesRequest, callback func(response *DescribeInstanceMaintenanceAttributesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeInstanceMaintenanceAttributesResponse + var err error + defer close(result) + response, err = client.DescribeInstanceMaintenanceAttributes(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeInstanceMaintenanceAttributesRequest is the request struct for api DescribeInstanceMaintenanceAttributes +type DescribeInstanceMaintenanceAttributesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` +} + +// DescribeInstanceMaintenanceAttributesResponse is the response struct for api DescribeInstanceMaintenanceAttributes +type DescribeInstanceMaintenanceAttributesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + MaintenanceAttributes MaintenanceAttributes `json:"MaintenanceAttributes" xml:"MaintenanceAttributes"` +} + +// CreateDescribeInstanceMaintenanceAttributesRequest creates a request to invoke DescribeInstanceMaintenanceAttributes API +func CreateDescribeInstanceMaintenanceAttributesRequest() (request *DescribeInstanceMaintenanceAttributesRequest) { + request = &DescribeInstanceMaintenanceAttributesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceMaintenanceAttributes", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeInstanceMaintenanceAttributesResponse creates a response to parse from DescribeInstanceMaintenanceAttributes response +func CreateDescribeInstanceMaintenanceAttributesResponse() (response *DescribeInstanceMaintenanceAttributesResponse) { + response = &DescribeInstanceMaintenanceAttributesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_modification_price.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_modification_price.go new file mode 100644 index 000000000..ab5425b37 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_modification_price.go @@ -0,0 +1,114 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeInstanceModificationPrice invokes the ecs.DescribeInstanceModificationPrice API synchronously +func (client *Client) DescribeInstanceModificationPrice(request *DescribeInstanceModificationPriceRequest) (response *DescribeInstanceModificationPriceResponse, err error) { + response = CreateDescribeInstanceModificationPriceResponse() + err = client.DoAction(request, response) + return +} + +// DescribeInstanceModificationPriceWithChan invokes the ecs.DescribeInstanceModificationPrice API asynchronously +func (client *Client) DescribeInstanceModificationPriceWithChan(request *DescribeInstanceModificationPriceRequest) (<-chan *DescribeInstanceModificationPriceResponse, <-chan error) { + responseChan := make(chan *DescribeInstanceModificationPriceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeInstanceModificationPrice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeInstanceModificationPriceWithCallback invokes the ecs.DescribeInstanceModificationPrice API asynchronously +func (client *Client) DescribeInstanceModificationPriceWithCallback(request *DescribeInstanceModificationPriceRequest, callback func(response *DescribeInstanceModificationPriceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeInstanceModificationPriceResponse + var err error + defer close(result) + response, err = client.DescribeInstanceModificationPrice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeInstanceModificationPriceRequest is the request struct for api DescribeInstanceModificationPrice +type DescribeInstanceModificationPriceRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` + InstanceType string `position:"Query" name:"InstanceType"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + DataDisk *[]DescribeInstanceModificationPriceDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` + InstanceId string `position:"Query" name:"InstanceId"` +} + +// DescribeInstanceModificationPriceDataDisk is a repeated param struct in DescribeInstanceModificationPriceRequest +type DescribeInstanceModificationPriceDataDisk struct { + Size string `name:"Size"` + Category string `name:"Category"` + PerformanceLevel string `name:"PerformanceLevel"` +} + +// DescribeInstanceModificationPriceResponse is the response struct for api DescribeInstanceModificationPrice +type DescribeInstanceModificationPriceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + PriceInfo PriceInfo `json:"PriceInfo" xml:"PriceInfo"` +} + +// CreateDescribeInstanceModificationPriceRequest creates a request to invoke DescribeInstanceModificationPrice API +func CreateDescribeInstanceModificationPriceRequest() (request *DescribeInstanceModificationPriceRequest) { + request = &DescribeInstanceModificationPriceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceModificationPrice", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeInstanceModificationPriceResponse creates a response to parse from DescribeInstanceModificationPrice response +func CreateDescribeInstanceModificationPriceResponse() (response *DescribeInstanceModificationPriceResponse) { + response = &DescribeInstanceModificationPriceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_monitor_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_monitor_data.go index e9636eef6..cc6c01942 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_monitor_data.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_monitor_data.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceMonitorData invokes the ecs.DescribeInstanceMonitorData API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancemonitordata.html func (client *Client) DescribeInstanceMonitorData(request *DescribeInstanceMonitorDataRequest) (response *DescribeInstanceMonitorDataResponse, err error) { response = CreateDescribeInstanceMonitorDataResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceMonitorData(request *DescribeInstanceMonit } // DescribeInstanceMonitorDataWithChan invokes the ecs.DescribeInstanceMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancemonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceMonitorDataWithChan(request *DescribeInstanceMonitorDataRequest) (<-chan *DescribeInstanceMonitorDataResponse, <-chan error) { responseChan := make(chan *DescribeInstanceMonitorDataResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceMonitorDataWithChan(request *DescribeInsta } // DescribeInstanceMonitorDataWithCallback invokes the ecs.DescribeInstanceMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancemonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceMonitorDataWithCallback(request *DescribeInstanceMonitorDataRequest, callback func(response *DescribeInstanceMonitorDataResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -99,6 +94,7 @@ func CreateDescribeInstanceMonitorDataRequest() (request *DescribeInstanceMonito RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceMonitorData", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_physical_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_physical_attribute.go deleted file mode 100644 index b5299bb42..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_physical_attribute.go +++ /dev/null @@ -1,111 +0,0 @@ -package ecs - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" -) - -// DescribeInstancePhysicalAttribute invokes the ecs.DescribeInstancePhysicalAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancephysicalattribute.html -func (client *Client) DescribeInstancePhysicalAttribute(request *DescribeInstancePhysicalAttributeRequest) (response *DescribeInstancePhysicalAttributeResponse, err error) { - response = CreateDescribeInstancePhysicalAttributeResponse() - err = client.DoAction(request, response) - return -} - -// DescribeInstancePhysicalAttributeWithChan invokes the ecs.DescribeInstancePhysicalAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancephysicalattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DescribeInstancePhysicalAttributeWithChan(request *DescribeInstancePhysicalAttributeRequest) (<-chan *DescribeInstancePhysicalAttributeResponse, <-chan error) { - responseChan := make(chan *DescribeInstancePhysicalAttributeResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DescribeInstancePhysicalAttribute(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// DescribeInstancePhysicalAttributeWithCallback invokes the ecs.DescribeInstancePhysicalAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancephysicalattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DescribeInstancePhysicalAttributeWithCallback(request *DescribeInstancePhysicalAttributeRequest, callback func(response *DescribeInstancePhysicalAttributeResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DescribeInstancePhysicalAttributeResponse - var err error - defer close(result) - response, err = client.DescribeInstancePhysicalAttribute(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// DescribeInstancePhysicalAttributeRequest is the request struct for api DescribeInstancePhysicalAttribute -type DescribeInstancePhysicalAttributeRequest struct { - *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` -} - -// DescribeInstancePhysicalAttributeResponse is the response struct for api DescribeInstancePhysicalAttribute -type DescribeInstancePhysicalAttributeResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - VlanId string `json:"VlanId" xml:"VlanId"` - NodeControllerId string `json:"NodeControllerId" xml:"NodeControllerId"` - RackId string `json:"RackId" xml:"RackId"` -} - -// CreateDescribeInstancePhysicalAttributeRequest creates a request to invoke DescribeInstancePhysicalAttribute API -func CreateDescribeInstancePhysicalAttributeRequest() (request *DescribeInstancePhysicalAttributeRequest) { - request = &DescribeInstancePhysicalAttributeRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstancePhysicalAttribute", "ecs", "openAPI") - return -} - -// CreateDescribeInstancePhysicalAttributeResponse creates a response to parse from DescribeInstancePhysicalAttribute response -func CreateDescribeInstancePhysicalAttributeResponse() (response *DescribeInstancePhysicalAttributeResponse) { - response = &DescribeInstancePhysicalAttributeResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_ram_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_ram_role.go index 19257b827..9430f573b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_ram_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_ram_role.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceRamRole invokes the ecs.DescribeInstanceRamRole API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceramrole.html func (client *Client) DescribeInstanceRamRole(request *DescribeInstanceRamRoleRequest) (response *DescribeInstanceRamRoleResponse, err error) { response = CreateDescribeInstanceRamRoleResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceRamRole(request *DescribeInstanceRamRoleRe } // DescribeInstanceRamRoleWithChan invokes the ecs.DescribeInstanceRamRole API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceramrole.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceRamRoleWithChan(request *DescribeInstanceRamRoleRequest) (<-chan *DescribeInstanceRamRoleResponse, <-chan error) { responseChan := make(chan *DescribeInstanceRamRoleResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceRamRoleWithChan(request *DescribeInstanceR } // DescribeInstanceRamRoleWithCallback invokes the ecs.DescribeInstanceRamRole API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstanceramrole.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceRamRoleWithCallback(request *DescribeInstanceRamRoleRequest, callback func(response *DescribeInstanceRamRoleResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) DescribeInstanceRamRoleWithCallback(request *DescribeInsta type DescribeInstanceRamRoleRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - InstanceIds string `position:"Query" name:"InstanceIds"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` RamRoleName string `position:"Query" name:"RamRoleName"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + InstanceIds string `position:"Query" name:"InstanceIds"` } // DescribeInstanceRamRoleResponse is the response struct for api DescribeInstanceRamRole @@ -100,6 +95,7 @@ func CreateDescribeInstanceRamRoleRequest() (request *DescribeInstanceRamRoleReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceRamRole", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_status.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_status.go index 6e759dcd6..b88215c89 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_status.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_status.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceStatus invokes the ecs.DescribeInstanceStatus API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancestatus.html func (client *Client) DescribeInstanceStatus(request *DescribeInstanceStatusRequest) (response *DescribeInstanceStatusResponse, err error) { response = CreateDescribeInstanceStatusResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceStatus(request *DescribeInstanceStatusRequ } // DescribeInstanceStatusWithChan invokes the ecs.DescribeInstanceStatus API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancestatus.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceStatusWithChan(request *DescribeInstanceStatusRequest) (<-chan *DescribeInstanceStatusResponse, <-chan error) { responseChan := make(chan *DescribeInstanceStatusResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceStatusWithChan(request *DescribeInstanceSt } // DescribeInstanceStatusWithCallback invokes the ecs.DescribeInstanceStatus API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancestatus.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceStatusWithCallback(request *DescribeInstanceStatusRequest, callback func(response *DescribeInstanceStatusResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,14 @@ func (client *Client) DescribeInstanceStatusWithCallback(request *DescribeInstan type DescribeInstanceStatusRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - ZoneId string `position:"Query" name:"ZoneId"` ClusterId string `position:"Query" name:"ClusterId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + ZoneId string `position:"Query" name:"ZoneId"` } // DescribeInstanceStatusResponse is the response struct for api DescribeInstanceStatus @@ -102,6 +98,7 @@ func CreateDescribeInstanceStatusRequest() (request *DescribeInstanceStatusReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceStatus", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_topology.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_topology.go index e0ba69e9f..aa71760ce 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_topology.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_topology.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceTopology invokes the ecs.DescribeInstanceTopology API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetopology.html func (client *Client) DescribeInstanceTopology(request *DescribeInstanceTopologyRequest) (response *DescribeInstanceTopologyResponse, err error) { response = CreateDescribeInstanceTopologyResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceTopology(request *DescribeInstanceTopology } // DescribeInstanceTopologyWithChan invokes the ecs.DescribeInstanceTopology API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetopology.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceTopologyWithChan(request *DescribeInstanceTopologyRequest) (<-chan *DescribeInstanceTopologyResponse, <-chan error) { responseChan := make(chan *DescribeInstanceTopologyResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceTopologyWithChan(request *DescribeInstance } // DescribeInstanceTopologyWithCallback invokes the ecs.DescribeInstanceTopology API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetopology.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceTopologyWithCallback(request *DescribeInstanceTopologyRequest, callback func(response *DescribeInstanceTopologyResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,8 +73,8 @@ type DescribeInstanceTopologyRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - InstanceIds string `position:"Query" name:"InstanceIds"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceIds string `position:"Query" name:"InstanceIds"` } // DescribeInstanceTopologyResponse is the response struct for api DescribeInstanceTopology @@ -95,6 +90,7 @@ func CreateDescribeInstanceTopologyRequest() (request *DescribeInstanceTopologyR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceTopology", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_type_families.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_type_families.go index 672eb232f..65df49751 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_type_families.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_type_families.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceTypeFamilies invokes the ecs.DescribeInstanceTypeFamilies API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetypefamilies.html func (client *Client) DescribeInstanceTypeFamilies(request *DescribeInstanceTypeFamiliesRequest) (response *DescribeInstanceTypeFamiliesResponse, err error) { response = CreateDescribeInstanceTypeFamiliesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceTypeFamilies(request *DescribeInstanceType } // DescribeInstanceTypeFamiliesWithChan invokes the ecs.DescribeInstanceTypeFamilies API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetypefamilies.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceTypeFamiliesWithChan(request *DescribeInstanceTypeFamiliesRequest) (<-chan *DescribeInstanceTypeFamiliesResponse, <-chan error) { responseChan := make(chan *DescribeInstanceTypeFamiliesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceTypeFamiliesWithChan(request *DescribeInst } // DescribeInstanceTypeFamiliesWithCallback invokes the ecs.DescribeInstanceTypeFamilies API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetypefamilies.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceTypeFamiliesWithCallback(request *DescribeInstanceTypeFamiliesRequest, callback func(response *DescribeInstanceTypeFamiliesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,8 +71,8 @@ func (client *Client) DescribeInstanceTypeFamiliesWithCallback(request *Describe // DescribeInstanceTypeFamiliesRequest is the request struct for api DescribeInstanceTypeFamilies type DescribeInstanceTypeFamiliesRequest struct { *requests.RpcRequest - Generation string `position:"Query" name:"Generation"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Generation string `position:"Query" name:"Generation"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` @@ -96,6 +91,7 @@ func CreateDescribeInstanceTypeFamiliesRequest() (request *DescribeInstanceTypeF RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceTypeFamilies", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_types.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_types.go index fbfdc8f31..97ddc6d77 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_types.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_types.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceTypes invokes the ecs.DescribeInstanceTypes API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetypes.html func (client *Client) DescribeInstanceTypes(request *DescribeInstanceTypesRequest) (response *DescribeInstanceTypesResponse, err error) { response = CreateDescribeInstanceTypesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceTypes(request *DescribeInstanceTypesReques } // DescribeInstanceTypesWithChan invokes the ecs.DescribeInstanceTypes API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetypes.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceTypesWithChan(request *DescribeInstanceTypesRequest) (<-chan *DescribeInstanceTypesResponse, <-chan error) { responseChan := make(chan *DescribeInstanceTypesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceTypesWithChan(request *DescribeInstanceTyp } // DescribeInstanceTypesWithCallback invokes the ecs.DescribeInstanceTypes API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancetypes.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceTypesWithCallback(request *DescribeInstanceTypesRequest, callback func(response *DescribeInstanceTypesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,6 +72,7 @@ func (client *Client) DescribeInstanceTypesWithCallback(request *DescribeInstanc type DescribeInstanceTypesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + InstanceTypes *[]string `position:"Query" name:"InstanceTypes" type:"Repeated"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` InstanceTypeFamily string `position:"Query" name:"InstanceTypeFamily"` @@ -96,6 +92,7 @@ func CreateDescribeInstanceTypesRequest() (request *DescribeInstanceTypesRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceTypes", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_vnc_passwd.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_vnc_passwd.go index cfc19b2fd..3addbd3fe 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_vnc_passwd.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_vnc_passwd.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceVncPasswd invokes the ecs.DescribeInstanceVncPasswd API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancevncpasswd.html func (client *Client) DescribeInstanceVncPasswd(request *DescribeInstanceVncPasswdRequest) (response *DescribeInstanceVncPasswdResponse, err error) { response = CreateDescribeInstanceVncPasswdResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceVncPasswd(request *DescribeInstanceVncPass } // DescribeInstanceVncPasswdWithChan invokes the ecs.DescribeInstanceVncPasswd API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancevncpasswd.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceVncPasswdWithChan(request *DescribeInstanceVncPasswdRequest) (<-chan *DescribeInstanceVncPasswdResponse, <-chan error) { responseChan := make(chan *DescribeInstanceVncPasswdResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceVncPasswdWithChan(request *DescribeInstanc } // DescribeInstanceVncPasswdWithCallback invokes the ecs.DescribeInstanceVncPasswd API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancevncpasswd.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceVncPasswdWithCallback(request *DescribeInstanceVncPasswdRequest, callback func(response *DescribeInstanceVncPasswdResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) DescribeInstanceVncPasswdWithCallback(request *DescribeIns type DescribeInstanceVncPasswdRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeInstanceVncPasswdResponse is the response struct for api DescribeInstanceVncPasswd @@ -96,6 +91,7 @@ func CreateDescribeInstanceVncPasswdRequest() (request *DescribeInstanceVncPassw RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceVncPasswd", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_vnc_url.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_vnc_url.go index d1b483d31..e97741ef1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_vnc_url.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instance_vnc_url.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstanceVncUrl invokes the ecs.DescribeInstanceVncUrl API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancevncurl.html func (client *Client) DescribeInstanceVncUrl(request *DescribeInstanceVncUrlRequest) (response *DescribeInstanceVncUrlResponse, err error) { response = CreateDescribeInstanceVncUrlResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstanceVncUrl(request *DescribeInstanceVncUrlRequ } // DescribeInstanceVncUrlWithChan invokes the ecs.DescribeInstanceVncUrl API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancevncurl.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceVncUrlWithChan(request *DescribeInstanceVncUrlRequest) (<-chan *DescribeInstanceVncUrlResponse, <-chan error) { responseChan := make(chan *DescribeInstanceVncUrlResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstanceVncUrlWithChan(request *DescribeInstanceVn } // DescribeInstanceVncUrlWithCallback invokes the ecs.DescribeInstanceVncUrl API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancevncurl.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstanceVncUrlWithCallback(request *DescribeInstanceVncUrlRequest, callback func(response *DescribeInstanceVncUrlResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) DescribeInstanceVncUrlWithCallback(request *DescribeInstan type DescribeInstanceVncUrlRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeInstanceVncUrlResponse is the response struct for api DescribeInstanceVncUrl @@ -96,6 +91,7 @@ func CreateDescribeInstanceVncUrlRequest() (request *DescribeInstanceVncUrlReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstanceVncUrl", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instances.go index 5bfbf4140..763904bfc 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instances.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instances.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstances invokes the ecs.DescribeInstances API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstances.html func (client *Client) DescribeInstances(request *DescribeInstancesRequest) (response *DescribeInstancesResponse, err error) { response = CreateDescribeInstancesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstances(request *DescribeInstancesRequest) (resp } // DescribeInstancesWithChan invokes the ecs.DescribeInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstancesWithChan(request *DescribeInstancesRequest) (<-chan *DescribeInstancesResponse, <-chan error) { responseChan := make(chan *DescribeInstancesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstancesWithChan(request *DescribeInstancesReques } // DescribeInstancesWithCallback invokes the ecs.DescribeInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstancesWithCallback(request *DescribeInstancesRequest, callback func(response *DescribeInstancesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,47 +71,53 @@ func (client *Client) DescribeInstancesWithCallback(request *DescribeInstancesRe // DescribeInstancesRequest is the request struct for api DescribeInstances type DescribeInstancesRequest struct { *requests.RpcRequest - InnerIpAddresses string `position:"Query" name:"InnerIpAddresses"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ImageId string `position:"Query" name:"ImageId"` - PrivateIpAddresses string `position:"Query" name:"PrivateIpAddresses"` - HpcClusterId string `position:"Query" name:"HpcClusterId"` - Filter2Value string `position:"Query" name:"Filter.2.Value"` - Filter4Value string `position:"Query" name:"Filter.4.Value"` - IoOptimized requests.Boolean `position:"Query" name:"IoOptimized"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - KeyPairName string `position:"Query" name:"KeyPairName"` - Filter4Key string `position:"Query" name:"Filter.4.Key"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - LockReason string `position:"Query" name:"LockReason"` - Filter1Key string `position:"Query" name:"Filter.1.Key"` - RdmaIpAddresses string `position:"Query" name:"RdmaIpAddresses"` - DeviceAvailable requests.Boolean `position:"Query" name:"DeviceAvailable"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - PublicIpAddresses string `position:"Query" name:"PublicIpAddresses"` - InstanceType string `position:"Query" name:"InstanceType"` - Tag *[]DescribeInstancesTag `position:"Query" name:"Tag" type:"Repeated"` - InstanceChargeType string `position:"Query" name:"InstanceChargeType"` - Filter3Value string `position:"Query" name:"Filter.3.Value"` - DryRun requests.Boolean `position:"Query" name:"DryRun"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - InstanceTypeFamily string `position:"Query" name:"InstanceTypeFamily"` - Filter1Value string `position:"Query" name:"Filter.1.Value"` - NeedSaleCycle requests.Boolean `position:"Query" name:"NeedSaleCycle"` - Filter2Key string `position:"Query" name:"Filter.2.Key"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - VSwitchId string `position:"Query" name:"VSwitchId"` - EipAddresses string `position:"Query" name:"EipAddresses"` - InstanceName string `position:"Query" name:"InstanceName"` - InstanceIds string `position:"Query" name:"InstanceIds"` - InternetChargeType string `position:"Query" name:"InternetChargeType"` - VpcId string `position:"Query" name:"VpcId"` - ZoneId string `position:"Query" name:"ZoneId"` - Filter3Key string `position:"Query" name:"Filter.3.Key"` - InstanceNetworkType string `position:"Query" name:"InstanceNetworkType"` - Status string `position:"Query" name:"Status"` + InnerIpAddresses string `position:"Query" name:"InnerIpAddresses"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PrivateIpAddresses string `position:"Query" name:"PrivateIpAddresses"` + HpcClusterId string `position:"Query" name:"HpcClusterId"` + HttpPutResponseHopLimit requests.Integer `position:"Query" name:"HttpPutResponseHopLimit"` + Filter2Value string `position:"Query" name:"Filter.2.Value"` + KeyPairName string `position:"Query" name:"KeyPairName"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + LockReason string `position:"Query" name:"LockReason"` + Filter1Key string `position:"Query" name:"Filter.1.Key"` + DeviceAvailable requests.Boolean `position:"Query" name:"DeviceAvailable"` + Tag *[]DescribeInstancesTag `position:"Query" name:"Tag" type:"Repeated"` + Filter3Value string `position:"Query" name:"Filter.3.Value"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + Filter1Value string `position:"Query" name:"Filter.1.Value"` + NeedSaleCycle requests.Boolean `position:"Query" name:"NeedSaleCycle"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` + AdditionalAttributes *[]string `position:"Query" name:"AdditionalAttributes" type:"Repeated"` + InstanceName string `position:"Query" name:"InstanceName"` + InstanceIds string `position:"Query" name:"InstanceIds"` + InternetChargeType string `position:"Query" name:"InternetChargeType"` + ZoneId string `position:"Query" name:"ZoneId"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + InstanceNetworkType string `position:"Query" name:"InstanceNetworkType"` + Status string `position:"Query" name:"Status"` + ImageId string `position:"Query" name:"ImageId"` + Filter4Value string `position:"Query" name:"Filter.4.Value"` + IoOptimized requests.Boolean `position:"Query" name:"IoOptimized"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + Filter4Key string `position:"Query" name:"Filter.4.Key"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + NextToken string `position:"Query" name:"NextToken"` + RdmaIpAddresses string `position:"Query" name:"RdmaIpAddresses"` + HttpEndpoint string `position:"Query" name:"HttpEndpoint"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + PublicIpAddresses string `position:"Query" name:"PublicIpAddresses"` + InstanceType string `position:"Query" name:"InstanceType"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + InstanceTypeFamily string `position:"Query" name:"InstanceTypeFamily"` + Filter2Key string `position:"Query" name:"Filter.2.Key"` + EipAddresses string `position:"Query" name:"EipAddresses"` + VpcId string `position:"Query" name:"VpcId"` + HttpTokens string `position:"Query" name:"HttpTokens"` + Filter3Key string `position:"Query" name:"Filter.3.Key"` } // DescribeInstancesTag is a repeated param struct in DescribeInstancesRequest @@ -132,6 +133,7 @@ type DescribeInstancesResponse struct { TotalCount int `json:"TotalCount" xml:"TotalCount"` PageNumber int `json:"PageNumber" xml:"PageNumber"` PageSize int `json:"PageSize" xml:"PageSize"` + NextToken string `json:"NextToken" xml:"NextToken"` Instances InstancesInDescribeInstances `json:"Instances" xml:"Instances"` } @@ -141,6 +143,7 @@ func CreateDescribeInstancesRequest() (request *DescribeInstancesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstances", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instances_full_status.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instances_full_status.go index 136907a87..9fe4e7618 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instances_full_status.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_instances_full_status.go @@ -21,7 +21,6 @@ import ( ) // DescribeInstancesFullStatus invokes the ecs.DescribeInstancesFullStatus API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancesfullstatus.html func (client *Client) DescribeInstancesFullStatus(request *DescribeInstancesFullStatusRequest) (response *DescribeInstancesFullStatusResponse, err error) { response = CreateDescribeInstancesFullStatusResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInstancesFullStatus(request *DescribeInstancesFull } // DescribeInstancesFullStatusWithChan invokes the ecs.DescribeInstancesFullStatus API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancesfullstatus.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstancesFullStatusWithChan(request *DescribeInstancesFullStatusRequest) (<-chan *DescribeInstancesFullStatusResponse, <-chan error) { responseChan := make(chan *DescribeInstancesFullStatusResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInstancesFullStatusWithChan(request *DescribeInsta } // DescribeInstancesFullStatusWithCallback invokes the ecs.DescribeInstancesFullStatus API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinstancesfullstatus.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInstancesFullStatusWithCallback(request *DescribeInstancesFullStatusRequest, callback func(response *DescribeInstancesFullStatusResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -110,6 +105,7 @@ func CreateDescribeInstancesFullStatusRequest() (request *DescribeInstancesFullS RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInstancesFullStatus", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_invocation_results.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_invocation_results.go index 6a108d746..21f97baf9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_invocation_results.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_invocation_results.go @@ -21,7 +21,6 @@ import ( ) // DescribeInvocationResults invokes the ecs.DescribeInvocationResults API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinvocationresults.html func (client *Client) DescribeInvocationResults(request *DescribeInvocationResultsRequest) (response *DescribeInvocationResultsResponse, err error) { response = CreateDescribeInvocationResultsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInvocationResults(request *DescribeInvocationResul } // DescribeInvocationResultsWithChan invokes the ecs.DescribeInvocationResults API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinvocationresults.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInvocationResultsWithChan(request *DescribeInvocationResultsRequest) (<-chan *DescribeInvocationResultsResponse, <-chan error) { responseChan := make(chan *DescribeInvocationResultsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInvocationResultsWithChan(request *DescribeInvocat } // DescribeInvocationResultsWithCallback invokes the ecs.DescribeInvocationResults API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinvocationresults.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInvocationResultsWithCallback(request *DescribeInvocationResultsRequest, callback func(response *DescribeInvocationResultsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -79,6 +74,7 @@ type DescribeInvocationResultsRequest struct { ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` CommandId string `position:"Query" name:"CommandId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + ContentEncoding string `position:"Query" name:"ContentEncoding"` PageSize requests.Integer `position:"Query" name:"PageSize"` InvokeId string `position:"Query" name:"InvokeId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` @@ -86,6 +82,7 @@ type DescribeInvocationResultsRequest struct { OwnerId requests.Integer `position:"Query" name:"OwnerId"` InstanceId string `position:"Query" name:"InstanceId"` InvokeRecordStatus string `position:"Query" name:"InvokeRecordStatus"` + IncludeHistory requests.Boolean `position:"Query" name:"IncludeHistory"` } // DescribeInvocationResultsResponse is the response struct for api DescribeInvocationResults @@ -101,6 +98,7 @@ func CreateDescribeInvocationResultsRequest() (request *DescribeInvocationResult RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInvocationResults", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_invocations.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_invocations.go index 027c80feb..58219f0ae 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_invocations.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_invocations.go @@ -21,7 +21,6 @@ import ( ) // DescribeInvocations invokes the ecs.DescribeInvocations API synchronously -// api document: https://help.aliyun.com/api/ecs/describeinvocations.html func (client *Client) DescribeInvocations(request *DescribeInvocationsRequest) (response *DescribeInvocationsResponse, err error) { response = CreateDescribeInvocationsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeInvocations(request *DescribeInvocationsRequest) ( } // DescribeInvocationsWithChan invokes the ecs.DescribeInvocations API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinvocations.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInvocationsWithChan(request *DescribeInvocationsRequest) (<-chan *DescribeInvocationsResponse, <-chan error) { responseChan := make(chan *DescribeInvocationsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeInvocationsWithChan(request *DescribeInvocationsRe } // DescribeInvocationsWithCallback invokes the ecs.DescribeInvocations API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeinvocations.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeInvocationsWithCallback(request *DescribeInvocationsRequest, callback func(response *DescribeInvocationsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,8 +73,10 @@ type DescribeInvocationsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` InvokeStatus string `position:"Query" name:"InvokeStatus"` + IncludeOutput requests.Boolean `position:"Query" name:"IncludeOutput"` CommandId string `position:"Query" name:"CommandId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + ContentEncoding string `position:"Query" name:"ContentEncoding"` PageSize requests.Integer `position:"Query" name:"PageSize"` InvokeId string `position:"Query" name:"InvokeId"` Timed requests.Boolean `position:"Query" name:"Timed"` @@ -94,11 +91,11 @@ type DescribeInvocationsRequest struct { // DescribeInvocationsResponse is the response struct for api DescribeInvocations type DescribeInvocationsResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - PageNumber int `json:"PageNumber" xml:"PageNumber"` - PageSize int `json:"PageSize" xml:"PageSize"` - Invocations Invocations `json:"Invocations" xml:"Invocations"` + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + PageSize int64 `json:"PageSize" xml:"PageSize"` + Invocations InvocationsInDescribeInvocations `json:"Invocations" xml:"Invocations"` } // CreateDescribeInvocationsRequest creates a request to invoke DescribeInvocations API @@ -107,6 +104,7 @@ func CreateDescribeInvocationsRequest() (request *DescribeInvocationsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeInvocations", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_key_pairs.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_key_pairs.go index 0a687d00d..d17c79bca 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_key_pairs.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_key_pairs.go @@ -21,7 +21,6 @@ import ( ) // DescribeKeyPairs invokes the ecs.DescribeKeyPairs API synchronously -// api document: https://help.aliyun.com/api/ecs/describekeypairs.html func (client *Client) DescribeKeyPairs(request *DescribeKeyPairsRequest) (response *DescribeKeyPairsResponse, err error) { response = CreateDescribeKeyPairsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeKeyPairs(request *DescribeKeyPairsRequest) (respon } // DescribeKeyPairsWithChan invokes the ecs.DescribeKeyPairs API asynchronously -// api document: https://help.aliyun.com/api/ecs/describekeypairs.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeKeyPairsWithChan(request *DescribeKeyPairsRequest) (<-chan *DescribeKeyPairsResponse, <-chan error) { responseChan := make(chan *DescribeKeyPairsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeKeyPairsWithChan(request *DescribeKeyPairsRequest) } // DescribeKeyPairsWithCallback invokes the ecs.DescribeKeyPairs API asynchronously -// api document: https://help.aliyun.com/api/ecs/describekeypairs.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeKeyPairsWithCallback(request *DescribeKeyPairsRequest, callback func(response *DescribeKeyPairsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,15 +71,15 @@ func (client *Client) DescribeKeyPairsWithCallback(request *DescribeKeyPairsRequ // DescribeKeyPairsRequest is the request struct for api DescribeKeyPairs type DescribeKeyPairsRequest struct { *requests.RpcRequest - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` KeyPairFingerPrint string `position:"Query" name:"KeyPairFingerPrint"` - PageSize requests.Integer `position:"Query" name:"PageSize"` KeyPairName string `position:"Query" name:"KeyPairName"` - Tag *[]DescribeKeyPairsTag `position:"Query" name:"Tag" type:"Repeated"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + Tag *[]DescribeKeyPairsTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` } // DescribeKeyPairsTag is a repeated param struct in DescribeKeyPairsRequest @@ -109,6 +104,7 @@ func CreateDescribeKeyPairsRequest() (request *DescribeKeyPairsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeKeyPairs", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_launch_template_versions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_launch_template_versions.go index 4082a2b51..b45a49315 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_launch_template_versions.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_launch_template_versions.go @@ -21,7 +21,6 @@ import ( ) // DescribeLaunchTemplateVersions invokes the ecs.DescribeLaunchTemplateVersions API synchronously -// api document: https://help.aliyun.com/api/ecs/describelaunchtemplateversions.html func (client *Client) DescribeLaunchTemplateVersions(request *DescribeLaunchTemplateVersionsRequest) (response *DescribeLaunchTemplateVersionsResponse, err error) { response = CreateDescribeLaunchTemplateVersionsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeLaunchTemplateVersions(request *DescribeLaunchTemp } // DescribeLaunchTemplateVersionsWithChan invokes the ecs.DescribeLaunchTemplateVersions API asynchronously -// api document: https://help.aliyun.com/api/ecs/describelaunchtemplateversions.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeLaunchTemplateVersionsWithChan(request *DescribeLaunchTemplateVersionsRequest) (<-chan *DescribeLaunchTemplateVersionsResponse, <-chan error) { responseChan := make(chan *DescribeLaunchTemplateVersionsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeLaunchTemplateVersionsWithChan(request *DescribeLa } // DescribeLaunchTemplateVersionsWithCallback invokes the ecs.DescribeLaunchTemplateVersions API asynchronously -// api document: https://help.aliyun.com/api/ecs/describelaunchtemplateversions.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeLaunchTemplateVersionsWithCallback(request *DescribeLaunchTemplateVersionsRequest, callback func(response *DescribeLaunchTemplateVersionsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -107,6 +102,7 @@ func CreateDescribeLaunchTemplateVersionsRequest() (request *DescribeLaunchTempl RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeLaunchTemplateVersions", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_launch_templates.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_launch_templates.go index fa45eabc4..4a2cd353e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_launch_templates.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_launch_templates.go @@ -21,7 +21,6 @@ import ( ) // DescribeLaunchTemplates invokes the ecs.DescribeLaunchTemplates API synchronously -// api document: https://help.aliyun.com/api/ecs/describelaunchtemplates.html func (client *Client) DescribeLaunchTemplates(request *DescribeLaunchTemplatesRequest) (response *DescribeLaunchTemplatesResponse, err error) { response = CreateDescribeLaunchTemplatesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeLaunchTemplates(request *DescribeLaunchTemplatesRe } // DescribeLaunchTemplatesWithChan invokes the ecs.DescribeLaunchTemplates API asynchronously -// api document: https://help.aliyun.com/api/ecs/describelaunchtemplates.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeLaunchTemplatesWithChan(request *DescribeLaunchTemplatesRequest) (<-chan *DescribeLaunchTemplatesResponse, <-chan error) { responseChan := make(chan *DescribeLaunchTemplatesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeLaunchTemplatesWithChan(request *DescribeLaunchTem } // DescribeLaunchTemplatesWithCallback invokes the ecs.DescribeLaunchTemplates API asynchronously -// api document: https://help.aliyun.com/api/ecs/describelaunchtemplates.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeLaunchTemplatesWithCallback(request *DescribeLaunchTemplatesRequest, callback func(response *DescribeLaunchTemplatesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -110,6 +105,7 @@ func CreateDescribeLaunchTemplatesRequest() (request *DescribeLaunchTemplatesReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeLaunchTemplates", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_limitation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_limitation.go index 592776be0..a5c6cec64 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_limitation.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_limitation.go @@ -21,7 +21,6 @@ import ( ) // DescribeLimitation invokes the ecs.DescribeLimitation API synchronously -// api document: https://help.aliyun.com/api/ecs/describelimitation.html func (client *Client) DescribeLimitation(request *DescribeLimitationRequest) (response *DescribeLimitationResponse, err error) { response = CreateDescribeLimitationResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeLimitation(request *DescribeLimitationRequest) (re } // DescribeLimitationWithChan invokes the ecs.DescribeLimitation API asynchronously -// api document: https://help.aliyun.com/api/ecs/describelimitation.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeLimitationWithChan(request *DescribeLimitationRequest) (<-chan *DescribeLimitationResponse, <-chan error) { responseChan := make(chan *DescribeLimitationResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeLimitationWithChan(request *DescribeLimitationRequ } // DescribeLimitationWithCallback invokes the ecs.DescribeLimitation API asynchronously -// api document: https://help.aliyun.com/api/ecs/describelimitation.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeLimitationWithCallback(request *DescribeLimitationRequest, callback func(response *DescribeLimitationResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -97,6 +92,7 @@ func CreateDescribeLimitationRequest() (request *DescribeLimitationRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeLimitation", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_managed_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_managed_instances.go new file mode 100644 index 000000000..30d22f92d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_managed_instances.go @@ -0,0 +1,113 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeManagedInstances invokes the ecs.DescribeManagedInstances API synchronously +func (client *Client) DescribeManagedInstances(request *DescribeManagedInstancesRequest) (response *DescribeManagedInstancesResponse, err error) { + response = CreateDescribeManagedInstancesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeManagedInstancesWithChan invokes the ecs.DescribeManagedInstances API asynchronously +func (client *Client) DescribeManagedInstancesWithChan(request *DescribeManagedInstancesRequest) (<-chan *DescribeManagedInstancesResponse, <-chan error) { + responseChan := make(chan *DescribeManagedInstancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeManagedInstances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeManagedInstancesWithCallback invokes the ecs.DescribeManagedInstances API asynchronously +func (client *Client) DescribeManagedInstancesWithCallback(request *DescribeManagedInstancesRequest, callback func(response *DescribeManagedInstancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeManagedInstancesResponse + var err error + defer close(result) + response, err = client.DescribeManagedInstances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeManagedInstancesRequest is the request struct for api DescribeManagedInstances +type DescribeManagedInstancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OsType string `position:"Query" name:"OsType"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceName string `position:"Query" name:"InstanceName"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + InstanceIp string `position:"Query" name:"InstanceIp"` + ActivationId string `position:"Query" name:"ActivationId"` +} + +// DescribeManagedInstancesResponse is the response struct for api DescribeManagedInstances +type DescribeManagedInstancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + PageSize int64 `json:"PageSize" xml:"PageSize"` + Instances []Instance `json:"Instances" xml:"Instances"` +} + +// CreateDescribeManagedInstancesRequest creates a request to invoke DescribeManagedInstances API +func CreateDescribeManagedInstancesRequest() (request *DescribeManagedInstancesRequest) { + request = &DescribeManagedInstancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeManagedInstances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeManagedInstancesResponse creates a response to parse from DescribeManagedInstances response +func CreateDescribeManagedInstancesResponse() (response *DescribeManagedInstancesResponse) { + response = &DescribeManagedInstancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_nat_gateways.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_nat_gateways.go index 306108a33..9d8d8c907 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_nat_gateways.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_nat_gateways.go @@ -21,7 +21,6 @@ import ( ) // DescribeNatGateways invokes the ecs.DescribeNatGateways API synchronously -// api document: https://help.aliyun.com/api/ecs/describenatgateways.html func (client *Client) DescribeNatGateways(request *DescribeNatGatewaysRequest) (response *DescribeNatGatewaysResponse, err error) { response = CreateDescribeNatGatewaysResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeNatGateways(request *DescribeNatGatewaysRequest) ( } // DescribeNatGatewaysWithChan invokes the ecs.DescribeNatGateways API asynchronously -// api document: https://help.aliyun.com/api/ecs/describenatgateways.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeNatGatewaysWithChan(request *DescribeNatGatewaysRequest) (<-chan *DescribeNatGatewaysResponse, <-chan error) { responseChan := make(chan *DescribeNatGatewaysResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeNatGatewaysWithChan(request *DescribeNatGatewaysRe } // DescribeNatGatewaysWithCallback invokes the ecs.DescribeNatGateways API asynchronously -// api document: https://help.aliyun.com/api/ecs/describenatgateways.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeNatGatewaysWithCallback(request *DescribeNatGatewaysRequest, callback func(response *DescribeNatGatewaysResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,13 @@ func (client *Client) DescribeNatGatewaysWithCallback(request *DescribeNatGatewa type DescribeNatGatewaysRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - VpcId string `position:"Query" name:"VpcId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` PageSize requests.Integer `position:"Query" name:"PageSize"` NatGatewayId string `position:"Query" name:"NatGatewayId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + VpcId string `position:"Query" name:"VpcId"` } // DescribeNatGatewaysResponse is the response struct for api DescribeNatGateways @@ -102,6 +97,7 @@ func CreateDescribeNatGatewaysRequest() (request *DescribeNatGatewaysRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeNatGateways", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interface_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interface_attribute.go new file mode 100644 index 000000000..69e176138 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interface_attribute.go @@ -0,0 +1,134 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeNetworkInterfaceAttribute invokes the ecs.DescribeNetworkInterfaceAttribute API synchronously +func (client *Client) DescribeNetworkInterfaceAttribute(request *DescribeNetworkInterfaceAttributeRequest) (response *DescribeNetworkInterfaceAttributeResponse, err error) { + response = CreateDescribeNetworkInterfaceAttributeResponse() + err = client.DoAction(request, response) + return +} + +// DescribeNetworkInterfaceAttributeWithChan invokes the ecs.DescribeNetworkInterfaceAttribute API asynchronously +func (client *Client) DescribeNetworkInterfaceAttributeWithChan(request *DescribeNetworkInterfaceAttributeRequest) (<-chan *DescribeNetworkInterfaceAttributeResponse, <-chan error) { + responseChan := make(chan *DescribeNetworkInterfaceAttributeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeNetworkInterfaceAttribute(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeNetworkInterfaceAttributeWithCallback invokes the ecs.DescribeNetworkInterfaceAttribute API asynchronously +func (client *Client) DescribeNetworkInterfaceAttributeWithCallback(request *DescribeNetworkInterfaceAttributeRequest, callback func(response *DescribeNetworkInterfaceAttributeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeNetworkInterfaceAttributeResponse + var err error + defer close(result) + response, err = client.DescribeNetworkInterfaceAttribute(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeNetworkInterfaceAttributeRequest is the request struct for api DescribeNetworkInterfaceAttribute +type DescribeNetworkInterfaceAttributeRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Tag *[]DescribeNetworkInterfaceAttributeTag `position:"Query" name:"Tag" type:"Repeated"` + Attribute string `position:"Query" name:"Attribute"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` +} + +// DescribeNetworkInterfaceAttributeTag is a repeated param struct in DescribeNetworkInterfaceAttributeRequest +type DescribeNetworkInterfaceAttributeTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// DescribeNetworkInterfaceAttributeResponse is the response struct for api DescribeNetworkInterfaceAttribute +type DescribeNetworkInterfaceAttributeResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + NetworkInterfaceId string `json:"NetworkInterfaceId" xml:"NetworkInterfaceId"` + Status string `json:"Status" xml:"Status"` + Type string `json:"Type" xml:"Type"` + VpcId string `json:"VpcId" xml:"VpcId"` + VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + PrivateIpAddress string `json:"PrivateIpAddress" xml:"PrivateIpAddress"` + MacAddress string `json:"MacAddress" xml:"MacAddress"` + NetworkInterfaceName string `json:"NetworkInterfaceName" xml:"NetworkInterfaceName"` + Description string `json:"Description" xml:"Description"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + ServiceID int64 `json:"ServiceID" xml:"ServiceID"` + ServiceManaged bool `json:"ServiceManaged" xml:"ServiceManaged"` + QueueNumber int `json:"QueueNumber" xml:"QueueNumber"` + OwnerId string `json:"OwnerId" xml:"OwnerId"` + SecurityGroupIds SecurityGroupIdsInDescribeNetworkInterfaceAttribute `json:"SecurityGroupIds" xml:"SecurityGroupIds"` + AssociatedPublicIp AssociatedPublicIp `json:"AssociatedPublicIp" xml:"AssociatedPublicIp"` + Attachment Attachment `json:"Attachment" xml:"Attachment"` + PrivateIpSets PrivateIpSetsInDescribeNetworkInterfaceAttribute `json:"PrivateIpSets" xml:"PrivateIpSets"` + Ipv6Sets Ipv6SetsInDescribeNetworkInterfaceAttribute `json:"Ipv6Sets" xml:"Ipv6Sets"` + Tags TagsInDescribeNetworkInterfaceAttribute `json:"Tags" xml:"Tags"` +} + +// CreateDescribeNetworkInterfaceAttributeRequest creates a request to invoke DescribeNetworkInterfaceAttribute API +func CreateDescribeNetworkInterfaceAttributeRequest() (request *DescribeNetworkInterfaceAttributeRequest) { + request = &DescribeNetworkInterfaceAttributeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeNetworkInterfaceAttribute", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeNetworkInterfaceAttributeResponse creates a response to parse from DescribeNetworkInterfaceAttribute response +func CreateDescribeNetworkInterfaceAttributeResponse() (response *DescribeNetworkInterfaceAttributeResponse) { + response = &DescribeNetworkInterfaceAttributeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interface_permissions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interface_permissions.go index 15ad33d77..5a575ee0f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interface_permissions.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interface_permissions.go @@ -21,7 +21,6 @@ import ( ) // DescribeNetworkInterfacePermissions invokes the ecs.DescribeNetworkInterfacePermissions API synchronously -// api document: https://help.aliyun.com/api/ecs/describenetworkinterfacepermissions.html func (client *Client) DescribeNetworkInterfacePermissions(request *DescribeNetworkInterfacePermissionsRequest) (response *DescribeNetworkInterfacePermissionsResponse, err error) { response = CreateDescribeNetworkInterfacePermissionsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeNetworkInterfacePermissions(request *DescribeNetwo } // DescribeNetworkInterfacePermissionsWithChan invokes the ecs.DescribeNetworkInterfacePermissions API asynchronously -// api document: https://help.aliyun.com/api/ecs/describenetworkinterfacepermissions.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeNetworkInterfacePermissionsWithChan(request *DescribeNetworkInterfacePermissionsRequest) (<-chan *DescribeNetworkInterfacePermissionsResponse, <-chan error) { responseChan := make(chan *DescribeNetworkInterfacePermissionsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeNetworkInterfacePermissionsWithChan(request *Descr } // DescribeNetworkInterfacePermissionsWithCallback invokes the ecs.DescribeNetworkInterfacePermissions API asynchronously -// api document: https://help.aliyun.com/api/ecs/describenetworkinterfacepermissions.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeNetworkInterfacePermissionsWithCallback(request *DescribeNetworkInterfacePermissionsRequest, callback func(response *DescribeNetworkInterfacePermissionsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -102,6 +97,7 @@ func CreateDescribeNetworkInterfacePermissionsRequest() (request *DescribeNetwor RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeNetworkInterfacePermissions", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interfaces.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interfaces.go index 26f4f01ee..2673528af 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interfaces.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_network_interfaces.go @@ -21,7 +21,6 @@ import ( ) // DescribeNetworkInterfaces invokes the ecs.DescribeNetworkInterfaces API synchronously -// api document: https://help.aliyun.com/api/ecs/describenetworkinterfaces.html func (client *Client) DescribeNetworkInterfaces(request *DescribeNetworkInterfacesRequest) (response *DescribeNetworkInterfacesResponse, err error) { response = CreateDescribeNetworkInterfacesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeNetworkInterfaces(request *DescribeNetworkInterfac } // DescribeNetworkInterfacesWithChan invokes the ecs.DescribeNetworkInterfaces API asynchronously -// api document: https://help.aliyun.com/api/ecs/describenetworkinterfaces.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeNetworkInterfacesWithChan(request *DescribeNetworkInterfacesRequest) (<-chan *DescribeNetworkInterfacesResponse, <-chan error) { responseChan := make(chan *DescribeNetworkInterfacesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeNetworkInterfacesWithChan(request *DescribeNetwork } // DescribeNetworkInterfacesWithCallback invokes the ecs.DescribeNetworkInterfaces API asynchronously -// api document: https://help.aliyun.com/api/ecs/describenetworkinterfaces.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeNetworkInterfacesWithCallback(request *DescribeNetworkInterfacesRequest, callback func(response *DescribeNetworkInterfacesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -82,6 +77,7 @@ type DescribeNetworkInterfacesRequest struct { Type string `position:"Query" name:"Type"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + NextToken string `position:"Query" name:"NextToken"` PageSize requests.Integer `position:"Query" name:"PageSize"` Tag *[]DescribeNetworkInterfacesTag `position:"Query" name:"Tag" type:"Repeated"` NetworkInterfaceName string `position:"Query" name:"NetworkInterfaceName"` @@ -89,10 +85,13 @@ type DescribeNetworkInterfacesRequest struct { OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` VSwitchId string `position:"Query" name:"VSwitchId"` + PrivateIpAddress *[]string `position:"Query" name:"PrivateIpAddress" type:"Repeated"` InstanceId string `position:"Query" name:"InstanceId"` VpcId string `position:"Query" name:"VpcId"` PrimaryIpAddress string `position:"Query" name:"PrimaryIpAddress"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` NetworkInterfaceId *[]string `position:"Query" name:"NetworkInterfaceId" type:"Repeated"` + Status string `position:"Query" name:"Status"` } // DescribeNetworkInterfacesTag is a repeated param struct in DescribeNetworkInterfacesRequest @@ -108,6 +107,7 @@ type DescribeNetworkInterfacesResponse struct { TotalCount int `json:"TotalCount" xml:"TotalCount"` PageNumber int `json:"PageNumber" xml:"PageNumber"` PageSize int `json:"PageSize" xml:"PageSize"` + NextToken string `json:"NextToken" xml:"NextToken"` NetworkInterfaceSets NetworkInterfaceSets `json:"NetworkInterfaceSets" xml:"NetworkInterfaceSets"` } @@ -117,6 +117,7 @@ func CreateDescribeNetworkInterfacesRequest() (request *DescribeNetworkInterface RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeNetworkInterfaces", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_new_project_eip_monitor_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_new_project_eip_monitor_data.go index 71377c089..d56dc4492 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_new_project_eip_monitor_data.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_new_project_eip_monitor_data.go @@ -21,7 +21,6 @@ import ( ) // DescribeNewProjectEipMonitorData invokes the ecs.DescribeNewProjectEipMonitorData API synchronously -// api document: https://help.aliyun.com/api/ecs/describenewprojecteipmonitordata.html func (client *Client) DescribeNewProjectEipMonitorData(request *DescribeNewProjectEipMonitorDataRequest) (response *DescribeNewProjectEipMonitorDataResponse, err error) { response = CreateDescribeNewProjectEipMonitorDataResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeNewProjectEipMonitorData(request *DescribeNewProje } // DescribeNewProjectEipMonitorDataWithChan invokes the ecs.DescribeNewProjectEipMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describenewprojecteipmonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeNewProjectEipMonitorDataWithChan(request *DescribeNewProjectEipMonitorDataRequest) (<-chan *DescribeNewProjectEipMonitorDataResponse, <-chan error) { responseChan := make(chan *DescribeNewProjectEipMonitorDataResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeNewProjectEipMonitorDataWithChan(request *Describe } // DescribeNewProjectEipMonitorDataWithCallback invokes the ecs.DescribeNewProjectEipMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describenewprojecteipmonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeNewProjectEipMonitorDataWithCallback(request *DescribeNewProjectEipMonitorDataRequest, callback func(response *DescribeNewProjectEipMonitorDataResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) DescribeNewProjectEipMonitorDataWithCallback(request *Desc type DescribeNewProjectEipMonitorDataRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + AllocationId string `position:"Query" name:"AllocationId"` + StartTime string `position:"Query" name:"StartTime"` Period requests.Integer `position:"Query" name:"Period"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` EndTime string `position:"Query" name:"EndTime"` - AllocationId string `position:"Query" name:"AllocationId"` - StartTime string `position:"Query" name:"StartTime"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -99,6 +94,7 @@ func CreateDescribeNewProjectEipMonitorDataRequest() (request *DescribeNewProjec RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeNewProjectEipMonitorData", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_physical_connections.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_physical_connections.go index f65a68419..9811eca32 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_physical_connections.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_physical_connections.go @@ -21,7 +21,6 @@ import ( ) // DescribePhysicalConnections invokes the ecs.DescribePhysicalConnections API synchronously -// api document: https://help.aliyun.com/api/ecs/describephysicalconnections.html func (client *Client) DescribePhysicalConnections(request *DescribePhysicalConnectionsRequest) (response *DescribePhysicalConnectionsResponse, err error) { response = CreateDescribePhysicalConnectionsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribePhysicalConnections(request *DescribePhysicalConne } // DescribePhysicalConnectionsWithChan invokes the ecs.DescribePhysicalConnections API asynchronously -// api document: https://help.aliyun.com/api/ecs/describephysicalconnections.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribePhysicalConnectionsWithChan(request *DescribePhysicalConnectionsRequest) (<-chan *DescribePhysicalConnectionsResponse, <-chan error) { responseChan := make(chan *DescribePhysicalConnectionsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribePhysicalConnectionsWithChan(request *DescribePhysi } // DescribePhysicalConnectionsWithCallback invokes the ecs.DescribePhysicalConnections API asynchronously -// api document: https://help.aliyun.com/api/ecs/describephysicalconnections.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribePhysicalConnectionsWithCallback(request *DescribePhysicalConnectionsRequest, callback func(response *DescribePhysicalConnectionsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,15 +71,15 @@ func (client *Client) DescribePhysicalConnectionsWithCallback(request *DescribeP // DescribePhysicalConnectionsRequest is the request struct for api DescribePhysicalConnections type DescribePhysicalConnectionsRequest struct { *requests.RpcRequest - Filter *[]DescribePhysicalConnectionsFilter `position:"Query" name:"Filter" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` PageSize requests.Integer `position:"Query" name:"PageSize"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + Filter *[]DescribePhysicalConnectionsFilter `position:"Query" name:"Filter" type:"Repeated"` } // DescribePhysicalConnectionsFilter is a repeated param struct in DescribePhysicalConnectionsRequest @@ -109,6 +104,7 @@ func CreateDescribePhysicalConnectionsRequest() (request *DescribePhysicalConnec RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribePhysicalConnections", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_price.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_price.go index e1cf62dad..44181620f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_price.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_price.go @@ -21,7 +21,6 @@ import ( ) // DescribePrice invokes the ecs.DescribePrice API synchronously -// api document: https://help.aliyun.com/api/ecs/describeprice.html func (client *Client) DescribePrice(request *DescribePriceRequest) (response *DescribePriceResponse, err error) { response = CreateDescribePriceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribePrice(request *DescribePriceRequest) (response *De } // DescribePriceWithChan invokes the ecs.DescribePrice API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeprice.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribePriceWithChan(request *DescribePriceRequest) (<-chan *DescribePriceResponse, <-chan error) { responseChan := make(chan *DescribePriceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribePriceWithChan(request *DescribePriceRequest) (<-ch } // DescribePriceWithCallback invokes the ecs.DescribePrice API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeprice.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribePriceWithCallback(request *DescribePriceRequest, callback func(response *DescribePriceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,30 +71,45 @@ func (client *Client) DescribePriceWithCallback(request *DescribePriceRequest, c // DescribePriceRequest is the request struct for api DescribePrice type DescribePriceRequest struct { *requests.RpcRequest - DataDisk3Size requests.Integer `position:"Query" name:"DataDisk.3.Size"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ImageId string `position:"Query" name:"ImageId"` - DataDisk3Category string `position:"Query" name:"DataDisk.3.Category"` - IoOptimized string `position:"Query" name:"IoOptimized"` - InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` - SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` - DataDisk4Category string `position:"Query" name:"DataDisk.4.Category"` - DataDisk4Size requests.Integer `position:"Query" name:"DataDisk.4.Size"` - PriceUnit string `position:"Query" name:"PriceUnit"` - InstanceType string `position:"Query" name:"InstanceType"` - DataDisk2Category string `position:"Query" name:"DataDisk.2.Category"` - DataDisk1Size requests.Integer `position:"Query" name:"DataDisk.1.Size"` - Period requests.Integer `position:"Query" name:"Period"` - Amount requests.Integer `position:"Query" name:"Amount"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - DataDisk2Size requests.Integer `position:"Query" name:"DataDisk.2.Size"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ResourceType string `position:"Query" name:"ResourceType"` - DataDisk1Category string `position:"Query" name:"DataDisk.1.Category"` - SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` - InternetChargeType string `position:"Query" name:"InternetChargeType"` - InstanceNetworkType string `position:"Query" name:"InstanceNetworkType"` + DataDisk3Size requests.Integer `position:"Query" name:"DataDisk.3.Size"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + DataDisk3Category string `position:"Query" name:"DataDisk.3.Category"` + Isp string `position:"Query" name:"Isp"` + DataDisk4Size requests.Integer `position:"Query" name:"DataDisk.4.Size"` + PriceUnit string `position:"Query" name:"PriceUnit"` + Period requests.Integer `position:"Query" name:"Period"` + DataDisk1PerformanceLevel string `position:"Query" name:"DataDisk.1.PerformanceLevel"` + AssuranceTimes string `position:"Query" name:"AssuranceTimes"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceCpuCoreCount requests.Integer `position:"Query" name:"InstanceCpuCoreCount"` + InternetChargeType string `position:"Query" name:"InternetChargeType"` + InstanceNetworkType string `position:"Query" name:"InstanceNetworkType"` + InstanceAmount requests.Integer `position:"Query" name:"InstanceAmount"` + InstanceTypeList *[]string `position:"Query" name:"InstanceTypeList" type:"Repeated"` + DataDisk3PerformanceLevel string `position:"Query" name:"DataDisk.3.PerformanceLevel"` + ImageId string `position:"Query" name:"ImageId"` + IoOptimized string `position:"Query" name:"IoOptimized"` + InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` + SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` + Platform string `position:"Query" name:"Platform"` + Capacity requests.Integer `position:"Query" name:"Capacity"` + SystemDiskPerformanceLevel string `position:"Query" name:"SystemDisk.PerformanceLevel"` + DataDisk4Category string `position:"Query" name:"DataDisk.4.Category"` + DataDisk4PerformanceLevel string `position:"Query" name:"DataDisk.4.PerformanceLevel"` + Scope string `position:"Query" name:"Scope"` + InstanceType string `position:"Query" name:"InstanceType"` + DedicatedHostType string `position:"Query" name:"DedicatedHostType"` + DataDisk2Category string `position:"Query" name:"DataDisk.2.Category"` + DataDisk1Size requests.Integer `position:"Query" name:"DataDisk.1.Size"` + Amount requests.Integer `position:"Query" name:"Amount"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + DataDisk2Size requests.Integer `position:"Query" name:"DataDisk.2.Size"` + ResourceType string `position:"Query" name:"ResourceType"` + DataDisk1Category string `position:"Query" name:"DataDisk.1.Category"` + DataDisk2PerformanceLevel string `position:"Query" name:"DataDisk.2.PerformanceLevel"` + SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` + OfferingType string `position:"Query" name:"OfferingType"` } // DescribePriceResponse is the response struct for api DescribePrice @@ -115,6 +125,7 @@ func CreateDescribePriceRequest() (request *DescribePriceRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribePrice", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_recommend_instance_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_recommend_instance_type.go index 3e09ef4ee..654828076 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_recommend_instance_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_recommend_instance_type.go @@ -21,7 +21,6 @@ import ( ) // DescribeRecommendInstanceType invokes the ecs.DescribeRecommendInstanceType API synchronously -// api document: https://help.aliyun.com/api/ecs/describerecommendinstancetype.html func (client *Client) DescribeRecommendInstanceType(request *DescribeRecommendInstanceTypeRequest) (response *DescribeRecommendInstanceTypeResponse, err error) { response = CreateDescribeRecommendInstanceTypeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeRecommendInstanceType(request *DescribeRecommendIn } // DescribeRecommendInstanceTypeWithChan invokes the ecs.DescribeRecommendInstanceType API asynchronously -// api document: https://help.aliyun.com/api/ecs/describerecommendinstancetype.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRecommendInstanceTypeWithChan(request *DescribeRecommendInstanceTypeRequest) (<-chan *DescribeRecommendInstanceTypeResponse, <-chan error) { responseChan := make(chan *DescribeRecommendInstanceTypeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeRecommendInstanceTypeWithChan(request *DescribeRec } // DescribeRecommendInstanceTypeWithCallback invokes the ecs.DescribeRecommendInstanceType API asynchronously -// api document: https://help.aliyun.com/api/ecs/describerecommendinstancetype.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRecommendInstanceTypeWithCallback(request *DescribeRecommendInstanceTypeRequest, callback func(response *DescribeRecommendInstanceTypeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,16 +72,24 @@ func (client *Client) DescribeRecommendInstanceTypeWithCallback(request *Describ type DescribeRecommendInstanceTypeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - Channel string `position:"Query" name:"channel"` + Memory requests.Float `position:"Query" name:"Memory"` + IoOptimized string `position:"Query" name:"IoOptimized"` NetworkType string `position:"Query" name:"NetworkType"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - Operator string `position:"Query" name:"operator"` - Token string `position:"Query" name:"token"` Scene string `position:"Query" name:"Scene"` + Cores requests.Integer `position:"Query" name:"Cores"` + SystemDiskCategory string `position:"Query" name:"SystemDiskCategory"` InstanceType string `position:"Query" name:"InstanceType"` - ProxyId string `position:"Query" name:"proxyId"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + MaxPrice requests.Float `position:"Query" name:"MaxPrice"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + ZoneMatchMode string `position:"Query" name:"ZoneMatchMode"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + InstanceTypeFamily *[]string `position:"Query" name:"InstanceTypeFamily" type:"Repeated"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SpotStrategy string `position:"Query" name:"SpotStrategy"` + PriorityStrategy string `position:"Query" name:"PriorityStrategy"` + InstanceFamilyLevel string `position:"Query" name:"InstanceFamilyLevel"` + ZoneId string `position:"Query" name:"ZoneId"` } // DescribeRecommendInstanceTypeResponse is the response struct for api DescribeRecommendInstanceType @@ -102,6 +105,7 @@ func CreateDescribeRecommendInstanceTypeRequest() (request *DescribeRecommendIns RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeRecommendInstanceType", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_regions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_regions.go index 89637c7e8..8036b97c0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_regions.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_regions.go @@ -21,7 +21,6 @@ import ( ) // DescribeRegions invokes the ecs.DescribeRegions API synchronously -// api document: https://help.aliyun.com/api/ecs/describeregions.html func (client *Client) DescribeRegions(request *DescribeRegionsRequest) (response *DescribeRegionsResponse, err error) { response = CreateDescribeRegionsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeRegions(request *DescribeRegionsRequest) (response } // DescribeRegionsWithChan invokes the ecs.DescribeRegions API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeregions.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRegionsWithChan(request *DescribeRegionsRequest) (<-chan *DescribeRegionsResponse, <-chan error) { responseChan := make(chan *DescribeRegionsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeRegionsWithChan(request *DescribeRegionsRequest) ( } // DescribeRegionsWithCallback invokes the ecs.DescribeRegions API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeregions.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRegionsWithCallback(request *DescribeRegionsRequest, callback func(response *DescribeRegionsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) DescribeRegionsWithCallback(request *DescribeRegionsReques type DescribeRegionsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - AcceptLanguage string `position:"Query" name:"AcceptLanguage"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InstanceChargeType string `position:"Query" name:"InstanceChargeType"` ResourceType string `position:"Query" name:"ResourceType"` + AcceptLanguage string `position:"Query" name:"AcceptLanguage"` } // DescribeRegionsResponse is the response struct for api DescribeRegions @@ -98,6 +93,7 @@ func CreateDescribeRegionsRequest() (request *DescribeRegionsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeRegions", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_renewal_price.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_renewal_price.go index 5fc0767c8..a10a1f629 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_renewal_price.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_renewal_price.go @@ -21,7 +21,6 @@ import ( ) // DescribeRenewalPrice invokes the ecs.DescribeRenewalPrice API synchronously -// api document: https://help.aliyun.com/api/ecs/describerenewalprice.html func (client *Client) DescribeRenewalPrice(request *DescribeRenewalPriceRequest) (response *DescribeRenewalPriceResponse, err error) { response = CreateDescribeRenewalPriceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeRenewalPrice(request *DescribeRenewalPriceRequest) } // DescribeRenewalPriceWithChan invokes the ecs.DescribeRenewalPrice API asynchronously -// api document: https://help.aliyun.com/api/ecs/describerenewalprice.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRenewalPriceWithChan(request *DescribeRenewalPriceRequest) (<-chan *DescribeRenewalPriceResponse, <-chan error) { responseChan := make(chan *DescribeRenewalPriceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeRenewalPriceWithChan(request *DescribeRenewalPrice } // DescribeRenewalPriceWithCallback invokes the ecs.DescribeRenewalPrice API asynchronously -// api document: https://help.aliyun.com/api/ecs/describerenewalprice.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRenewalPriceWithCallback(request *DescribeRenewalPriceRequest, callback func(response *DescribeRenewalPriceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,12 @@ func (client *Client) DescribeRenewalPriceWithCallback(request *DescribeRenewalP type DescribeRenewalPriceRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PriceUnit string `position:"Query" name:"PriceUnit"` ResourceId string `position:"Query" name:"ResourceId"` Period requests.Integer `position:"Query" name:"Period"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - PriceUnit string `position:"Query" name:"PriceUnit"` + ExpectedRenewDay requests.Integer `position:"Query" name:"ExpectedRenewDay"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` ResourceType string `position:"Query" name:"ResourceType"` } @@ -99,6 +95,7 @@ func CreateDescribeRenewalPriceRequest() (request *DescribeRenewalPriceRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeRenewalPrice", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_reserved_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_reserved_instances.go index 5ef48623f..d9f336630 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_reserved_instances.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_reserved_instances.go @@ -21,7 +21,6 @@ import ( ) // DescribeReservedInstances invokes the ecs.DescribeReservedInstances API synchronously -// api document: https://help.aliyun.com/api/ecs/describereservedinstances.html func (client *Client) DescribeReservedInstances(request *DescribeReservedInstancesRequest) (response *DescribeReservedInstancesResponse, err error) { response = CreateDescribeReservedInstancesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeReservedInstances(request *DescribeReservedInstanc } // DescribeReservedInstancesWithChan invokes the ecs.DescribeReservedInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/describereservedinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeReservedInstancesWithChan(request *DescribeReservedInstancesRequest) (<-chan *DescribeReservedInstancesResponse, <-chan error) { responseChan := make(chan *DescribeReservedInstancesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeReservedInstancesWithChan(request *DescribeReserve } // DescribeReservedInstancesWithCallback invokes the ecs.DescribeReservedInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/describereservedinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeReservedInstancesWithCallback(request *DescribeReservedInstancesRequest, callback func(response *DescribeReservedInstancesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,21 +71,29 @@ func (client *Client) DescribeReservedInstancesWithCallback(request *DescribeRes // DescribeReservedInstancesRequest is the request struct for api DescribeReservedInstances type DescribeReservedInstancesRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` - LockReason string `position:"Query" name:"LockReason"` - Scope string `position:"Query" name:"Scope"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - InstanceType string `position:"Query" name:"InstanceType"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - InstanceTypeFamily string `position:"Query" name:"InstanceTypeFamily"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ReservedInstanceId *[]string `position:"Query" name:"ReservedInstanceId" type:"Repeated"` - OfferingType string `position:"Query" name:"OfferingType"` - ZoneId string `position:"Query" name:"ZoneId"` - ReservedInstanceName string `position:"Query" name:"ReservedInstanceName"` - Status *[]string `position:"Query" name:"Status" type:"Repeated"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + LockReason string `position:"Query" name:"LockReason"` + Scope string `position:"Query" name:"Scope"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + InstanceType string `position:"Query" name:"InstanceType"` + Tag *[]DescribeReservedInstancesTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + InstanceTypeFamily string `position:"Query" name:"InstanceTypeFamily"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ReservedInstanceId *[]string `position:"Query" name:"ReservedInstanceId" type:"Repeated"` + OfferingType string `position:"Query" name:"OfferingType"` + ZoneId string `position:"Query" name:"ZoneId"` + ReservedInstanceName string `position:"Query" name:"ReservedInstanceName"` + Status *[]string `position:"Query" name:"Status" type:"Repeated"` + AllocationType string `position:"Query" name:"AllocationType"` +} + +// DescribeReservedInstancesTag is a repeated param struct in DescribeReservedInstancesRequest +type DescribeReservedInstancesTag struct { + Key string `name:"Key"` + Value string `name:"Value"` } // DescribeReservedInstancesResponse is the response struct for api DescribeReservedInstances @@ -109,6 +112,7 @@ func CreateDescribeReservedInstancesRequest() (request *DescribeReservedInstance RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeReservedInstances", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_resource_by_tags.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_resource_by_tags.go index c962092a1..3dccad16e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_resource_by_tags.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_resource_by_tags.go @@ -21,7 +21,6 @@ import ( ) // DescribeResourceByTags invokes the ecs.DescribeResourceByTags API synchronously -// api document: https://help.aliyun.com/api/ecs/describeresourcebytags.html func (client *Client) DescribeResourceByTags(request *DescribeResourceByTagsRequest) (response *DescribeResourceByTagsResponse, err error) { response = CreateDescribeResourceByTagsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeResourceByTags(request *DescribeResourceByTagsRequ } // DescribeResourceByTagsWithChan invokes the ecs.DescribeResourceByTags API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeresourcebytags.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeResourceByTagsWithChan(request *DescribeResourceByTagsRequest) (<-chan *DescribeResourceByTagsResponse, <-chan error) { responseChan := make(chan *DescribeResourceByTagsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeResourceByTagsWithChan(request *DescribeResourceBy } // DescribeResourceByTagsWithCallback invokes the ecs.DescribeResourceByTags API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeresourcebytags.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeResourceByTagsWithCallback(request *DescribeResourceByTagsRequest, callback func(response *DescribeResourceByTagsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) DescribeResourceByTagsWithCallback(request *DescribeResour type DescribeResourceByTagsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` PageSize requests.Integer `position:"Query" name:"PageSize"` Tag *[]DescribeResourceByTagsTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` ResourceType string `position:"Query" name:"ResourceType"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` } // DescribeResourceByTagsTag is a repeated param struct in DescribeResourceByTagsRequest @@ -107,6 +102,7 @@ func CreateDescribeResourceByTagsRequest() (request *DescribeResourceByTagsReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeResourceByTags", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_resources_modification.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_resources_modification.go index 5b258235f..571af1a04 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_resources_modification.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_resources_modification.go @@ -21,7 +21,6 @@ import ( ) // DescribeResourcesModification invokes the ecs.DescribeResourcesModification API synchronously -// api document: https://help.aliyun.com/api/ecs/describeresourcesmodification.html func (client *Client) DescribeResourcesModification(request *DescribeResourcesModificationRequest) (response *DescribeResourcesModificationResponse, err error) { response = CreateDescribeResourcesModificationResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeResourcesModification(request *DescribeResourcesMo } // DescribeResourcesModificationWithChan invokes the ecs.DescribeResourcesModification API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeresourcesmodification.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeResourcesModificationWithChan(request *DescribeResourcesModificationRequest) (<-chan *DescribeResourcesModificationResponse, <-chan error) { responseChan := make(chan *DescribeResourcesModificationResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeResourcesModificationWithChan(request *DescribeRes } // DescribeResourcesModificationWithCallback invokes the ecs.DescribeResourcesModification API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeresourcesmodification.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeResourcesModificationWithCallback(request *DescribeResourcesModificationRequest, callback func(response *DescribeResourcesModificationResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -102,6 +97,7 @@ func CreateDescribeResourcesModificationRequest() (request *DescribeResourcesMod RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeResourcesModification", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_route_tables.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_route_tables.go index 977570992..1b3fd90a6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_route_tables.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_route_tables.go @@ -21,7 +21,6 @@ import ( ) // DescribeRouteTables invokes the ecs.DescribeRouteTables API synchronously -// api document: https://help.aliyun.com/api/ecs/describeroutetables.html func (client *Client) DescribeRouteTables(request *DescribeRouteTablesRequest) (response *DescribeRouteTablesResponse, err error) { response = CreateDescribeRouteTablesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeRouteTables(request *DescribeRouteTablesRequest) ( } // DescribeRouteTablesWithChan invokes the ecs.DescribeRouteTables API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeroutetables.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRouteTablesWithChan(request *DescribeRouteTablesRequest) (<-chan *DescribeRouteTablesResponse, <-chan error) { responseChan := make(chan *DescribeRouteTablesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeRouteTablesWithChan(request *DescribeRouteTablesRe } // DescribeRouteTablesWithCallback invokes the ecs.DescribeRouteTables API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeroutetables.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRouteTablesWithCallback(request *DescribeRouteTablesRequest, callback func(response *DescribeRouteTablesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,15 +73,15 @@ type DescribeRouteTablesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` VRouterId string `position:"Query" name:"VRouterId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + RouteTableName string `position:"Query" name:"RouteTableName"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + RouteTableId string `position:"Query" name:"RouteTableId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` RouterType string `position:"Query" name:"RouterType"` - RouteTableName string `position:"Query" name:"RouteTableName"` RouterId string `position:"Query" name:"RouterId"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - RouteTableId string `position:"Query" name:"RouteTableId"` } // DescribeRouteTablesResponse is the response struct for api DescribeRouteTables @@ -105,6 +100,7 @@ func CreateDescribeRouteTablesRequest() (request *DescribeRouteTablesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeRouteTables", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_router_interfaces.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_router_interfaces.go index 7cbc26223..15080e3b9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_router_interfaces.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_router_interfaces.go @@ -21,7 +21,6 @@ import ( ) // DescribeRouterInterfaces invokes the ecs.DescribeRouterInterfaces API synchronously -// api document: https://help.aliyun.com/api/ecs/describerouterinterfaces.html func (client *Client) DescribeRouterInterfaces(request *DescribeRouterInterfacesRequest) (response *DescribeRouterInterfacesResponse, err error) { response = CreateDescribeRouterInterfacesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeRouterInterfaces(request *DescribeRouterInterfaces } // DescribeRouterInterfacesWithChan invokes the ecs.DescribeRouterInterfaces API asynchronously -// api document: https://help.aliyun.com/api/ecs/describerouterinterfaces.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRouterInterfacesWithChan(request *DescribeRouterInterfacesRequest) (<-chan *DescribeRouterInterfacesResponse, <-chan error) { responseChan := make(chan *DescribeRouterInterfacesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeRouterInterfacesWithChan(request *DescribeRouterIn } // DescribeRouterInterfacesWithCallback invokes the ecs.DescribeRouterInterfaces API asynchronously -// api document: https://help.aliyun.com/api/ecs/describerouterinterfaces.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeRouterInterfacesWithCallback(request *DescribeRouterInterfacesRequest, callback func(response *DescribeRouterInterfacesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,12 +71,12 @@ func (client *Client) DescribeRouterInterfacesWithCallback(request *DescribeRout // DescribeRouterInterfacesRequest is the request struct for api DescribeRouterInterfaces type DescribeRouterInterfacesRequest struct { *requests.RpcRequest - Filter *[]DescribeRouterInterfacesFilter `position:"Query" name:"Filter" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Filter *[]DescribeRouterInterfacesFilter `position:"Query" name:"Filter" type:"Repeated"` } // DescribeRouterInterfacesFilter is a repeated param struct in DescribeRouterInterfacesRequest @@ -106,6 +101,7 @@ func CreateDescribeRouterInterfacesRequest() (request *DescribeRouterInterfacesR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeRouterInterfaces", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_group_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_group_attribute.go index 74006029c..0d53b82c2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_group_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_group_attribute.go @@ -21,7 +21,6 @@ import ( ) // DescribeSecurityGroupAttribute invokes the ecs.DescribeSecurityGroupAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroupattribute.html func (client *Client) DescribeSecurityGroupAttribute(request *DescribeSecurityGroupAttributeRequest) (response *DescribeSecurityGroupAttributeResponse, err error) { response = CreateDescribeSecurityGroupAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSecurityGroupAttribute(request *DescribeSecurityGr } // DescribeSecurityGroupAttributeWithChan invokes the ecs.DescribeSecurityGroupAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroupattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSecurityGroupAttributeWithChan(request *DescribeSecurityGroupAttributeRequest) (<-chan *DescribeSecurityGroupAttributeResponse, <-chan error) { responseChan := make(chan *DescribeSecurityGroupAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSecurityGroupAttributeWithChan(request *DescribeSe } // DescribeSecurityGroupAttributeWithCallback invokes the ecs.DescribeSecurityGroupAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroupattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSecurityGroupAttributeWithCallback(request *DescribeSecurityGroupAttributeRequest, callback func(response *DescribeSecurityGroupAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,11 +73,11 @@ type DescribeSecurityGroupAttributeRequest struct { *requests.RpcRequest NicType string `position:"Query" name:"NicType"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + Direction string `position:"Query" name:"Direction"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - Direction string `position:"Query" name:"Direction"` } // DescribeSecurityGroupAttributeResponse is the response struct for api DescribeSecurityGroupAttribute @@ -104,6 +99,7 @@ func CreateDescribeSecurityGroupAttributeRequest() (request *DescribeSecurityGro RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSecurityGroupAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_group_references.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_group_references.go index 74a0c86a0..1db290c86 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_group_references.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_group_references.go @@ -21,7 +21,6 @@ import ( ) // DescribeSecurityGroupReferences invokes the ecs.DescribeSecurityGroupReferences API synchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroupreferences.html func (client *Client) DescribeSecurityGroupReferences(request *DescribeSecurityGroupReferencesRequest) (response *DescribeSecurityGroupReferencesResponse, err error) { response = CreateDescribeSecurityGroupReferencesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSecurityGroupReferences(request *DescribeSecurityG } // DescribeSecurityGroupReferencesWithChan invokes the ecs.DescribeSecurityGroupReferences API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroupreferences.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSecurityGroupReferencesWithChan(request *DescribeSecurityGroupReferencesRequest) (<-chan *DescribeSecurityGroupReferencesResponse, <-chan error) { responseChan := make(chan *DescribeSecurityGroupReferencesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSecurityGroupReferencesWithChan(request *DescribeS } // DescribeSecurityGroupReferencesWithCallback invokes the ecs.DescribeSecurityGroupReferences API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroupreferences.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSecurityGroupReferencesWithCallback(request *DescribeSecurityGroupReferencesRequest, callback func(response *DescribeSecurityGroupReferencesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) DescribeSecurityGroupReferencesWithCallback(request *Descr type DescribeSecurityGroupReferencesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + SecurityGroupId *[]string `position:"Query" name:"SecurityGroupId" type:"Repeated"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - SecurityGroupId *[]string `position:"Query" name:"SecurityGroupId" type:"Repeated"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -96,6 +91,7 @@ func CreateDescribeSecurityGroupReferencesRequest() (request *DescribeSecurityGr RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSecurityGroupReferences", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_groups.go index 15eecaf8f..da88e742b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_groups.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_security_groups.go @@ -21,7 +21,6 @@ import ( ) // DescribeSecurityGroups invokes the ecs.DescribeSecurityGroups API synchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroups.html func (client *Client) DescribeSecurityGroups(request *DescribeSecurityGroupsRequest) (response *DescribeSecurityGroupsResponse, err error) { response = CreateDescribeSecurityGroupsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSecurityGroups(request *DescribeSecurityGroupsRequ } // DescribeSecurityGroupsWithChan invokes the ecs.DescribeSecurityGroups API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroups.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSecurityGroupsWithChan(request *DescribeSecurityGroupsRequest) (<-chan *DescribeSecurityGroupsResponse, <-chan error) { responseChan := make(chan *DescribeSecurityGroupsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSecurityGroupsWithChan(request *DescribeSecurityGr } // DescribeSecurityGroupsWithCallback invokes the ecs.DescribeSecurityGroups API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesecuritygroups.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSecurityGroupsWithCallback(request *DescribeSecurityGroupsRequest, callback func(response *DescribeSecurityGroupsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,21 +72,22 @@ func (client *Client) DescribeSecurityGroupsWithCallback(request *DescribeSecuri type DescribeSecurityGroupsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - DryRun requests.Boolean `position:"Query" name:"DryRun"` FuzzyQuery requests.Boolean `position:"Query" name:"FuzzyQuery"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` SecurityGroupId string `position:"Query" name:"SecurityGroupId"` IsQueryEcsCount requests.Boolean `position:"Query" name:"IsQueryEcsCount"` NetworkType string `position:"Query" name:"NetworkType"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - SecurityGroupIds string `position:"Query" name:"SecurityGroupIds"` SecurityGroupName string `position:"Query" name:"SecurityGroupName"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - VpcId string `position:"Query" name:"VpcId"` PageSize requests.Integer `position:"Query" name:"PageSize"` Tag *[]DescribeSecurityGroupsTag `position:"Query" name:"Tag" type:"Repeated"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SecurityGroupIds string `position:"Query" name:"SecurityGroupIds"` + SecurityGroupType string `position:"Query" name:"SecurityGroupType"` + VpcId string `position:"Query" name:"VpcId"` } // DescribeSecurityGroupsTag is a repeated param struct in DescribeSecurityGroupsRequest @@ -117,6 +113,7 @@ func CreateDescribeSecurityGroupsRequest() (request *DescribeSecurityGroupsReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSecurityGroups", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_send_file_results.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_send_file_results.go new file mode 100644 index 000000000..65629b8d6 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_send_file_results.go @@ -0,0 +1,111 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeSendFileResults invokes the ecs.DescribeSendFileResults API synchronously +func (client *Client) DescribeSendFileResults(request *DescribeSendFileResultsRequest) (response *DescribeSendFileResultsResponse, err error) { + response = CreateDescribeSendFileResultsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeSendFileResultsWithChan invokes the ecs.DescribeSendFileResults API asynchronously +func (client *Client) DescribeSendFileResultsWithChan(request *DescribeSendFileResultsRequest) (<-chan *DescribeSendFileResultsResponse, <-chan error) { + responseChan := make(chan *DescribeSendFileResultsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeSendFileResults(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeSendFileResultsWithCallback invokes the ecs.DescribeSendFileResults API asynchronously +func (client *Client) DescribeSendFileResultsWithCallback(request *DescribeSendFileResultsRequest, callback func(response *DescribeSendFileResultsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeSendFileResultsResponse + var err error + defer close(result) + response, err = client.DescribeSendFileResults(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeSendFileResultsRequest is the request struct for api DescribeSendFileResults +type DescribeSendFileResultsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + InvokeId string `position:"Query" name:"InvokeId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + Name string `position:"Query" name:"Name"` +} + +// DescribeSendFileResultsResponse is the response struct for api DescribeSendFileResults +type DescribeSendFileResultsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + PageSize int64 `json:"PageSize" xml:"PageSize"` + Invocations InvocationsInDescribeSendFileResults `json:"Invocations" xml:"Invocations"` +} + +// CreateDescribeSendFileResultsRequest creates a request to invoke DescribeSendFileResults API +func CreateDescribeSendFileResultsRequest() (request *DescribeSendFileResultsRequest) { + request = &DescribeSendFileResultsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSendFileResults", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeSendFileResultsResponse creates a response to parse from DescribeSendFileResults response +func CreateDescribeSendFileResultsResponse() (response *DescribeSendFileResultsResponse) { + response = &DescribeSendFileResultsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_groups.go new file mode 100644 index 000000000..76915dad9 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_groups.go @@ -0,0 +1,111 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeSnapshotGroups invokes the ecs.DescribeSnapshotGroups API synchronously +func (client *Client) DescribeSnapshotGroups(request *DescribeSnapshotGroupsRequest) (response *DescribeSnapshotGroupsResponse, err error) { + response = CreateDescribeSnapshotGroupsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeSnapshotGroupsWithChan invokes the ecs.DescribeSnapshotGroups API asynchronously +func (client *Client) DescribeSnapshotGroupsWithChan(request *DescribeSnapshotGroupsRequest) (<-chan *DescribeSnapshotGroupsResponse, <-chan error) { + responseChan := make(chan *DescribeSnapshotGroupsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeSnapshotGroups(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeSnapshotGroupsWithCallback invokes the ecs.DescribeSnapshotGroups API asynchronously +func (client *Client) DescribeSnapshotGroupsWithCallback(request *DescribeSnapshotGroupsRequest, callback func(response *DescribeSnapshotGroupsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeSnapshotGroupsResponse + var err error + defer close(result) + response, err = client.DescribeSnapshotGroups(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeSnapshotGroupsRequest is the request struct for api DescribeSnapshotGroups +type DescribeSnapshotGroupsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + NextToken string `position:"Query" name:"NextToken"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + SnapshotGroupId *[]string `position:"Query" name:"SnapshotGroupId" type:"Repeated"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AdditionalAttributes *[]string `position:"Query" name:"AdditionalAttributes" type:"Repeated"` + InstanceId string `position:"Query" name:"InstanceId"` + Name string `position:"Query" name:"Name"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + Status *[]string `position:"Query" name:"Status" type:"Repeated"` +} + +// DescribeSnapshotGroupsResponse is the response struct for api DescribeSnapshotGroups +type DescribeSnapshotGroupsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + NextToken string `json:"NextToken" xml:"NextToken"` + SnapshotGroups SnapshotGroups `json:"SnapshotGroups" xml:"SnapshotGroups"` +} + +// CreateDescribeSnapshotGroupsRequest creates a request to invoke DescribeSnapshotGroups API +func CreateDescribeSnapshotGroupsRequest() (request *DescribeSnapshotGroupsRequest) { + request = &DescribeSnapshotGroupsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSnapshotGroups", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeSnapshotGroupsResponse creates a response to parse from DescribeSnapshotGroups response +func CreateDescribeSnapshotGroupsResponse() (response *DescribeSnapshotGroupsResponse) { + response = &DescribeSnapshotGroupsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_links.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_links.go index 322f4efeb..6e8160ba7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_links.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_links.go @@ -21,7 +21,6 @@ import ( ) // DescribeSnapshotLinks invokes the ecs.DescribeSnapshotLinks API synchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotlinks.html func (client *Client) DescribeSnapshotLinks(request *DescribeSnapshotLinksRequest) (response *DescribeSnapshotLinksResponse, err error) { response = CreateDescribeSnapshotLinksResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSnapshotLinks(request *DescribeSnapshotLinksReques } // DescribeSnapshotLinksWithChan invokes the ecs.DescribeSnapshotLinks API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotlinks.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotLinksWithChan(request *DescribeSnapshotLinksRequest) (<-chan *DescribeSnapshotLinksResponse, <-chan error) { responseChan := make(chan *DescribeSnapshotLinksResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSnapshotLinksWithChan(request *DescribeSnapshotLin } // DescribeSnapshotLinksWithCallback invokes the ecs.DescribeSnapshotLinks API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotlinks.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotLinksWithCallback(request *DescribeSnapshotLinksRequest, callback func(response *DescribeSnapshotLinksResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,14 +72,14 @@ func (client *Client) DescribeSnapshotLinksWithCallback(request *DescribeSnapsho type DescribeSnapshotLinksRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` PageSize requests.Integer `position:"Query" name:"PageSize"` DiskIds string `position:"Query" name:"DiskIds"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` SnapshotLinkIds string `position:"Query" name:"SnapshotLinkIds"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeSnapshotLinksResponse is the response struct for api DescribeSnapshotLinks @@ -103,6 +98,7 @@ func CreateDescribeSnapshotLinksRequest() (request *DescribeSnapshotLinksRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSnapshotLinks", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_monitor_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_monitor_data.go index cd42e3a36..76f9c2e8f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_monitor_data.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_monitor_data.go @@ -21,7 +21,6 @@ import ( ) // DescribeSnapshotMonitorData invokes the ecs.DescribeSnapshotMonitorData API synchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotmonitordata.html func (client *Client) DescribeSnapshotMonitorData(request *DescribeSnapshotMonitorDataRequest) (response *DescribeSnapshotMonitorDataResponse, err error) { response = CreateDescribeSnapshotMonitorDataResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSnapshotMonitorData(request *DescribeSnapshotMonit } // DescribeSnapshotMonitorDataWithChan invokes the ecs.DescribeSnapshotMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotmonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotMonitorDataWithChan(request *DescribeSnapshotMonitorDataRequest) (<-chan *DescribeSnapshotMonitorDataResponse, <-chan error) { responseChan := make(chan *DescribeSnapshotMonitorDataResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSnapshotMonitorDataWithChan(request *DescribeSnaps } // DescribeSnapshotMonitorDataWithCallback invokes the ecs.DescribeSnapshotMonitorData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotmonitordata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotMonitorDataWithCallback(request *DescribeSnapshotMonitorDataRequest, callback func(response *DescribeSnapshotMonitorDataResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,13 @@ func (client *Client) DescribeSnapshotMonitorDataWithCallback(request *DescribeS type DescribeSnapshotMonitorDataRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + StartTime string `position:"Query" name:"StartTime"` Period requests.Integer `position:"Query" name:"Period"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` EndTime string `position:"Query" name:"EndTime"` - StartTime string `position:"Query" name:"StartTime"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Category string `position:"Query" name:"Category"` } // DescribeSnapshotMonitorDataResponse is the response struct for api DescribeSnapshotMonitorData @@ -98,6 +94,7 @@ func CreateDescribeSnapshotMonitorDataRequest() (request *DescribeSnapshotMonito RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSnapshotMonitorData", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_package.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_package.go index b4fefc344..92a126090 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_package.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshot_package.go @@ -21,7 +21,6 @@ import ( ) // DescribeSnapshotPackage invokes the ecs.DescribeSnapshotPackage API synchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotpackage.html func (client *Client) DescribeSnapshotPackage(request *DescribeSnapshotPackageRequest) (response *DescribeSnapshotPackageResponse, err error) { response = CreateDescribeSnapshotPackageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSnapshotPackage(request *DescribeSnapshotPackageRe } // DescribeSnapshotPackageWithChan invokes the ecs.DescribeSnapshotPackage API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotpackage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotPackageWithChan(request *DescribeSnapshotPackageRequest) (<-chan *DescribeSnapshotPackageResponse, <-chan error) { responseChan := make(chan *DescribeSnapshotPackageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSnapshotPackageWithChan(request *DescribeSnapshotP } // DescribeSnapshotPackageWithCallback invokes the ecs.DescribeSnapshotPackage API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotpackage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotPackageWithCallback(request *DescribeSnapshotPackageRequest, callback func(response *DescribeSnapshotPackageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,11 @@ func (client *Client) DescribeSnapshotPackageWithCallback(request *DescribeSnaps type DescribeSnapshotPackageRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` } // DescribeSnapshotPackageResponse is the response struct for api DescribeSnapshotPackage @@ -100,6 +95,7 @@ func CreateDescribeSnapshotPackageRequest() (request *DescribeSnapshotPackageReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSnapshotPackage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshots.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshots.go index cad590c20..4527873af 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshots.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshots.go @@ -21,7 +21,6 @@ import ( ) // DescribeSnapshots invokes the ecs.DescribeSnapshots API synchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshots.html func (client *Client) DescribeSnapshots(request *DescribeSnapshotsRequest) (response *DescribeSnapshotsResponse, err error) { response = CreateDescribeSnapshotsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSnapshots(request *DescribeSnapshotsRequest) (resp } // DescribeSnapshotsWithChan invokes the ecs.DescribeSnapshots API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshots.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotsWithChan(request *DescribeSnapshotsRequest) (<-chan *DescribeSnapshotsResponse, <-chan error) { responseChan := make(chan *DescribeSnapshotsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSnapshotsWithChan(request *DescribeSnapshotsReques } // DescribeSnapshotsWithCallback invokes the ecs.DescribeSnapshots API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshots.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotsWithCallback(request *DescribeSnapshotsRequest, callback func(response *DescribeSnapshotsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -81,25 +76,28 @@ type DescribeSnapshotsRequest struct { SnapshotIds string `position:"Query" name:"SnapshotIds"` Usage string `position:"Query" name:"Usage"` SnapshotLinkId string `position:"Query" name:"SnapshotLinkId"` - SnapshotName string `position:"Query" name:"SnapshotName"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` ResourceGroupId string `position:"Query" name:"ResourceGroupId"` Filter1Key string `position:"Query" name:"Filter.1.Key"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - DiskId string `position:"Query" name:"DiskId"` Tag *[]DescribeSnapshotsTag `position:"Query" name:"Tag" type:"Repeated"` DryRun requests.Boolean `position:"Query" name:"DryRun"` + Filter1Value string `position:"Query" name:"Filter.1.Value"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + MaxResults requests.Integer `position:"Query" name:"MaxResults"` + Status string `position:"Query" name:"Status"` + SnapshotName string `position:"Query" name:"SnapshotName"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + NextToken string `position:"Query" name:"NextToken"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + DiskId string `position:"Query" name:"DiskId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` SourceDiskType string `position:"Query" name:"SourceDiskType"` - Filter1Value string `position:"Query" name:"Filter.1.Value"` Filter2Key string `position:"Query" name:"Filter.2.Key"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` Encrypted requests.Boolean `position:"Query" name:"Encrypted"` SnapshotType string `position:"Query" name:"SnapshotType"` KMSKeyId string `position:"Query" name:"KMSKeyId"` - Status string `position:"Query" name:"Status"` + Category string `position:"Query" name:"Category"` } // DescribeSnapshotsTag is a repeated param struct in DescribeSnapshotsRequest @@ -111,11 +109,12 @@ type DescribeSnapshotsTag struct { // DescribeSnapshotsResponse is the response struct for api DescribeSnapshots type DescribeSnapshotsResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - PageNumber int `json:"PageNumber" xml:"PageNumber"` - PageSize int `json:"PageSize" xml:"PageSize"` - Snapshots Snapshots `json:"Snapshots" xml:"Snapshots"` + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + NextToken string `json:"NextToken" xml:"NextToken"` + Snapshots SnapshotsInDescribeSnapshots `json:"Snapshots" xml:"Snapshots"` } // CreateDescribeSnapshotsRequest creates a request to invoke DescribeSnapshots API @@ -124,6 +123,7 @@ func CreateDescribeSnapshotsRequest() (request *DescribeSnapshotsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSnapshots", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshots_usage.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshots_usage.go index 769579cd4..c0edf5bf1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshots_usage.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_snapshots_usage.go @@ -21,7 +21,6 @@ import ( ) // DescribeSnapshotsUsage invokes the ecs.DescribeSnapshotsUsage API synchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotsusage.html func (client *Client) DescribeSnapshotsUsage(request *DescribeSnapshotsUsageRequest) (response *DescribeSnapshotsUsageResponse, err error) { response = CreateDescribeSnapshotsUsageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSnapshotsUsage(request *DescribeSnapshotsUsageRequ } // DescribeSnapshotsUsageWithChan invokes the ecs.DescribeSnapshotsUsage API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotsusage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotsUsageWithChan(request *DescribeSnapshotsUsageRequest) (<-chan *DescribeSnapshotsUsageResponse, <-chan error) { responseChan := make(chan *DescribeSnapshotsUsageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSnapshotsUsageWithChan(request *DescribeSnapshotsU } // DescribeSnapshotsUsageWithCallback invokes the ecs.DescribeSnapshotsUsage API asynchronously -// api document: https://help.aliyun.com/api/ecs/describesnapshotsusage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSnapshotsUsageWithCallback(request *DescribeSnapshotsUsageRequest, callback func(response *DescribeSnapshotsUsageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -87,7 +82,7 @@ type DescribeSnapshotsUsageResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` SnapshotCount int `json:"SnapshotCount" xml:"SnapshotCount"` - SnapshotSize int `json:"SnapshotSize" xml:"SnapshotSize"` + SnapshotSize int64 `json:"SnapshotSize" xml:"SnapshotSize"` } // CreateDescribeSnapshotsUsageRequest creates a request to invoke DescribeSnapshotsUsage API @@ -96,6 +91,7 @@ func CreateDescribeSnapshotsUsageRequest() (request *DescribeSnapshotsUsageReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSnapshotsUsage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_spot_advice.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_spot_advice.go new file mode 100644 index 000000000..1f5a007ed --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_spot_advice.go @@ -0,0 +1,116 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeSpotAdvice invokes the ecs.DescribeSpotAdvice API synchronously +func (client *Client) DescribeSpotAdvice(request *DescribeSpotAdviceRequest) (response *DescribeSpotAdviceResponse, err error) { + response = CreateDescribeSpotAdviceResponse() + err = client.DoAction(request, response) + return +} + +// DescribeSpotAdviceWithChan invokes the ecs.DescribeSpotAdvice API asynchronously +func (client *Client) DescribeSpotAdviceWithChan(request *DescribeSpotAdviceRequest) (<-chan *DescribeSpotAdviceResponse, <-chan error) { + responseChan := make(chan *DescribeSpotAdviceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeSpotAdvice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeSpotAdviceWithCallback invokes the ecs.DescribeSpotAdvice API asynchronously +func (client *Client) DescribeSpotAdviceWithCallback(request *DescribeSpotAdviceRequest, callback func(response *DescribeSpotAdviceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeSpotAdviceResponse + var err error + defer close(result) + response, err = client.DescribeSpotAdvice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeSpotAdviceRequest is the request struct for api DescribeSpotAdvice +type DescribeSpotAdviceRequest struct { + *requests.RpcRequest + GpuSpec string `position:"Query" name:"GpuSpec"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Memory requests.Float `position:"Query" name:"Memory"` + InstanceTypes *[]string `position:"Query" name:"InstanceTypes" type:"Repeated"` + IoOptimized string `position:"Query" name:"IoOptimized"` + MinCores requests.Integer `position:"Query" name:"MinCores"` + NetworkType string `position:"Query" name:"NetworkType"` + Cores requests.Integer `position:"Query" name:"Cores"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + InstanceTypeFamily string `position:"Query" name:"InstanceTypeFamily"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceFamilyLevel string `position:"Query" name:"InstanceFamilyLevel"` + ZoneId string `position:"Query" name:"ZoneId"` + GpuAmount requests.Integer `position:"Query" name:"GpuAmount"` + MinMemory requests.Float `position:"Query" name:"MinMemory"` +} + +// DescribeSpotAdviceResponse is the response struct for api DescribeSpotAdvice +type DescribeSpotAdviceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + RegionId string `json:"RegionId" xml:"RegionId"` + AvailableSpotZones AvailableSpotZones `json:"AvailableSpotZones" xml:"AvailableSpotZones"` +} + +// CreateDescribeSpotAdviceRequest creates a request to invoke DescribeSpotAdvice API +func CreateDescribeSpotAdviceRequest() (request *DescribeSpotAdviceRequest) { + request = &DescribeSpotAdviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSpotAdvice", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeSpotAdviceResponse creates a response to parse from DescribeSpotAdvice response +func CreateDescribeSpotAdviceResponse() (response *DescribeSpotAdviceResponse) { + response = &DescribeSpotAdviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_spot_price_history.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_spot_price_history.go index b8cdc63a6..fe13adab9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_spot_price_history.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_spot_price_history.go @@ -21,7 +21,6 @@ import ( ) // DescribeSpotPriceHistory invokes the ecs.DescribeSpotPriceHistory API synchronously -// api document: https://help.aliyun.com/api/ecs/describespotpricehistory.html func (client *Client) DescribeSpotPriceHistory(request *DescribeSpotPriceHistoryRequest) (response *DescribeSpotPriceHistoryResponse, err error) { response = CreateDescribeSpotPriceHistoryResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeSpotPriceHistory(request *DescribeSpotPriceHistory } // DescribeSpotPriceHistoryWithChan invokes the ecs.DescribeSpotPriceHistory API asynchronously -// api document: https://help.aliyun.com/api/ecs/describespotpricehistory.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSpotPriceHistoryWithChan(request *DescribeSpotPriceHistoryRequest) (<-chan *DescribeSpotPriceHistoryResponse, <-chan error) { responseChan := make(chan *DescribeSpotPriceHistoryResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeSpotPriceHistoryWithChan(request *DescribeSpotPric } // DescribeSpotPriceHistoryWithCallback invokes the ecs.DescribeSpotPriceHistory API asynchronously -// api document: https://help.aliyun.com/api/ecs/describespotpricehistory.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeSpotPriceHistoryWithCallback(request *DescribeSpotPriceHistoryRequest, callback func(response *DescribeSpotPriceHistoryResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -87,6 +82,7 @@ type DescribeSpotPriceHistoryRequest struct { EndTime string `position:"Query" name:"EndTime"` OSType string `position:"Query" name:"OSType"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SpotDuration requests.Integer `position:"Query" name:"SpotDuration"` ZoneId string `position:"Query" name:"ZoneId"` } @@ -105,6 +101,7 @@ func CreateDescribeSpotPriceHistoryRequest() (request *DescribeSpotPriceHistoryR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeSpotPriceHistory", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_capacity_units.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_capacity_units.go new file mode 100644 index 000000000..346145c5a --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_capacity_units.go @@ -0,0 +1,113 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeStorageCapacityUnits invokes the ecs.DescribeStorageCapacityUnits API synchronously +func (client *Client) DescribeStorageCapacityUnits(request *DescribeStorageCapacityUnitsRequest) (response *DescribeStorageCapacityUnitsResponse, err error) { + response = CreateDescribeStorageCapacityUnitsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeStorageCapacityUnitsWithChan invokes the ecs.DescribeStorageCapacityUnits API asynchronously +func (client *Client) DescribeStorageCapacityUnitsWithChan(request *DescribeStorageCapacityUnitsRequest) (<-chan *DescribeStorageCapacityUnitsResponse, <-chan error) { + responseChan := make(chan *DescribeStorageCapacityUnitsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeStorageCapacityUnits(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeStorageCapacityUnitsWithCallback invokes the ecs.DescribeStorageCapacityUnits API asynchronously +func (client *Client) DescribeStorageCapacityUnitsWithCallback(request *DescribeStorageCapacityUnitsRequest, callback func(response *DescribeStorageCapacityUnitsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeStorageCapacityUnitsResponse + var err error + defer close(result) + response, err = client.DescribeStorageCapacityUnits(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeStorageCapacityUnitsRequest is the request struct for api DescribeStorageCapacityUnits +type DescribeStorageCapacityUnitsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + Capacity requests.Integer `position:"Query" name:"Capacity"` + StorageCapacityUnitId *[]string `position:"Query" name:"StorageCapacityUnitId" type:"Repeated"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Name string `position:"Query" name:"Name"` + Status *[]string `position:"Query" name:"Status" type:"Repeated"` + AllocationType string `position:"Query" name:"AllocationType"` +} + +// DescribeStorageCapacityUnitsResponse is the response struct for api DescribeStorageCapacityUnits +type DescribeStorageCapacityUnitsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + StorageCapacityUnits StorageCapacityUnits `json:"StorageCapacityUnits" xml:"StorageCapacityUnits"` +} + +// CreateDescribeStorageCapacityUnitsRequest creates a request to invoke DescribeStorageCapacityUnits API +func CreateDescribeStorageCapacityUnitsRequest() (request *DescribeStorageCapacityUnitsRequest) { + request = &DescribeStorageCapacityUnitsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeStorageCapacityUnits", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeStorageCapacityUnitsResponse creates a response to parse from DescribeStorageCapacityUnits response +func CreateDescribeStorageCapacityUnitsResponse() (response *DescribeStorageCapacityUnitsResponse) { + response = &DescribeStorageCapacityUnitsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_set_details.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_set_details.go new file mode 100644 index 000000000..99746a306 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_set_details.go @@ -0,0 +1,112 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeStorageSetDetails invokes the ecs.DescribeStorageSetDetails API synchronously +func (client *Client) DescribeStorageSetDetails(request *DescribeStorageSetDetailsRequest) (response *DescribeStorageSetDetailsResponse, err error) { + response = CreateDescribeStorageSetDetailsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeStorageSetDetailsWithChan invokes the ecs.DescribeStorageSetDetails API asynchronously +func (client *Client) DescribeStorageSetDetailsWithChan(request *DescribeStorageSetDetailsRequest) (<-chan *DescribeStorageSetDetailsResponse, <-chan error) { + responseChan := make(chan *DescribeStorageSetDetailsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeStorageSetDetails(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeStorageSetDetailsWithCallback invokes the ecs.DescribeStorageSetDetails API asynchronously +func (client *Client) DescribeStorageSetDetailsWithCallback(request *DescribeStorageSetDetailsRequest, callback func(response *DescribeStorageSetDetailsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeStorageSetDetailsResponse + var err error + defer close(result) + response, err = client.DescribeStorageSetDetails(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeStorageSetDetailsRequest is the request struct for api DescribeStorageSetDetails +type DescribeStorageSetDetailsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + StorageSetPartitionNumber requests.Integer `position:"Query" name:"StorageSetPartitionNumber"` + DiskIds string `position:"Query" name:"DiskIds"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + StorageSetId string `position:"Query" name:"StorageSetId"` +} + +// DescribeStorageSetDetailsResponse is the response struct for api DescribeStorageSetDetails +type DescribeStorageSetDetailsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + Disks DisksInDescribeStorageSetDetails `json:"Disks" xml:"Disks"` +} + +// CreateDescribeStorageSetDetailsRequest creates a request to invoke DescribeStorageSetDetails API +func CreateDescribeStorageSetDetailsRequest() (request *DescribeStorageSetDetailsRequest) { + request = &DescribeStorageSetDetailsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeStorageSetDetails", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeStorageSetDetailsResponse creates a response to parse from DescribeStorageSetDetails response +func CreateDescribeStorageSetDetailsResponse() (response *DescribeStorageSetDetailsResponse) { + response = &DescribeStorageSetDetailsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_sets.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_sets.go new file mode 100644 index 000000000..82bc3f18f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_storage_sets.go @@ -0,0 +1,112 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DescribeStorageSets invokes the ecs.DescribeStorageSets API synchronously +func (client *Client) DescribeStorageSets(request *DescribeStorageSetsRequest) (response *DescribeStorageSetsResponse, err error) { + response = CreateDescribeStorageSetsResponse() + err = client.DoAction(request, response) + return +} + +// DescribeStorageSetsWithChan invokes the ecs.DescribeStorageSets API asynchronously +func (client *Client) DescribeStorageSetsWithChan(request *DescribeStorageSetsRequest) (<-chan *DescribeStorageSetsResponse, <-chan error) { + responseChan := make(chan *DescribeStorageSetsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeStorageSets(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeStorageSetsWithCallback invokes the ecs.DescribeStorageSets API asynchronously +func (client *Client) DescribeStorageSetsWithCallback(request *DescribeStorageSetsRequest, callback func(response *DescribeStorageSetsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeStorageSetsResponse + var err error + defer close(result) + response, err = client.DescribeStorageSets(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeStorageSetsRequest is the request struct for api DescribeStorageSets +type DescribeStorageSetsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + StorageSetIds string `position:"Query" name:"StorageSetIds"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ZoneId string `position:"Query" name:"ZoneId"` + StorageSetName string `position:"Query" name:"StorageSetName"` +} + +// DescribeStorageSetsResponse is the response struct for api DescribeStorageSets +type DescribeStorageSetsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + StorageSets StorageSets `json:"StorageSets" xml:"StorageSets"` +} + +// CreateDescribeStorageSetsRequest creates a request to invoke DescribeStorageSets API +func CreateDescribeStorageSetsRequest() (request *DescribeStorageSetsRequest) { + request = &DescribeStorageSetsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeStorageSets", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeStorageSetsResponse creates a response to parse from DescribeStorageSets response +func CreateDescribeStorageSetsResponse() (response *DescribeStorageSetsResponse) { + response = &DescribeStorageSetsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_tags.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_tags.go index 37f553650..5dbbd5f3d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_tags.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_tags.go @@ -21,7 +21,6 @@ import ( ) // DescribeTags invokes the ecs.DescribeTags API synchronously -// api document: https://help.aliyun.com/api/ecs/describetags.html func (client *Client) DescribeTags(request *DescribeTagsRequest) (response *DescribeTagsResponse, err error) { response = CreateDescribeTagsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeTags(request *DescribeTagsRequest) (response *Desc } // DescribeTagsWithChan invokes the ecs.DescribeTags API asynchronously -// api document: https://help.aliyun.com/api/ecs/describetags.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeTagsWithChan(request *DescribeTagsRequest) (<-chan *DescribeTagsResponse, <-chan error) { responseChan := make(chan *DescribeTagsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeTagsWithChan(request *DescribeTagsRequest) (<-chan } // DescribeTagsWithCallback invokes the ecs.DescribeTags API asynchronously -// api document: https://help.aliyun.com/api/ecs/describetags.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeTagsWithCallback(request *DescribeTagsRequest, callback func(response *DescribeTagsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,14 @@ func (client *Client) DescribeTagsWithCallback(request *DescribeTagsRequest, cal type DescribeTagsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceId string `position:"Query" name:"ResourceId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` PageSize requests.Integer `position:"Query" name:"PageSize"` Tag *[]DescribeTagsTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceId string `position:"Query" name:"ResourceId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` ResourceType string `position:"Query" name:"ResourceType"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + Category string `position:"Query" name:"Category"` } // DescribeTagsTag is a repeated param struct in DescribeTagsRequest @@ -108,6 +104,7 @@ func CreateDescribeTagsRequest() (request *DescribeTagsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeTags", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_task_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_task_attribute.go index ccfbf54ad..f19f424b9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_task_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_task_attribute.go @@ -21,7 +21,6 @@ import ( ) // DescribeTaskAttribute invokes the ecs.DescribeTaskAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/describetaskattribute.html func (client *Client) DescribeTaskAttribute(request *DescribeTaskAttributeRequest) (response *DescribeTaskAttributeResponse, err error) { response = CreateDescribeTaskAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeTaskAttribute(request *DescribeTaskAttributeReques } // DescribeTaskAttributeWithChan invokes the ecs.DescribeTaskAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describetaskattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeTaskAttributeWithChan(request *DescribeTaskAttributeRequest) (<-chan *DescribeTaskAttributeResponse, <-chan error) { responseChan := make(chan *DescribeTaskAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeTaskAttributeWithChan(request *DescribeTaskAttribu } // DescribeTaskAttributeWithCallback invokes the ecs.DescribeTaskAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/describetaskattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeTaskAttributeWithCallback(request *DescribeTaskAttributeRequest, callback func(response *DescribeTaskAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,27 +72,27 @@ func (client *Client) DescribeTaskAttributeWithCallback(request *DescribeTaskAtt type DescribeTaskAttributeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + TaskId string `position:"Query" name:"TaskId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - TaskId string `position:"Query" name:"TaskId"` } // DescribeTaskAttributeResponse is the response struct for api DescribeTaskAttribute type DescribeTaskAttributeResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - TaskId string `json:"TaskId" xml:"TaskId"` - RegionId string `json:"RegionId" xml:"RegionId"` - TaskAction string `json:"TaskAction" xml:"TaskAction"` - TaskStatus string `json:"TaskStatus" xml:"TaskStatus"` - TaskProcess string `json:"TaskProcess" xml:"TaskProcess"` - SupportCancel string `json:"SupportCancel" xml:"SupportCancel"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - SuccessCount int `json:"SuccessCount" xml:"SuccessCount"` - FailedCount int `json:"FailedCount" xml:"FailedCount"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - FinishedTime string `json:"FinishedTime" xml:"FinishedTime"` - OperationProgressSet OperationProgressSet `json:"OperationProgressSet" xml:"OperationProgressSet"` + RequestId string `json:"RequestId" xml:"RequestId"` + TaskId string `json:"TaskId" xml:"TaskId"` + RegionId string `json:"RegionId" xml:"RegionId"` + TaskAction string `json:"TaskAction" xml:"TaskAction"` + TaskStatus string `json:"TaskStatus" xml:"TaskStatus"` + TaskProcess string `json:"TaskProcess" xml:"TaskProcess"` + SupportCancel string `json:"SupportCancel" xml:"SupportCancel"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + SuccessCount int `json:"SuccessCount" xml:"SuccessCount"` + FailedCount int `json:"FailedCount" xml:"FailedCount"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + FinishedTime string `json:"FinishedTime" xml:"FinishedTime"` + OperationProgressSet OperationProgressSetInDescribeTaskAttribute `json:"OperationProgressSet" xml:"OperationProgressSet"` } // CreateDescribeTaskAttributeRequest creates a request to invoke DescribeTaskAttribute API @@ -106,6 +101,7 @@ func CreateDescribeTaskAttributeRequest() (request *DescribeTaskAttributeRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeTaskAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_tasks.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_tasks.go index b59c3c517..9558f110f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_tasks.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_tasks.go @@ -21,7 +21,6 @@ import ( ) // DescribeTasks invokes the ecs.DescribeTasks API synchronously -// api document: https://help.aliyun.com/api/ecs/describetasks.html func (client *Client) DescribeTasks(request *DescribeTasksRequest) (response *DescribeTasksResponse, err error) { response = CreateDescribeTasksResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeTasks(request *DescribeTasksRequest) (response *De } // DescribeTasksWithChan invokes the ecs.DescribeTasks API asynchronously -// api document: https://help.aliyun.com/api/ecs/describetasks.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeTasksWithChan(request *DescribeTasksRequest) (<-chan *DescribeTasksResponse, <-chan error) { responseChan := make(chan *DescribeTasksResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeTasksWithChan(request *DescribeTasksRequest) (<-ch } // DescribeTasksWithCallback invokes the ecs.DescribeTasks API asynchronously -// api document: https://help.aliyun.com/api/ecs/describetasks.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeTasksWithCallback(request *DescribeTasksRequest, callback func(response *DescribeTasksResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,15 +72,15 @@ func (client *Client) DescribeTasksWithCallback(request *DescribeTasksRequest, c type DescribeTasksRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - EndTime string `position:"Query" name:"EndTime"` StartTime string `position:"Query" name:"StartTime"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` TaskIds string `position:"Query" name:"TaskIds"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` TaskStatus string `position:"Query" name:"TaskStatus"` PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + EndTime string `position:"Query" name:"EndTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` TaskAction string `position:"Query" name:"TaskAction"` } @@ -106,6 +101,7 @@ func CreateDescribeTasksRequest() (request *DescribeTasksRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeTasks", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_user_business_behavior.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_user_business_behavior.go index 0070a582d..803b48270 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_user_business_behavior.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_user_business_behavior.go @@ -21,7 +21,6 @@ import ( ) // DescribeUserBusinessBehavior invokes the ecs.DescribeUserBusinessBehavior API synchronously -// api document: https://help.aliyun.com/api/ecs/describeuserbusinessbehavior.html func (client *Client) DescribeUserBusinessBehavior(request *DescribeUserBusinessBehaviorRequest) (response *DescribeUserBusinessBehaviorResponse, err error) { response = CreateDescribeUserBusinessBehaviorResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeUserBusinessBehavior(request *DescribeUserBusiness } // DescribeUserBusinessBehaviorWithChan invokes the ecs.DescribeUserBusinessBehavior API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeuserbusinessbehavior.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeUserBusinessBehaviorWithChan(request *DescribeUserBusinessBehaviorRequest) (<-chan *DescribeUserBusinessBehaviorResponse, <-chan error) { responseChan := make(chan *DescribeUserBusinessBehaviorResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeUserBusinessBehaviorWithChan(request *DescribeUser } // DescribeUserBusinessBehaviorWithCallback invokes the ecs.DescribeUserBusinessBehavior API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeuserbusinessbehavior.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeUserBusinessBehaviorWithCallback(request *DescribeUserBusinessBehaviorRequest, callback func(response *DescribeUserBusinessBehaviorResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateDescribeUserBusinessBehaviorRequest() (request *DescribeUserBusinessB RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeUserBusinessBehavior", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_user_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_user_data.go index 63e80e148..74bb7424b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_user_data.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_user_data.go @@ -21,7 +21,6 @@ import ( ) // DescribeUserData invokes the ecs.DescribeUserData API synchronously -// api document: https://help.aliyun.com/api/ecs/describeuserdata.html func (client *Client) DescribeUserData(request *DescribeUserDataRequest) (response *DescribeUserDataResponse, err error) { response = CreateDescribeUserDataResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeUserData(request *DescribeUserDataRequest) (respon } // DescribeUserDataWithChan invokes the ecs.DescribeUserData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeuserdata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeUserDataWithChan(request *DescribeUserDataRequest) (<-chan *DescribeUserDataResponse, <-chan error) { responseChan := make(chan *DescribeUserDataResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeUserDataWithChan(request *DescribeUserDataRequest) } // DescribeUserDataWithCallback invokes the ecs.DescribeUserData API asynchronously -// api document: https://help.aliyun.com/api/ecs/describeuserdata.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeUserDataWithCallback(request *DescribeUserDataRequest, callback func(response *DescribeUserDataResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) DescribeUserDataWithCallback(request *DescribeUserDataRequ type DescribeUserDataRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // DescribeUserDataResponse is the response struct for api DescribeUserData @@ -97,6 +92,7 @@ func CreateDescribeUserDataRequest() (request *DescribeUserDataRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeUserData", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_v_routers.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_v_routers.go index 110d0f791..6f6ac9306 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_v_routers.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_v_routers.go @@ -21,7 +21,6 @@ import ( ) // DescribeVRouters invokes the ecs.DescribeVRouters API synchronously -// api document: https://help.aliyun.com/api/ecs/describevrouters.html func (client *Client) DescribeVRouters(request *DescribeVRoutersRequest) (response *DescribeVRoutersResponse, err error) { response = CreateDescribeVRoutersResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeVRouters(request *DescribeVRoutersRequest) (respon } // DescribeVRoutersWithChan invokes the ecs.DescribeVRouters API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevrouters.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVRoutersWithChan(request *DescribeVRoutersRequest) (<-chan *DescribeVRoutersResponse, <-chan error) { responseChan := make(chan *DescribeVRoutersResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeVRoutersWithChan(request *DescribeVRoutersRequest) } // DescribeVRoutersWithCallback invokes the ecs.DescribeVRouters API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevrouters.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVRoutersWithCallback(request *DescribeVRoutersRequest, callback func(response *DescribeVRoutersResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,11 +73,11 @@ type DescribeVRoutersRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` VRouterId string `position:"Query" name:"VRouterId"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` } // DescribeVRoutersResponse is the response struct for api DescribeVRouters @@ -101,6 +96,7 @@ func CreateDescribeVRoutersRequest() (request *DescribeVRoutersRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeVRouters", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_v_switches.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_v_switches.go index 26c77f2f6..13cc27a4a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_v_switches.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_v_switches.go @@ -21,7 +21,6 @@ import ( ) // DescribeVSwitches invokes the ecs.DescribeVSwitches API synchronously -// api document: https://help.aliyun.com/api/ecs/describevswitches.html func (client *Client) DescribeVSwitches(request *DescribeVSwitchesRequest) (response *DescribeVSwitchesResponse, err error) { response = CreateDescribeVSwitchesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeVSwitches(request *DescribeVSwitchesRequest) (resp } // DescribeVSwitchesWithChan invokes the ecs.DescribeVSwitches API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevswitches.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVSwitchesWithChan(request *DescribeVSwitchesRequest) (<-chan *DescribeVSwitchesResponse, <-chan error) { responseChan := make(chan *DescribeVSwitchesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeVSwitchesWithChan(request *DescribeVSwitchesReques } // DescribeVSwitchesWithCallback invokes the ecs.DescribeVSwitches API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevswitches.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVSwitchesWithCallback(request *DescribeVSwitchesRequest, callback func(response *DescribeVSwitchesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,16 +71,16 @@ func (client *Client) DescribeVSwitchesWithCallback(request *DescribeVSwitchesRe // DescribeVSwitchesRequest is the request struct for api DescribeVSwitches type DescribeVSwitchesRequest struct { *requests.RpcRequest - VSwitchId string `position:"Query" name:"VSwitchId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - VpcId string `position:"Query" name:"VpcId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - ZoneId string `position:"Query" name:"ZoneId"` - IsDefault requests.Boolean `position:"Query" name:"IsDefault"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + IsDefault requests.Boolean `position:"Query" name:"IsDefault"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` + VpcId string `position:"Query" name:"VpcId"` + ZoneId string `position:"Query" name:"ZoneId"` } // DescribeVSwitchesResponse is the response struct for api DescribeVSwitches @@ -104,6 +99,7 @@ func CreateDescribeVSwitchesRequest() (request *DescribeVSwitchesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeVSwitches", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_virtual_border_routers.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_virtual_border_routers.go index 0b03b0336..52945d70f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_virtual_border_routers.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_virtual_border_routers.go @@ -21,7 +21,6 @@ import ( ) // DescribeVirtualBorderRouters invokes the ecs.DescribeVirtualBorderRouters API synchronously -// api document: https://help.aliyun.com/api/ecs/describevirtualborderrouters.html func (client *Client) DescribeVirtualBorderRouters(request *DescribeVirtualBorderRoutersRequest) (response *DescribeVirtualBorderRoutersResponse, err error) { response = CreateDescribeVirtualBorderRoutersResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeVirtualBorderRouters(request *DescribeVirtualBorde } // DescribeVirtualBorderRoutersWithChan invokes the ecs.DescribeVirtualBorderRouters API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevirtualborderrouters.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVirtualBorderRoutersWithChan(request *DescribeVirtualBorderRoutersRequest) (<-chan *DescribeVirtualBorderRoutersResponse, <-chan error) { responseChan := make(chan *DescribeVirtualBorderRoutersResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeVirtualBorderRoutersWithChan(request *DescribeVirt } // DescribeVirtualBorderRoutersWithCallback invokes the ecs.DescribeVirtualBorderRouters API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevirtualborderrouters.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVirtualBorderRoutersWithCallback(request *DescribeVirtualBorderRoutersRequest, callback func(response *DescribeVirtualBorderRoutersResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,12 +71,12 @@ func (client *Client) DescribeVirtualBorderRoutersWithCallback(request *Describe // DescribeVirtualBorderRoutersRequest is the request struct for api DescribeVirtualBorderRouters type DescribeVirtualBorderRoutersRequest struct { *requests.RpcRequest - Filter *[]DescribeVirtualBorderRoutersFilter `position:"Query" name:"Filter" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Filter *[]DescribeVirtualBorderRoutersFilter `position:"Query" name:"Filter" type:"Repeated"` } // DescribeVirtualBorderRoutersFilter is a repeated param struct in DescribeVirtualBorderRoutersRequest @@ -106,6 +101,7 @@ func CreateDescribeVirtualBorderRoutersRequest() (request *DescribeVirtualBorder RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeVirtualBorderRouters", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_virtual_border_routers_for_physical_connection.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_virtual_border_routers_for_physical_connection.go index 2596e9f47..55ca849ee 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_virtual_border_routers_for_physical_connection.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_virtual_border_routers_for_physical_connection.go @@ -21,7 +21,6 @@ import ( ) // DescribeVirtualBorderRoutersForPhysicalConnection invokes the ecs.DescribeVirtualBorderRoutersForPhysicalConnection API synchronously -// api document: https://help.aliyun.com/api/ecs/describevirtualborderroutersforphysicalconnection.html func (client *Client) DescribeVirtualBorderRoutersForPhysicalConnection(request *DescribeVirtualBorderRoutersForPhysicalConnectionRequest) (response *DescribeVirtualBorderRoutersForPhysicalConnectionResponse, err error) { response = CreateDescribeVirtualBorderRoutersForPhysicalConnectionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeVirtualBorderRoutersForPhysicalConnection(request } // DescribeVirtualBorderRoutersForPhysicalConnectionWithChan invokes the ecs.DescribeVirtualBorderRoutersForPhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevirtualborderroutersforphysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVirtualBorderRoutersForPhysicalConnectionWithChan(request *DescribeVirtualBorderRoutersForPhysicalConnectionRequest) (<-chan *DescribeVirtualBorderRoutersForPhysicalConnectionResponse, <-chan error) { responseChan := make(chan *DescribeVirtualBorderRoutersForPhysicalConnectionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeVirtualBorderRoutersForPhysicalConnectionWithChan( } // DescribeVirtualBorderRoutersForPhysicalConnectionWithCallback invokes the ecs.DescribeVirtualBorderRoutersForPhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevirtualborderroutersforphysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVirtualBorderRoutersForPhysicalConnectionWithCallback(request *DescribeVirtualBorderRoutersForPhysicalConnectionRequest, callback func(response *DescribeVirtualBorderRoutersForPhysicalConnectionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,13 +71,13 @@ func (client *Client) DescribeVirtualBorderRoutersForPhysicalConnectionWithCallb // DescribeVirtualBorderRoutersForPhysicalConnectionRequest is the request struct for api DescribeVirtualBorderRoutersForPhysicalConnection type DescribeVirtualBorderRoutersForPhysicalConnectionRequest struct { *requests.RpcRequest - Filter *[]DescribeVirtualBorderRoutersForPhysicalConnectionFilter `position:"Query" name:"Filter" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` - PageSize requests.Integer `position:"Query" name:"PageSize"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PageNumber requests.Integer `position:"Query" name:"PageNumber"` + PageSize requests.Integer `position:"Query" name:"PageSize"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Filter *[]DescribeVirtualBorderRoutersForPhysicalConnectionFilter `position:"Query" name:"Filter" type:"Repeated"` + PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` } // DescribeVirtualBorderRoutersForPhysicalConnectionFilter is a repeated param struct in DescribeVirtualBorderRoutersForPhysicalConnectionRequest @@ -107,6 +102,7 @@ func CreateDescribeVirtualBorderRoutersForPhysicalConnectionRequest() (request * RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeVirtualBorderRoutersForPhysicalConnection", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_vpcs.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_vpcs.go index 097da600d..ce4f6e9b9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_vpcs.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_vpcs.go @@ -21,7 +21,6 @@ import ( ) // DescribeVpcs invokes the ecs.DescribeVpcs API synchronously -// api document: https://help.aliyun.com/api/ecs/describevpcs.html func (client *Client) DescribeVpcs(request *DescribeVpcsRequest) (response *DescribeVpcsResponse, err error) { response = CreateDescribeVpcsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeVpcs(request *DescribeVpcsRequest) (response *Desc } // DescribeVpcsWithChan invokes the ecs.DescribeVpcs API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevpcs.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVpcsWithChan(request *DescribeVpcsRequest) (<-chan *DescribeVpcsResponse, <-chan error) { responseChan := make(chan *DescribeVpcsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeVpcsWithChan(request *DescribeVpcsRequest) (<-chan } // DescribeVpcsWithCallback invokes the ecs.DescribeVpcs API asynchronously -// api document: https://help.aliyun.com/api/ecs/describevpcs.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeVpcsWithCallback(request *DescribeVpcsRequest, callback func(response *DescribeVpcsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,13 @@ func (client *Client) DescribeVpcsWithCallback(request *DescribeVpcsRequest, cal type DescribeVpcsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - VpcId string `position:"Query" name:"VpcId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` PageSize requests.Integer `position:"Query" name:"PageSize"` IsDefault requests.Boolean `position:"Query" name:"IsDefault"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PageNumber requests.Integer `position:"Query" name:"PageNumber"` + VpcId string `position:"Query" name:"VpcId"` } // DescribeVpcsResponse is the response struct for api DescribeVpcs @@ -102,6 +97,7 @@ func CreateDescribeVpcsRequest() (request *DescribeVpcsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeVpcs", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_zones.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_zones.go index 007fe4ccb..f073bc8f9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_zones.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/describe_zones.go @@ -21,7 +21,6 @@ import ( ) // DescribeZones invokes the ecs.DescribeZones API synchronously -// api document: https://help.aliyun.com/api/ecs/describezones.html func (client *Client) DescribeZones(request *DescribeZonesRequest) (response *DescribeZonesResponse, err error) { response = CreateDescribeZonesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DescribeZones(request *DescribeZonesRequest) (response *De } // DescribeZonesWithChan invokes the ecs.DescribeZones API asynchronously -// api document: https://help.aliyun.com/api/ecs/describezones.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeZonesWithChan(request *DescribeZonesRequest) (<-chan *DescribeZonesResponse, <-chan error) { responseChan := make(chan *DescribeZonesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DescribeZonesWithChan(request *DescribeZonesRequest) (<-ch } // DescribeZonesWithCallback invokes the ecs.DescribeZones API asynchronously -// api document: https://help.aliyun.com/api/ecs/describezones.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DescribeZonesWithCallback(request *DescribeZonesRequest, callback func(response *DescribeZonesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,14 +71,14 @@ func (client *Client) DescribeZonesWithCallback(request *DescribeZonesRequest, c // DescribeZonesRequest is the request struct for api DescribeZones type DescribeZonesRequest struct { *requests.RpcRequest - SpotStrategy string `position:"Query" name:"SpotStrategy"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - AcceptLanguage string `position:"Query" name:"AcceptLanguage"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InstanceChargeType string `position:"Query" name:"InstanceChargeType"` Verbose requests.Boolean `position:"Query" name:"Verbose"` + SpotStrategy string `position:"Query" name:"SpotStrategy"` + AcceptLanguage string `position:"Query" name:"AcceptLanguage"` } // DescribeZonesResponse is the response struct for api DescribeZones @@ -99,6 +94,7 @@ func CreateDescribeZonesRequest() (request *DescribeZonesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DescribeZones", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_classic_link_vpc.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_classic_link_vpc.go index 7b061371e..2136571f8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_classic_link_vpc.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_classic_link_vpc.go @@ -21,7 +21,6 @@ import ( ) // DetachClassicLinkVpc invokes the ecs.DetachClassicLinkVpc API synchronously -// api document: https://help.aliyun.com/api/ecs/detachclassiclinkvpc.html func (client *Client) DetachClassicLinkVpc(request *DetachClassicLinkVpcRequest) (response *DetachClassicLinkVpcResponse, err error) { response = CreateDetachClassicLinkVpcResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DetachClassicLinkVpc(request *DetachClassicLinkVpcRequest) } // DetachClassicLinkVpcWithChan invokes the ecs.DetachClassicLinkVpc API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachclassiclinkvpc.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachClassicLinkVpcWithChan(request *DetachClassicLinkVpcRequest) (<-chan *DetachClassicLinkVpcResponse, <-chan error) { responseChan := make(chan *DetachClassicLinkVpcResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DetachClassicLinkVpcWithChan(request *DetachClassicLinkVpc } // DetachClassicLinkVpcWithCallback invokes the ecs.DetachClassicLinkVpc API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachclassiclinkvpc.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachClassicLinkVpcWithCallback(request *DetachClassicLinkVpcRequest, callback func(response *DetachClassicLinkVpcResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) DetachClassicLinkVpcWithCallback(request *DetachClassicLin type DetachClassicLinkVpcRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - VpcId string `position:"Query" name:"VpcId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + VpcId string `position:"Query" name:"VpcId"` } // DetachClassicLinkVpcResponse is the response struct for api DetachClassicLinkVpc @@ -95,6 +90,7 @@ func CreateDetachClassicLinkVpcRequest() (request *DetachClassicLinkVpcRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DetachClassicLinkVpc", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_disk.go index ae3f8a766..641b92c27 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_disk.go @@ -21,7 +21,6 @@ import ( ) // DetachDisk invokes the ecs.DetachDisk API synchronously -// api document: https://help.aliyun.com/api/ecs/detachdisk.html func (client *Client) DetachDisk(request *DetachDiskRequest) (response *DetachDiskResponse, err error) { response = CreateDetachDiskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DetachDisk(request *DetachDiskRequest) (response *DetachDi } // DetachDiskWithChan invokes the ecs.DetachDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachDiskWithChan(request *DetachDiskRequest) (<-chan *DetachDiskResponse, <-chan error) { responseChan := make(chan *DetachDiskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DetachDiskWithChan(request *DetachDiskRequest) (<-chan *De } // DetachDiskWithCallback invokes the ecs.DetachDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachDiskWithCallback(request *DetachDiskRequest, callback func(response *DetachDiskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,12 @@ func (client *Client) DetachDiskWithCallback(request *DetachDiskRequest, callbac type DetachDiskRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + DiskId string `position:"Query" name:"DiskId"` + DeleteWithInstance requests.Boolean `position:"Query" name:"DeleteWithInstance"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - DiskId string `position:"Query" name:"DiskId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // DetachDiskResponse is the response struct for api DetachDisk @@ -96,6 +92,7 @@ func CreateDetachDiskRequest() (request *DetachDiskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DetachDisk", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_instance_ram_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_instance_ram_role.go index db5da1094..7deb93d80 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_instance_ram_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_instance_ram_role.go @@ -21,7 +21,6 @@ import ( ) // DetachInstanceRamRole invokes the ecs.DetachInstanceRamRole API synchronously -// api document: https://help.aliyun.com/api/ecs/detachinstanceramrole.html func (client *Client) DetachInstanceRamRole(request *DetachInstanceRamRoleRequest) (response *DetachInstanceRamRoleResponse, err error) { response = CreateDetachInstanceRamRoleResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DetachInstanceRamRole(request *DetachInstanceRamRoleReques } // DetachInstanceRamRoleWithChan invokes the ecs.DetachInstanceRamRole API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachinstanceramrole.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachInstanceRamRoleWithChan(request *DetachInstanceRamRoleRequest) (<-chan *DetachInstanceRamRoleResponse, <-chan error) { responseChan := make(chan *DetachInstanceRamRoleResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DetachInstanceRamRoleWithChan(request *DetachInstanceRamRo } // DetachInstanceRamRoleWithCallback invokes the ecs.DetachInstanceRamRole API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachinstanceramrole.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachInstanceRamRoleWithCallback(request *DetachInstanceRamRoleRequest, callback func(response *DetachInstanceRamRoleResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,9 +73,9 @@ type DetachInstanceRamRoleRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - InstanceIds string `position:"Query" name:"InstanceIds"` RamRoleName string `position:"Query" name:"RamRoleName"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceIds string `position:"Query" name:"InstanceIds"` } // DetachInstanceRamRoleResponse is the response struct for api DetachInstanceRamRole @@ -99,6 +94,7 @@ func CreateDetachInstanceRamRoleRequest() (request *DetachInstanceRamRoleRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DetachInstanceRamRole", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_key_pair.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_key_pair.go index 295a30b71..447d24969 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_key_pair.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_key_pair.go @@ -21,7 +21,6 @@ import ( ) // DetachKeyPair invokes the ecs.DetachKeyPair API synchronously -// api document: https://help.aliyun.com/api/ecs/detachkeypair.html func (client *Client) DetachKeyPair(request *DetachKeyPairRequest) (response *DetachKeyPairResponse, err error) { response = CreateDetachKeyPairResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DetachKeyPair(request *DetachKeyPairRequest) (response *De } // DetachKeyPairWithChan invokes the ecs.DetachKeyPair API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachkeypair.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachKeyPairWithChan(request *DetachKeyPairRequest) (<-chan *DetachKeyPairResponse, <-chan error) { responseChan := make(chan *DetachKeyPairResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DetachKeyPairWithChan(request *DetachKeyPairRequest) (<-ch } // DetachKeyPairWithCallback invokes the ecs.DetachKeyPair API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachkeypair.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachKeyPairWithCallback(request *DetachKeyPairRequest, callback func(response *DetachKeyPairResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) DetachKeyPairWithCallback(request *DetachKeyPairRequest, c type DetachKeyPairRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - InstanceIds string `position:"Query" name:"InstanceIds"` KeyPairName string `position:"Query" name:"KeyPairName"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceIds string `position:"Query" name:"InstanceIds"` } // DetachKeyPairResponse is the response struct for api DetachKeyPair @@ -99,6 +94,7 @@ func CreateDetachKeyPairRequest() (request *DetachKeyPairRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DetachKeyPair", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_network_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_network_interface.go index 2da30db80..7033f5f23 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_network_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/detach_network_interface.go @@ -21,7 +21,6 @@ import ( ) // DetachNetworkInterface invokes the ecs.DetachNetworkInterface API synchronously -// api document: https://help.aliyun.com/api/ecs/detachnetworkinterface.html func (client *Client) DetachNetworkInterface(request *DetachNetworkInterfaceRequest) (response *DetachNetworkInterfaceResponse, err error) { response = CreateDetachNetworkInterfaceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) DetachNetworkInterface(request *DetachNetworkInterfaceRequ } // DetachNetworkInterfaceWithChan invokes the ecs.DetachNetworkInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachnetworkinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachNetworkInterfaceWithChan(request *DetachNetworkInterfaceRequest) (<-chan *DetachNetworkInterfaceResponse, <-chan error) { responseChan := make(chan *DetachNetworkInterfaceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) DetachNetworkInterfaceWithChan(request *DetachNetworkInter } // DetachNetworkInterfaceWithCallback invokes the ecs.DetachNetworkInterface API asynchronously -// api document: https://help.aliyun.com/api/ecs/detachnetworkinterface.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) DetachNetworkInterfaceWithCallback(request *DetachNetworkInterfaceRequest, callback func(response *DetachNetworkInterfaceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,12 +71,13 @@ func (client *Client) DetachNetworkInterfaceWithCallback(request *DetachNetworkI // DetachNetworkInterfaceRequest is the request struct for api DetachNetworkInterface type DetachNetworkInterfaceRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + TrunkNetworkInstanceId string `position:"Query" name:"TrunkNetworkInstanceId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` } // DetachNetworkInterfaceResponse is the response struct for api DetachNetworkInterface @@ -96,6 +92,7 @@ func CreateDetachNetworkInterfaceRequest() (request *DetachNetworkInterfaceReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "DetachNetworkInterface", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/disable_activation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/disable_activation.go new file mode 100644 index 000000000..79148208d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/disable_activation.go @@ -0,0 +1,104 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// DisableActivation invokes the ecs.DisableActivation API synchronously +func (client *Client) DisableActivation(request *DisableActivationRequest) (response *DisableActivationResponse, err error) { + response = CreateDisableActivationResponse() + err = client.DoAction(request, response) + return +} + +// DisableActivationWithChan invokes the ecs.DisableActivation API asynchronously +func (client *Client) DisableActivationWithChan(request *DisableActivationRequest) (<-chan *DisableActivationResponse, <-chan error) { + responseChan := make(chan *DisableActivationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DisableActivation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DisableActivationWithCallback invokes the ecs.DisableActivation API asynchronously +func (client *Client) DisableActivationWithCallback(request *DisableActivationRequest, callback func(response *DisableActivationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DisableActivationResponse + var err error + defer close(result) + response, err = client.DisableActivation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DisableActivationRequest is the request struct for api DisableActivation +type DisableActivationRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ActivationId string `position:"Query" name:"ActivationId"` +} + +// DisableActivationResponse is the response struct for api DisableActivation +type DisableActivationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Activation Activation `json:"Activation" xml:"Activation"` +} + +// CreateDisableActivationRequest creates a request to invoke DisableActivation API +func CreateDisableActivationRequest() (request *DisableActivationRequest) { + request = &DisableActivationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "DisableActivation", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateDisableActivationResponse creates a response to parse from DisableActivation response +func CreateDisableActivationResponse() (response *DisableActivationResponse) { + response = &DisableActivationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_fill_params.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_fill_params.go index fe512cbec..40d6d5fd1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_fill_params.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_fill_params.go @@ -21,7 +21,6 @@ import ( ) // EipFillParams invokes the ecs.EipFillParams API synchronously -// api document: https://help.aliyun.com/api/ecs/eipfillparams.html func (client *Client) EipFillParams(request *EipFillParamsRequest) (response *EipFillParamsResponse, err error) { response = CreateEipFillParamsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) EipFillParams(request *EipFillParamsRequest) (response *Ei } // EipFillParamsWithChan invokes the ecs.EipFillParams API asynchronously -// api document: https://help.aliyun.com/api/ecs/eipfillparams.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EipFillParamsWithChan(request *EipFillParamsRequest) (<-chan *EipFillParamsResponse, <-chan error) { responseChan := make(chan *EipFillParamsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) EipFillParamsWithChan(request *EipFillParamsRequest) (<-ch } // EipFillParamsWithCallback invokes the ecs.EipFillParams API asynchronously -// api document: https://help.aliyun.com/api/ecs/eipfillparams.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EipFillParamsWithCallback(request *EipFillParamsRequest, callback func(response *EipFillParamsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,10 +73,10 @@ type EipFillParamsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` Data string `position:"Query" name:"data"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -101,6 +96,7 @@ func CreateEipFillParamsRequest() (request *EipFillParamsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "EipFillParams", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_fill_product.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_fill_product.go index 7a7fc41c0..b4bd7c6e6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_fill_product.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_fill_product.go @@ -21,7 +21,6 @@ import ( ) // EipFillProduct invokes the ecs.EipFillProduct API synchronously -// api document: https://help.aliyun.com/api/ecs/eipfillproduct.html func (client *Client) EipFillProduct(request *EipFillProductRequest) (response *EipFillProductResponse, err error) { response = CreateEipFillProductResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) EipFillProduct(request *EipFillProductRequest) (response * } // EipFillProductWithChan invokes the ecs.EipFillProduct API asynchronously -// api document: https://help.aliyun.com/api/ecs/eipfillproduct.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EipFillProductWithChan(request *EipFillProductRequest) (<-chan *EipFillProductResponse, <-chan error) { responseChan := make(chan *EipFillProductResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) EipFillProductWithChan(request *EipFillProductRequest) (<- } // EipFillProductWithCallback invokes the ecs.EipFillProduct API asynchronously -// api document: https://help.aliyun.com/api/ecs/eipfillproduct.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EipFillProductWithCallback(request *EipFillProductRequest, callback func(response *EipFillProductResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,10 +73,10 @@ type EipFillProductRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` Data string `position:"Query" name:"data"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -101,6 +96,7 @@ func CreateEipFillProductRequest() (request *EipFillProductRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "EipFillProduct", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_notify_paid.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_notify_paid.go index 5b75dc880..26c60067e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_notify_paid.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/eip_notify_paid.go @@ -21,7 +21,6 @@ import ( ) // EipNotifyPaid invokes the ecs.EipNotifyPaid API synchronously -// api document: https://help.aliyun.com/api/ecs/eipnotifypaid.html func (client *Client) EipNotifyPaid(request *EipNotifyPaidRequest) (response *EipNotifyPaidResponse, err error) { response = CreateEipNotifyPaidResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) EipNotifyPaid(request *EipNotifyPaidRequest) (response *Ei } // EipNotifyPaidWithChan invokes the ecs.EipNotifyPaid API asynchronously -// api document: https://help.aliyun.com/api/ecs/eipnotifypaid.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EipNotifyPaidWithChan(request *EipNotifyPaidRequest) (<-chan *EipNotifyPaidResponse, <-chan error) { responseChan := make(chan *EipNotifyPaidResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) EipNotifyPaidWithChan(request *EipNotifyPaidRequest) (<-ch } // EipNotifyPaidWithCallback invokes the ecs.EipNotifyPaid API asynchronously -// api document: https://help.aliyun.com/api/ecs/eipnotifypaid.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EipNotifyPaidWithCallback(request *EipNotifyPaidRequest, callback func(response *EipNotifyPaidResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,10 +73,10 @@ type EipNotifyPaidRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` Data string `position:"Query" name:"data"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -101,6 +96,7 @@ func CreateEipNotifyPaidRequest() (request *EipNotifyPaidRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "EipNotifyPaid", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/enable_physical_connection.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/enable_physical_connection.go index 0862f1cfe..3ae7ee5ca 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/enable_physical_connection.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/enable_physical_connection.go @@ -21,7 +21,6 @@ import ( ) // EnablePhysicalConnection invokes the ecs.EnablePhysicalConnection API synchronously -// api document: https://help.aliyun.com/api/ecs/enablephysicalconnection.html func (client *Client) EnablePhysicalConnection(request *EnablePhysicalConnectionRequest) (response *EnablePhysicalConnectionResponse, err error) { response = CreateEnablePhysicalConnectionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) EnablePhysicalConnection(request *EnablePhysicalConnection } // EnablePhysicalConnectionWithChan invokes the ecs.EnablePhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/enablephysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EnablePhysicalConnectionWithChan(request *EnablePhysicalConnectionRequest) (<-chan *EnablePhysicalConnectionResponse, <-chan error) { responseChan := make(chan *EnablePhysicalConnectionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) EnablePhysicalConnectionWithChan(request *EnablePhysicalCo } // EnablePhysicalConnectionWithCallback invokes the ecs.EnablePhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/enablephysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) EnablePhysicalConnectionWithCallback(request *EnablePhysicalConnectionRequest, callback func(response *EnablePhysicalConnectionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) EnablePhysicalConnectionWithCallback(request *EnablePhysic type EnablePhysicalConnectionRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` } // EnablePhysicalConnectionResponse is the response struct for api EnablePhysicalConnection @@ -97,6 +92,7 @@ func CreateEnablePhysicalConnectionRequest() (request *EnablePhysicalConnectionR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "EnablePhysicalConnection", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/endpoint.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/endpoint.go new file mode 100644 index 000000000..b3eafc22b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/endpoint.go @@ -0,0 +1,63 @@ +package ecs + +// EndpointMap Endpoint Data +var EndpointMap map[string]string + +// EndpointType regional or central +var EndpointType = "regional" + +// GetEndpointMap Get Endpoint Data Map +func GetEndpointMap() map[string]string { + if EndpointMap == nil { + EndpointMap = map[string]string{ + "cn-shanghai-internal-test-1": "ecs-cn-hangzhou.aliyuncs.com", + "cn-beijing-gov-1": "ecs.aliyuncs.com", + "cn-shenzhen-su18-b01": "ecs-cn-hangzhou.aliyuncs.com", + "cn-beijing": "ecs-cn-hangzhou.aliyuncs.com", + "cn-shanghai-inner": "ecs.aliyuncs.com", + "cn-shenzhen-st4-d01": "ecs-cn-hangzhou.aliyuncs.com", + "cn-haidian-cm12-c01": "ecs-cn-hangzhou.aliyuncs.com", + "cn-hangzhou-internal-prod-1": "ecs-cn-hangzhou.aliyuncs.com", + "cn-north-2-gov-1": "ecs.aliyuncs.com", + "cn-yushanfang": "ecs.aliyuncs.com", + "cn-qingdao": "ecs-cn-hangzhou.aliyuncs.com", + "cn-hongkong-finance-pop": "ecs.aliyuncs.com", + "cn-shanghai": "ecs-cn-hangzhou.aliyuncs.com", + "cn-shanghai-finance-1": "ecs-cn-hangzhou.aliyuncs.com", + "cn-hongkong": "ecs-cn-hangzhou.aliyuncs.com", + "cn-beijing-finance-pop": "ecs.aliyuncs.com", + "cn-wuhan": "ecs.aliyuncs.com", + "us-west-1": "ecs-cn-hangzhou.aliyuncs.com", + "cn-shenzhen": "ecs-cn-hangzhou.aliyuncs.com", + "cn-zhengzhou-nebula-1": "ecs.cn-qingdao-nebula.aliyuncs.com", + "rus-west-1-pop": "ecs.ap-northeast-1.aliyuncs.com", + "cn-shanghai-et15-b01": "ecs-cn-hangzhou.aliyuncs.com", + "cn-hangzhou-bj-b01": "ecs-cn-hangzhou.aliyuncs.com", + "cn-hangzhou-internal-test-1": "ecs-cn-hangzhou.aliyuncs.com", + "eu-west-1-oxs": "ecs.cn-shenzhen-cloudstone.aliyuncs.com", + "cn-zhangbei-na61-b01": "ecs-cn-hangzhou.aliyuncs.com", + "cn-beijing-finance-1": "ecs.aliyuncs.com", + "cn-hangzhou-internal-test-3": "ecs-cn-hangzhou.aliyuncs.com", + "cn-shenzhen-finance-1": "ecs-cn-hangzhou.aliyuncs.com", + "cn-hangzhou-internal-test-2": "ecs-cn-hangzhou.aliyuncs.com", + "cn-hangzhou-test-306": "ecs-cn-hangzhou.aliyuncs.com", + "cn-shanghai-et2-b01": "ecs-cn-hangzhou.aliyuncs.com", + "cn-hangzhou-finance": "ecs.aliyuncs.com", + "ap-southeast-1": "ecs-cn-hangzhou.aliyuncs.com", + "cn-beijing-nu16-b01": "ecs-cn-hangzhou.aliyuncs.com", + "cn-edge-1": "ecs.cn-qingdao-nebula.aliyuncs.com", + "us-east-1": "ecs-cn-hangzhou.aliyuncs.com", + "cn-fujian": "ecs-cn-hangzhou.aliyuncs.com", + "ap-northeast-2-pop": "ecs.ap-northeast-1.aliyuncs.com", + "cn-shenzhen-inner": "ecs.aliyuncs.com", + "cn-zhangjiakou-na62-a01": "ecs.cn-zhangjiakou.aliyuncs.com", + "cn-hangzhou": "ecs-cn-hangzhou.aliyuncs.com", + } + } + return EndpointMap +} + +// GetEndpointType Get Endpoint Type Value +func GetEndpointType() string { + return EndpointType +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/export_image.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/export_image.go index eaf54319a..6ccc6f876 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/export_image.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/export_image.go @@ -21,7 +21,6 @@ import ( ) // ExportImage invokes the ecs.ExportImage API synchronously -// api document: https://help.aliyun.com/api/ecs/exportimage.html func (client *Client) ExportImage(request *ExportImageRequest) (response *ExportImageResponse, err error) { response = CreateExportImageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ExportImage(request *ExportImageRequest) (response *Export } // ExportImageWithChan invokes the ecs.ExportImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/exportimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ExportImageWithChan(request *ExportImageRequest) (<-chan *ExportImageResponse, <-chan error) { responseChan := make(chan *ExportImageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ExportImageWithChan(request *ExportImageRequest) (<-chan * } // ExportImageWithCallback invokes the ecs.ExportImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/exportimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ExportImageWithCallback(request *ExportImageRequest, callback func(response *ExportImageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,12 +73,12 @@ type ExportImageRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ImageId string `position:"Query" name:"ImageId"` + ImageFormat string `position:"Query" name:"ImageFormat"` OSSBucket string `position:"Query" name:"OSSBucket"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OSSPrefix string `position:"Query" name:"OSSPrefix"` RoleName string `position:"Query" name:"RoleName"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ImageFormat string `position:"Query" name:"ImageFormat"` + OSSPrefix string `position:"Query" name:"OSSPrefix"` } // ExportImageResponse is the response struct for api ExportImage @@ -100,6 +95,7 @@ func CreateExportImageRequest() (request *ExportImageRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ExportImage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/export_snapshot.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/export_snapshot.go index 750974795..ae7421414 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/export_snapshot.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/export_snapshot.go @@ -21,7 +21,6 @@ import ( ) // ExportSnapshot invokes the ecs.ExportSnapshot API synchronously -// api document: https://help.aliyun.com/api/ecs/exportsnapshot.html func (client *Client) ExportSnapshot(request *ExportSnapshotRequest) (response *ExportSnapshotResponse, err error) { response = CreateExportSnapshotResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ExportSnapshot(request *ExportSnapshotRequest) (response * } // ExportSnapshotWithChan invokes the ecs.ExportSnapshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/exportsnapshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ExportSnapshotWithChan(request *ExportSnapshotRequest) (<-chan *ExportSnapshotResponse, <-chan error) { responseChan := make(chan *ExportSnapshotResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ExportSnapshotWithChan(request *ExportSnapshotRequest) (<- } // ExportSnapshotWithCallback invokes the ecs.ExportSnapshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/exportsnapshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ExportSnapshotWithCallback(request *ExportSnapshotRequest, callback func(response *ExportSnapshotResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -97,6 +92,7 @@ func CreateExportSnapshotRequest() (request *ExportSnapshotRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ExportSnapshot", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/get_instance_console_output.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/get_instance_console_output.go index 2e2891f04..583a2ed21 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/get_instance_console_output.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/get_instance_console_output.go @@ -21,7 +21,6 @@ import ( ) // GetInstanceConsoleOutput invokes the ecs.GetInstanceConsoleOutput API synchronously -// api document: https://help.aliyun.com/api/ecs/getinstanceconsoleoutput.html func (client *Client) GetInstanceConsoleOutput(request *GetInstanceConsoleOutputRequest) (response *GetInstanceConsoleOutputResponse, err error) { response = CreateGetInstanceConsoleOutputResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) GetInstanceConsoleOutput(request *GetInstanceConsoleOutput } // GetInstanceConsoleOutputWithChan invokes the ecs.GetInstanceConsoleOutput API asynchronously -// api document: https://help.aliyun.com/api/ecs/getinstanceconsoleoutput.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) GetInstanceConsoleOutputWithChan(request *GetInstanceConsoleOutputRequest) (<-chan *GetInstanceConsoleOutputResponse, <-chan error) { responseChan := make(chan *GetInstanceConsoleOutputResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) GetInstanceConsoleOutputWithChan(request *GetInstanceConso } // GetInstanceConsoleOutputWithCallback invokes the ecs.GetInstanceConsoleOutput API asynchronously -// api document: https://help.aliyun.com/api/ecs/getinstanceconsoleoutput.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) GetInstanceConsoleOutputWithCallback(request *GetInstanceConsoleOutputRequest, callback func(response *GetInstanceConsoleOutputResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,6 +72,7 @@ func (client *Client) GetInstanceConsoleOutputWithCallback(request *GetInstanceC type GetInstanceConsoleOutputRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + RemoveSymbols requests.Boolean `position:"Query" name:"RemoveSymbols"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` @@ -98,6 +94,7 @@ func CreateGetInstanceConsoleOutputRequest() (request *GetInstanceConsoleOutputR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "GetInstanceConsoleOutput", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/get_instance_screenshot.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/get_instance_screenshot.go index 13d86459a..57a01e5ca 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/get_instance_screenshot.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/get_instance_screenshot.go @@ -21,7 +21,6 @@ import ( ) // GetInstanceScreenshot invokes the ecs.GetInstanceScreenshot API synchronously -// api document: https://help.aliyun.com/api/ecs/getinstancescreenshot.html func (client *Client) GetInstanceScreenshot(request *GetInstanceScreenshotRequest) (response *GetInstanceScreenshotResponse, err error) { response = CreateGetInstanceScreenshotResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) GetInstanceScreenshot(request *GetInstanceScreenshotReques } // GetInstanceScreenshotWithChan invokes the ecs.GetInstanceScreenshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/getinstancescreenshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) GetInstanceScreenshotWithChan(request *GetInstanceScreenshotRequest) (<-chan *GetInstanceScreenshotResponse, <-chan error) { responseChan := make(chan *GetInstanceScreenshotResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) GetInstanceScreenshotWithChan(request *GetInstanceScreensh } // GetInstanceScreenshotWithCallback invokes the ecs.GetInstanceScreenshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/getinstancescreenshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) GetInstanceScreenshotWithCallback(request *GetInstanceScreenshotRequest, callback func(response *GetInstanceScreenshotResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -98,6 +93,7 @@ func CreateGetInstanceScreenshotRequest() (request *GetInstanceScreenshotRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "GetInstanceScreenshot", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_image.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_image.go index d0c5b0be3..cc17c5c14 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_image.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_image.go @@ -21,7 +21,6 @@ import ( ) // ImportImage invokes the ecs.ImportImage API synchronously -// api document: https://help.aliyun.com/api/ecs/importimage.html func (client *Client) ImportImage(request *ImportImageRequest) (response *ImportImageResponse, err error) { response = CreateImportImageResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ImportImage(request *ImportImageRequest) (response *Import } // ImportImageWithChan invokes the ecs.ImportImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/importimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ImportImageWithChan(request *ImportImageRequest) (<-chan *ImportImageResponse, <-chan error) { responseChan := make(chan *ImportImageResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ImportImageWithChan(request *ImportImageRequest) (<-chan * } // ImportImageWithCallback invokes the ecs.ImportImage API asynchronously -// api document: https://help.aliyun.com/api/ecs/importimage.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ImportImageWithCallback(request *ImportImageRequest, callback func(response *ImportImageResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,14 +73,18 @@ type ImportImageRequest struct { *requests.RpcRequest DiskDeviceMapping *[]ImportImageDiskDeviceMapping `position:"Query" name:"DiskDeviceMapping" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + Platform string `position:"Query" name:"Platform"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + BootMode string `position:"Query" name:"BootMode"` + ImageName string `position:"Query" name:"ImageName"` + Tag *[]ImportImageTag `position:"Query" name:"Tag" type:"Repeated"` + Architecture string `position:"Query" name:"Architecture"` + LicenseType string `position:"Query" name:"LicenseType"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` RoleName string `position:"Query" name:"RoleName"` - Description string `position:"Query" name:"Description"` OSType string `position:"Query" name:"OSType"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - Platform string `position:"Query" name:"Platform"` - ImageName string `position:"Query" name:"ImageName"` - Architecture string `position:"Query" name:"Architecture"` } // ImportImageDiskDeviceMapping is a repeated param struct in ImportImageRequest @@ -98,6 +97,12 @@ type ImportImageDiskDeviceMapping struct { DiskImageSize string `name:"DiskImageSize"` } +// ImportImageTag is a repeated param struct in ImportImageRequest +type ImportImageTag struct { + Value string `name:"Value"` + Key string `name:"Key"` +} + // ImportImageResponse is the response struct for api ImportImage type ImportImageResponse struct { *responses.BaseResponse @@ -113,6 +118,7 @@ func CreateImportImageRequest() (request *ImportImageRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ImportImage", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_key_pair.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_key_pair.go index 30ba16ec9..a3d33ba12 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_key_pair.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_key_pair.go @@ -21,7 +21,6 @@ import ( ) // ImportKeyPair invokes the ecs.ImportKeyPair API synchronously -// api document: https://help.aliyun.com/api/ecs/importkeypair.html func (client *Client) ImportKeyPair(request *ImportKeyPairRequest) (response *ImportKeyPairResponse, err error) { response = CreateImportKeyPairResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ImportKeyPair(request *ImportKeyPairRequest) (response *Im } // ImportKeyPairWithChan invokes the ecs.ImportKeyPair API asynchronously -// api document: https://help.aliyun.com/api/ecs/importkeypair.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ImportKeyPairWithChan(request *ImportKeyPairRequest) (<-chan *ImportKeyPairResponse, <-chan error) { responseChan := make(chan *ImportKeyPairResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ImportKeyPairWithChan(request *ImportKeyPairRequest) (<-ch } // ImportKeyPairWithCallback invokes the ecs.ImportKeyPair API asynchronously -// api document: https://help.aliyun.com/api/ecs/importkeypair.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ImportKeyPairWithCallback(request *ImportKeyPairRequest, callback func(response *ImportKeyPairResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,11 +71,19 @@ func (client *Client) ImportKeyPairWithCallback(request *ImportKeyPairRequest, c // ImportKeyPairRequest is the request struct for api ImportKeyPair type ImportKeyPairRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - PublicKeyBody string `position:"Query" name:"PublicKeyBody"` - KeyPairName string `position:"Query" name:"KeyPairName"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + KeyPairName string `position:"Query" name:"KeyPairName"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + Tag *[]ImportKeyPairTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PublicKeyBody string `position:"Query" name:"PublicKeyBody"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// ImportKeyPairTag is a repeated param struct in ImportKeyPairRequest +type ImportKeyPairTag struct { + Value string `name:"Value"` + Key string `name:"Key"` } // ImportKeyPairResponse is the response struct for api ImportKeyPair @@ -97,6 +100,7 @@ func CreateImportKeyPairRequest() (request *ImportKeyPairRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ImportKeyPair", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_snapshot.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_snapshot.go index d61a119a1..da8a01648 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_snapshot.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/import_snapshot.go @@ -21,7 +21,6 @@ import ( ) // ImportSnapshot invokes the ecs.ImportSnapshot API synchronously -// api document: https://help.aliyun.com/api/ecs/importsnapshot.html func (client *Client) ImportSnapshot(request *ImportSnapshotRequest) (response *ImportSnapshotResponse, err error) { response = CreateImportSnapshotResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ImportSnapshot(request *ImportSnapshotRequest) (response * } // ImportSnapshotWithChan invokes the ecs.ImportSnapshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/importsnapshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ImportSnapshotWithChan(request *ImportSnapshotRequest) (<-chan *ImportSnapshotResponse, <-chan error) { responseChan := make(chan *ImportSnapshotResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ImportSnapshotWithChan(request *ImportSnapshotRequest) (<- } // ImportSnapshotWithCallback invokes the ecs.ImportSnapshot API asynchronously -// api document: https://help.aliyun.com/api/ecs/importsnapshot.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ImportSnapshotWithCallback(request *ImportSnapshotRequest, callback func(response *ImportSnapshotResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -99,6 +94,7 @@ func CreateImportSnapshotRequest() (request *ImportSnapshotRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ImportSnapshot", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/install_cloud_assistant.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/install_cloud_assistant.go index 89c4b9b93..a76301d8b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/install_cloud_assistant.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/install_cloud_assistant.go @@ -21,7 +21,6 @@ import ( ) // InstallCloudAssistant invokes the ecs.InstallCloudAssistant API synchronously -// api document: https://help.aliyun.com/api/ecs/installcloudassistant.html func (client *Client) InstallCloudAssistant(request *InstallCloudAssistantRequest) (response *InstallCloudAssistantResponse, err error) { response = CreateInstallCloudAssistantResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) InstallCloudAssistant(request *InstallCloudAssistantReques } // InstallCloudAssistantWithChan invokes the ecs.InstallCloudAssistant API asynchronously -// api document: https://help.aliyun.com/api/ecs/installcloudassistant.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) InstallCloudAssistantWithChan(request *InstallCloudAssistantRequest) (<-chan *InstallCloudAssistantResponse, <-chan error) { responseChan := make(chan *InstallCloudAssistantResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) InstallCloudAssistantWithChan(request *InstallCloudAssista } // InstallCloudAssistantWithCallback invokes the ecs.InstallCloudAssistant API asynchronously -// api document: https://help.aliyun.com/api/ecs/installcloudassistant.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) InstallCloudAssistantWithCallback(request *InstallCloudAssistantRequest, callback func(response *InstallCloudAssistantResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateInstallCloudAssistantRequest() (request *InstallCloudAssistantRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "InstallCloudAssistant", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/invoke_command.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/invoke_command.go index 0bb43c8ad..cf2bb2cd9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/invoke_command.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/invoke_command.go @@ -21,7 +21,6 @@ import ( ) // InvokeCommand invokes the ecs.InvokeCommand API synchronously -// api document: https://help.aliyun.com/api/ecs/invokecommand.html func (client *Client) InvokeCommand(request *InvokeCommandRequest) (response *InvokeCommandResponse, err error) { response = CreateInvokeCommandResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) InvokeCommand(request *InvokeCommandRequest) (response *In } // InvokeCommandWithChan invokes the ecs.InvokeCommand API asynchronously -// api document: https://help.aliyun.com/api/ecs/invokecommand.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) InvokeCommandWithChan(request *InvokeCommandRequest) (<-chan *InvokeCommandResponse, <-chan error) { responseChan := make(chan *InvokeCommandResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) InvokeCommandWithChan(request *InvokeCommandRequest) (<-ch } // InvokeCommandWithCallback invokes the ecs.InvokeCommand API asynchronously -// api document: https://help.aliyun.com/api/ecs/invokecommand.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) InvokeCommandWithCallback(request *InvokeCommandRequest, callback func(response *InvokeCommandResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,14 +71,17 @@ func (client *Client) InvokeCommandWithCallback(request *InvokeCommandRequest, c // InvokeCommandRequest is the request struct for api InvokeCommand type InvokeCommandRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - CommandId string `position:"Query" name:"CommandId"` - Frequency string `position:"Query" name:"Frequency"` - Timed requests.Boolean `position:"Query" name:"Timed"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + CommandId string `position:"Query" name:"CommandId"` + Frequency string `position:"Query" name:"Frequency"` + WindowsPasswordName string `position:"Query" name:"WindowsPasswordName"` + Timed requests.Boolean `position:"Query" name:"Timed"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + Parameters map[string]interface{} `position:"Query" name:"Parameters"` + Username string `position:"Query" name:"Username"` } // InvokeCommandResponse is the response struct for api InvokeCommand @@ -99,6 +97,7 @@ func CreateInvokeCommandRequest() (request *InvokeCommandRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "InvokeCommand", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/join_resource_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/join_resource_group.go index 9f3f7d25d..3bbefc654 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/join_resource_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/join_resource_group.go @@ -21,7 +21,6 @@ import ( ) // JoinResourceGroup invokes the ecs.JoinResourceGroup API synchronously -// api document: https://help.aliyun.com/api/ecs/joinresourcegroup.html func (client *Client) JoinResourceGroup(request *JoinResourceGroupRequest) (response *JoinResourceGroupResponse, err error) { response = CreateJoinResourceGroupResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) JoinResourceGroup(request *JoinResourceGroupRequest) (resp } // JoinResourceGroupWithChan invokes the ecs.JoinResourceGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/joinresourcegroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) JoinResourceGroupWithChan(request *JoinResourceGroupRequest) (<-chan *JoinResourceGroupResponse, <-chan error) { responseChan := make(chan *JoinResourceGroupResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) JoinResourceGroupWithChan(request *JoinResourceGroupReques } // JoinResourceGroupWithCallback invokes the ecs.JoinResourceGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/joinresourcegroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) JoinResourceGroupWithCallback(request *JoinResourceGroupRequest, callback func(response *JoinResourceGroupResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,8 +71,8 @@ func (client *Client) JoinResourceGroupWithCallback(request *JoinResourceGroupRe // JoinResourceGroupRequest is the request struct for api JoinResourceGroup type JoinResourceGroupRequest struct { *requests.RpcRequest - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` ResourceId string `position:"Query" name:"ResourceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` @@ -97,6 +92,7 @@ func CreateJoinResourceGroupRequest() (request *JoinResourceGroupRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "JoinResourceGroup", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/join_security_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/join_security_group.go index fa6a2f8d3..a2e9ba42e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/join_security_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/join_security_group.go @@ -21,7 +21,6 @@ import ( ) // JoinSecurityGroup invokes the ecs.JoinSecurityGroup API synchronously -// api document: https://help.aliyun.com/api/ecs/joinsecuritygroup.html func (client *Client) JoinSecurityGroup(request *JoinSecurityGroupRequest) (response *JoinSecurityGroupResponse, err error) { response = CreateJoinSecurityGroupResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) JoinSecurityGroup(request *JoinSecurityGroupRequest) (resp } // JoinSecurityGroupWithChan invokes the ecs.JoinSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/joinsecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) JoinSecurityGroupWithChan(request *JoinSecurityGroupRequest) (<-chan *JoinSecurityGroupResponse, <-chan error) { responseChan := make(chan *JoinSecurityGroupResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) JoinSecurityGroupWithChan(request *JoinSecurityGroupReques } // JoinSecurityGroupWithCallback invokes the ecs.JoinSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/joinsecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) JoinSecurityGroupWithCallback(request *JoinSecurityGroupRequest, callback func(response *JoinSecurityGroupResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,12 @@ func (client *Client) JoinSecurityGroupWithCallback(request *JoinSecurityGroupRe type JoinSecurityGroupRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` } // JoinSecurityGroupResponse is the response struct for api JoinSecurityGroup @@ -96,6 +92,7 @@ func CreateJoinSecurityGroupRequest() (request *JoinSecurityGroupRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "JoinSecurityGroup", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/leave_security_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/leave_security_group.go index 279d0fdda..9b6b448a9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/leave_security_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/leave_security_group.go @@ -21,7 +21,6 @@ import ( ) // LeaveSecurityGroup invokes the ecs.LeaveSecurityGroup API synchronously -// api document: https://help.aliyun.com/api/ecs/leavesecuritygroup.html func (client *Client) LeaveSecurityGroup(request *LeaveSecurityGroupRequest) (response *LeaveSecurityGroupResponse, err error) { response = CreateLeaveSecurityGroupResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) LeaveSecurityGroup(request *LeaveSecurityGroupRequest) (re } // LeaveSecurityGroupWithChan invokes the ecs.LeaveSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/leavesecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) LeaveSecurityGroupWithChan(request *LeaveSecurityGroupRequest) (<-chan *LeaveSecurityGroupResponse, <-chan error) { responseChan := make(chan *LeaveSecurityGroupResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) LeaveSecurityGroupWithChan(request *LeaveSecurityGroupRequ } // LeaveSecurityGroupWithCallback invokes the ecs.LeaveSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/leavesecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) LeaveSecurityGroupWithCallback(request *LeaveSecurityGroupRequest, callback func(response *LeaveSecurityGroupResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,12 @@ func (client *Client) LeaveSecurityGroupWithCallback(request *LeaveSecurityGroup type LeaveSecurityGroupRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + NetworkInterfaceId string `position:"Query" name:"NetworkInterfaceId"` } // LeaveSecurityGroupResponse is the response struct for api LeaveSecurityGroup @@ -96,6 +92,7 @@ func CreateLeaveSecurityGroupRequest() (request *LeaveSecurityGroupRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "LeaveSecurityGroup", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/list_tag_resources.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/list_tag_resources.go index 8b0dd342c..ac1f5c2cf 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/list_tag_resources.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/list_tag_resources.go @@ -21,7 +21,6 @@ import ( ) // ListTagResources invokes the ecs.ListTagResources API synchronously -// api document: https://help.aliyun.com/api/ecs/listtagresources.html func (client *Client) ListTagResources(request *ListTagResourcesRequest) (response *ListTagResourcesResponse, err error) { response = CreateListTagResourcesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ListTagResources(request *ListTagResourcesRequest) (respon } // ListTagResourcesWithChan invokes the ecs.ListTagResources API asynchronously -// api document: https://help.aliyun.com/api/ecs/listtagresources.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ListTagResourcesWithChan(request *ListTagResourcesRequest) (<-chan *ListTagResourcesResponse, <-chan error) { responseChan := make(chan *ListTagResourcesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ListTagResourcesWithChan(request *ListTagResourcesRequest) } // ListTagResourcesWithCallback invokes the ecs.ListTagResources API asynchronously -// api document: https://help.aliyun.com/api/ecs/listtagresources.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ListTagResourcesWithCallback(request *ListTagResourcesRequest, callback func(response *ListTagResourcesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,14 +71,15 @@ func (client *Client) ListTagResourcesWithCallback(request *ListTagResourcesRequ // ListTagResourcesRequest is the request struct for api ListTagResources type ListTagResourcesRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - NextToken string `position:"Query" name:"NextToken"` - Tag *[]ListTagResourcesTag `position:"Query" name:"Tag" type:"Repeated"` - ResourceId *[]string `position:"Query" name:"ResourceId" type:"Repeated"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ResourceType string `position:"Query" name:"ResourceType"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + NextToken string `position:"Query" name:"NextToken"` + Tag *[]ListTagResourcesTag `position:"Query" name:"Tag" type:"Repeated"` + ResourceId *[]string `position:"Query" name:"ResourceId" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + TagFilter *[]ListTagResourcesTagFilter `position:"Query" name:"TagFilter" type:"Repeated"` + ResourceType string `position:"Query" name:"ResourceType"` } // ListTagResourcesTag is a repeated param struct in ListTagResourcesRequest @@ -92,6 +88,12 @@ type ListTagResourcesTag struct { Value string `name:"Value"` } +// ListTagResourcesTagFilter is a repeated param struct in ListTagResourcesRequest +type ListTagResourcesTagFilter struct { + TagKey string `name:"TagKey"` + TagValues *[]string `name:"TagValues" type:"Repeated"` +} + // ListTagResourcesResponse is the response struct for api ListTagResources type ListTagResourcesResponse struct { *responses.BaseResponse @@ -106,6 +108,7 @@ func CreateListTagResourcesRequest() (request *ListTagResourcesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ListTagResources", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_provisioning_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_provisioning_group.go new file mode 100644 index 000000000..30626d2f8 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_provisioning_group.go @@ -0,0 +1,121 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyAutoProvisioningGroup invokes the ecs.ModifyAutoProvisioningGroup API synchronously +func (client *Client) ModifyAutoProvisioningGroup(request *ModifyAutoProvisioningGroupRequest) (response *ModifyAutoProvisioningGroupResponse, err error) { + response = CreateModifyAutoProvisioningGroupResponse() + err = client.DoAction(request, response) + return +} + +// ModifyAutoProvisioningGroupWithChan invokes the ecs.ModifyAutoProvisioningGroup API asynchronously +func (client *Client) ModifyAutoProvisioningGroupWithChan(request *ModifyAutoProvisioningGroupRequest) (<-chan *ModifyAutoProvisioningGroupResponse, <-chan error) { + responseChan := make(chan *ModifyAutoProvisioningGroupResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyAutoProvisioningGroup(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyAutoProvisioningGroupWithCallback invokes the ecs.ModifyAutoProvisioningGroup API asynchronously +func (client *Client) ModifyAutoProvisioningGroupWithCallback(request *ModifyAutoProvisioningGroupRequest, callback func(response *ModifyAutoProvisioningGroupResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyAutoProvisioningGroupResponse + var err error + defer close(result) + response, err = client.ModifyAutoProvisioningGroup(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyAutoProvisioningGroupRequest is the request struct for api ModifyAutoProvisioningGroup +type ModifyAutoProvisioningGroupRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + TerminateInstancesWithExpiration requests.Boolean `position:"Query" name:"TerminateInstancesWithExpiration"` + DefaultTargetCapacityType string `position:"Query" name:"DefaultTargetCapacityType"` + ExcessCapacityTerminationPolicy string `position:"Query" name:"ExcessCapacityTerminationPolicy"` + LaunchTemplateConfig *[]ModifyAutoProvisioningGroupLaunchTemplateConfig `position:"Query" name:"LaunchTemplateConfig" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AutoProvisioningGroupId string `position:"Query" name:"AutoProvisioningGroupId"` + PayAsYouGoTargetCapacity string `position:"Query" name:"PayAsYouGoTargetCapacity"` + TotalTargetCapacity string `position:"Query" name:"TotalTargetCapacity"` + SpotTargetCapacity string `position:"Query" name:"SpotTargetCapacity"` + MaxSpotPrice requests.Float `position:"Query" name:"MaxSpotPrice"` + AutoProvisioningGroupName string `position:"Query" name:"AutoProvisioningGroupName"` +} + +// ModifyAutoProvisioningGroupLaunchTemplateConfig is a repeated param struct in ModifyAutoProvisioningGroupRequest +type ModifyAutoProvisioningGroupLaunchTemplateConfig struct { + InstanceType string `name:"InstanceType"` + MaxPrice string `name:"MaxPrice"` + VSwitchId string `name:"VSwitchId"` + WeightedCapacity string `name:"WeightedCapacity"` + Priority string `name:"Priority"` +} + +// ModifyAutoProvisioningGroupResponse is the response struct for api ModifyAutoProvisioningGroup +type ModifyAutoProvisioningGroupResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyAutoProvisioningGroupRequest creates a request to invoke ModifyAutoProvisioningGroup API +func CreateModifyAutoProvisioningGroupRequest() (request *ModifyAutoProvisioningGroupRequest) { + request = &ModifyAutoProvisioningGroupRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyAutoProvisioningGroup", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyAutoProvisioningGroupResponse creates a response to parse from ModifyAutoProvisioningGroup response +func CreateModifyAutoProvisioningGroupResponse() (response *ModifyAutoProvisioningGroupResponse) { + response = &ModifyAutoProvisioningGroupResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_snapshot_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_snapshot_policy.go index 91eeb1bde..0c3426d0e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_snapshot_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_snapshot_policy.go @@ -21,7 +21,6 @@ import ( ) // ModifyAutoSnapshotPolicy invokes the ecs.ModifyAutoSnapshotPolicy API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyautosnapshotpolicy.html func (client *Client) ModifyAutoSnapshotPolicy(request *ModifyAutoSnapshotPolicyRequest) (response *ModifyAutoSnapshotPolicyResponse, err error) { response = CreateModifyAutoSnapshotPolicyResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyAutoSnapshotPolicy(request *ModifyAutoSnapshotPolicy } // ModifyAutoSnapshotPolicyWithChan invokes the ecs.ModifyAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyAutoSnapshotPolicyWithChan(request *ModifyAutoSnapshotPolicyRequest) (<-chan *ModifyAutoSnapshotPolicyResponse, <-chan error) { responseChan := make(chan *ModifyAutoSnapshotPolicyResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyAutoSnapshotPolicyWithChan(request *ModifyAutoSnapsh } // ModifyAutoSnapshotPolicyWithCallback invokes the ecs.ModifyAutoSnapshotPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyautosnapshotpolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyAutoSnapshotPolicyWithCallback(request *ModifyAutoSnapshotPolicyRequest, callback func(response *ModifyAutoSnapshotPolicyResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -79,14 +74,14 @@ type ModifyAutoSnapshotPolicyRequest struct { DataDiskPolicyEnabled requests.Boolean `position:"Query" name:"DataDiskPolicyEnabled"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` DataDiskPolicyRetentionDays requests.Integer `position:"Query" name:"DataDiskPolicyRetentionDays"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` SystemDiskPolicyRetentionLastWeek requests.Boolean `position:"Query" name:"SystemDiskPolicyRetentionLastWeek"` + SystemDiskPolicyRetentionDays requests.Integer `position:"Query" name:"SystemDiskPolicyRetentionDays"` + DataDiskPolicyTimePeriod requests.Integer `position:"Query" name:"DataDiskPolicyTimePeriod"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` SystemDiskPolicyTimePeriod requests.Integer `position:"Query" name:"SystemDiskPolicyTimePeriod"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` DataDiskPolicyRetentionLastWeek requests.Boolean `position:"Query" name:"DataDiskPolicyRetentionLastWeek"` - SystemDiskPolicyRetentionDays requests.Integer `position:"Query" name:"SystemDiskPolicyRetentionDays"` - DataDiskPolicyTimePeriod requests.Integer `position:"Query" name:"DataDiskPolicyTimePeriod"` SystemDiskPolicyEnabled requests.Boolean `position:"Query" name:"SystemDiskPolicyEnabled"` } @@ -102,6 +97,7 @@ func CreateModifyAutoSnapshotPolicyRequest() (request *ModifyAutoSnapshotPolicyR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyAutoSnapshotPolicy", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_snapshot_policy_ex.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_snapshot_policy_ex.go index 13bbfb662..fdd80bbec 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_snapshot_policy_ex.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_auto_snapshot_policy_ex.go @@ -21,7 +21,6 @@ import ( ) // ModifyAutoSnapshotPolicyEx invokes the ecs.ModifyAutoSnapshotPolicyEx API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyautosnapshotpolicyex.html func (client *Client) ModifyAutoSnapshotPolicyEx(request *ModifyAutoSnapshotPolicyExRequest) (response *ModifyAutoSnapshotPolicyExResponse, err error) { response = CreateModifyAutoSnapshotPolicyExResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyAutoSnapshotPolicyEx(request *ModifyAutoSnapshotPoli } // ModifyAutoSnapshotPolicyExWithChan invokes the ecs.ModifyAutoSnapshotPolicyEx API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyautosnapshotpolicyex.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyAutoSnapshotPolicyExWithChan(request *ModifyAutoSnapshotPolicyExRequest) (<-chan *ModifyAutoSnapshotPolicyExResponse, <-chan error) { responseChan := make(chan *ModifyAutoSnapshotPolicyExResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyAutoSnapshotPolicyExWithChan(request *ModifyAutoSnap } // ModifyAutoSnapshotPolicyExWithCallback invokes the ecs.ModifyAutoSnapshotPolicyEx API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyautosnapshotpolicyex.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyAutoSnapshotPolicyExWithCallback(request *ModifyAutoSnapshotPolicyExRequest, callback func(response *ModifyAutoSnapshotPolicyExResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,14 +71,17 @@ func (client *Client) ModifyAutoSnapshotPolicyExWithCallback(request *ModifyAuto // ModifyAutoSnapshotPolicyExRequest is the request struct for api ModifyAutoSnapshotPolicyEx type ModifyAutoSnapshotPolicyExRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - AutoSnapshotPolicyId string `position:"Query" name:"autoSnapshotPolicyId"` - TimePoints string `position:"Query" name:"timePoints"` - RetentionDays requests.Integer `position:"Query" name:"retentionDays"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - RepeatWeekdays string `position:"Query" name:"repeatWeekdays"` - AutoSnapshotPolicyName string `position:"Query" name:"autoSnapshotPolicyName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + AutoSnapshotPolicyId string `position:"Query" name:"autoSnapshotPolicyId"` + CopiedSnapshotsRetentionDays requests.Integer `position:"Query" name:"CopiedSnapshotsRetentionDays"` + TimePoints string `position:"Query" name:"timePoints"` + RepeatWeekdays string `position:"Query" name:"repeatWeekdays"` + EnableCrossRegionCopy requests.Boolean `position:"Query" name:"EnableCrossRegionCopy"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AutoSnapshotPolicyName string `position:"Query" name:"autoSnapshotPolicyName"` + RetentionDays requests.Integer `position:"Query" name:"retentionDays"` + TargetCopyRegions string `position:"Query" name:"TargetCopyRegions"` } // ModifyAutoSnapshotPolicyExResponse is the response struct for api ModifyAutoSnapshotPolicyEx @@ -98,6 +96,7 @@ func CreateModifyAutoSnapshotPolicyExRequest() (request *ModifyAutoSnapshotPolic RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyAutoSnapshotPolicyEx", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_bandwidth_package_spec.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_bandwidth_package_spec.go index c9426163d..e4ed44fc3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_bandwidth_package_spec.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_bandwidth_package_spec.go @@ -21,7 +21,6 @@ import ( ) // ModifyBandwidthPackageSpec invokes the ecs.ModifyBandwidthPackageSpec API synchronously -// api document: https://help.aliyun.com/api/ecs/modifybandwidthpackagespec.html func (client *Client) ModifyBandwidthPackageSpec(request *ModifyBandwidthPackageSpecRequest) (response *ModifyBandwidthPackageSpecResponse, err error) { response = CreateModifyBandwidthPackageSpecResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyBandwidthPackageSpec(request *ModifyBandwidthPackage } // ModifyBandwidthPackageSpecWithChan invokes the ecs.ModifyBandwidthPackageSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifybandwidthpackagespec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyBandwidthPackageSpecWithChan(request *ModifyBandwidthPackageSpecRequest) (<-chan *ModifyBandwidthPackageSpecResponse, <-chan error) { responseChan := make(chan *ModifyBandwidthPackageSpecResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyBandwidthPackageSpecWithChan(request *ModifyBandwidt } // ModifyBandwidthPackageSpecWithCallback invokes the ecs.ModifyBandwidthPackageSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifybandwidthpackagespec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyBandwidthPackageSpecWithCallback(request *ModifyBandwidthPackageSpecRequest, callback func(response *ModifyBandwidthPackageSpecResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateModifyBandwidthPackageSpecRequest() (request *ModifyBandwidthPackageS RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyBandwidthPackageSpec", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_capacity_reservation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_capacity_reservation.go new file mode 100644 index 000000000..3901be745 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_capacity_reservation.go @@ -0,0 +1,111 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyCapacityReservation invokes the ecs.ModifyCapacityReservation API synchronously +func (client *Client) ModifyCapacityReservation(request *ModifyCapacityReservationRequest) (response *ModifyCapacityReservationResponse, err error) { + response = CreateModifyCapacityReservationResponse() + err = client.DoAction(request, response) + return +} + +// ModifyCapacityReservationWithChan invokes the ecs.ModifyCapacityReservation API asynchronously +func (client *Client) ModifyCapacityReservationWithChan(request *ModifyCapacityReservationRequest) (<-chan *ModifyCapacityReservationResponse, <-chan error) { + responseChan := make(chan *ModifyCapacityReservationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyCapacityReservation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyCapacityReservationWithCallback invokes the ecs.ModifyCapacityReservation API asynchronously +func (client *Client) ModifyCapacityReservationWithCallback(request *ModifyCapacityReservationRequest, callback func(response *ModifyCapacityReservationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyCapacityReservationResponse + var err error + defer close(result) + response, err = client.ModifyCapacityReservation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyCapacityReservationRequest is the request struct for api ModifyCapacityReservation +type ModifyCapacityReservationRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + StartTime string `position:"Query" name:"StartTime"` + Platform string `position:"Query" name:"Platform"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + EndTimeType string `position:"Query" name:"EndTimeType"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PrivatePoolOptionsName string `position:"Query" name:"PrivatePoolOptions.Name"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + EndTime string `position:"Query" name:"EndTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PackageType string `position:"Query" name:"PackageType"` + InstanceAmount requests.Integer `position:"Query" name:"InstanceAmount"` +} + +// ModifyCapacityReservationResponse is the response struct for api ModifyCapacityReservation +type ModifyCapacityReservationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyCapacityReservationRequest creates a request to invoke ModifyCapacityReservation API +func CreateModifyCapacityReservationRequest() (request *ModifyCapacityReservationRequest) { + request = &ModifyCapacityReservationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyCapacityReservation", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyCapacityReservationResponse creates a response to parse from ModifyCapacityReservation response +func CreateModifyCapacityReservationResponse() (response *ModifyCapacityReservationResponse) { + response = &ModifyCapacityReservationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_command.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_command.go index 13347f50a..ab8b536fe 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_command.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_command.go @@ -21,7 +21,6 @@ import ( ) // ModifyCommand invokes the ecs.ModifyCommand API synchronously -// api document: https://help.aliyun.com/api/ecs/modifycommand.html func (client *Client) ModifyCommand(request *ModifyCommandRequest) (response *ModifyCommandResponse, err error) { response = CreateModifyCommandResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyCommand(request *ModifyCommandRequest) (response *Mo } // ModifyCommandWithChan invokes the ecs.ModifyCommand API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifycommand.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyCommandWithChan(request *ModifyCommandRequest) (<-chan *ModifyCommandResponse, <-chan error) { responseChan := make(chan *ModifyCommandResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyCommandWithChan(request *ModifyCommandRequest) (<-ch } // ModifyCommandWithCallback invokes the ecs.ModifyCommand API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifycommand.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyCommandWithCallback(request *ModifyCommandRequest, callback func(response *ModifyCommandResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -100,6 +95,7 @@ func CreateModifyCommandRequest() (request *ModifyCommandRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyCommand", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_attribute.go index dd5c603b2..d48c5c656 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyDedicatedHostAttribute invokes the ecs.ModifyDedicatedHostAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostattribute.html func (client *Client) ModifyDedicatedHostAttribute(request *ModifyDedicatedHostAttributeRequest) (response *ModifyDedicatedHostAttributeResponse, err error) { response = CreateModifyDedicatedHostAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyDedicatedHostAttribute(request *ModifyDedicatedHostA } // ModifyDedicatedHostAttributeWithChan invokes the ecs.ModifyDedicatedHostAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDedicatedHostAttributeWithChan(request *ModifyDedicatedHostAttributeRequest) (<-chan *ModifyDedicatedHostAttributeResponse, <-chan error) { responseChan := make(chan *ModifyDedicatedHostAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyDedicatedHostAttributeWithChan(request *ModifyDedica } // ModifyDedicatedHostAttributeWithCallback invokes the ecs.ModifyDedicatedHostAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDedicatedHostAttributeWithCallback(request *ModifyDedicatedHostAttributeRequest, callback func(response *ModifyDedicatedHostAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,13 +73,16 @@ type ModifyDedicatedHostAttributeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` Description string `position:"Query" name:"Description"` + CpuOverCommitRatio requests.Float `position:"Query" name:"CpuOverCommitRatio"` ActionOnMaintenance string `position:"Query" name:"ActionOnMaintenance"` + DedicatedHostClusterId string `position:"Query" name:"DedicatedHostClusterId"` DedicatedHostName string `position:"Query" name:"DedicatedHostName"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` DedicatedHostId string `position:"Query" name:"DedicatedHostId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` NetworkAttributesSlbUdpTimeout requests.Integer `position:"Query" name:"NetworkAttributes.SlbUdpTimeout"` + AutoPlacement string `position:"Query" name:"AutoPlacement"` NetworkAttributesUdpTimeout requests.Integer `position:"Query" name:"NetworkAttributes.UdpTimeout"` } @@ -100,6 +98,7 @@ func CreateModifyDedicatedHostAttributeRequest() (request *ModifyDedicatedHostAt RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDedicatedHostAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_auto_release_time.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_auto_release_time.go index 0f8b495b1..9ed0fee50 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_auto_release_time.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_auto_release_time.go @@ -21,7 +21,6 @@ import ( ) // ModifyDedicatedHostAutoReleaseTime invokes the ecs.ModifyDedicatedHostAutoReleaseTime API synchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostautoreleasetime.html func (client *Client) ModifyDedicatedHostAutoReleaseTime(request *ModifyDedicatedHostAutoReleaseTimeRequest) (response *ModifyDedicatedHostAutoReleaseTimeResponse, err error) { response = CreateModifyDedicatedHostAutoReleaseTimeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyDedicatedHostAutoReleaseTime(request *ModifyDedicate } // ModifyDedicatedHostAutoReleaseTimeWithChan invokes the ecs.ModifyDedicatedHostAutoReleaseTime API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostautoreleasetime.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDedicatedHostAutoReleaseTimeWithChan(request *ModifyDedicatedHostAutoReleaseTimeRequest) (<-chan *ModifyDedicatedHostAutoReleaseTimeResponse, <-chan error) { responseChan := make(chan *ModifyDedicatedHostAutoReleaseTimeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyDedicatedHostAutoReleaseTimeWithChan(request *Modify } // ModifyDedicatedHostAutoReleaseTimeWithCallback invokes the ecs.ModifyDedicatedHostAutoReleaseTime API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostautoreleasetime.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDedicatedHostAutoReleaseTimeWithCallback(request *ModifyDedicatedHostAutoReleaseTimeRequest, callback func(response *ModifyDedicatedHostAutoReleaseTimeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateModifyDedicatedHostAutoReleaseTimeRequest() (request *ModifyDedicated RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDedicatedHostAutoReleaseTime", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_auto_renew_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_auto_renew_attribute.go index 5f270a4fc..690845d2b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_auto_renew_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_auto_renew_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyDedicatedHostAutoRenewAttribute invokes the ecs.ModifyDedicatedHostAutoRenewAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostautorenewattribute.html func (client *Client) ModifyDedicatedHostAutoRenewAttribute(request *ModifyDedicatedHostAutoRenewAttributeRequest) (response *ModifyDedicatedHostAutoRenewAttributeResponse, err error) { response = CreateModifyDedicatedHostAutoRenewAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyDedicatedHostAutoRenewAttribute(request *ModifyDedic } // ModifyDedicatedHostAutoRenewAttributeWithChan invokes the ecs.ModifyDedicatedHostAutoRenewAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostautorenewattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDedicatedHostAutoRenewAttributeWithChan(request *ModifyDedicatedHostAutoRenewAttributeRequest) (<-chan *ModifyDedicatedHostAutoRenewAttributeResponse, <-chan error) { responseChan := make(chan *ModifyDedicatedHostAutoRenewAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyDedicatedHostAutoRenewAttributeWithChan(request *Mod } // ModifyDedicatedHostAutoRenewAttributeWithCallback invokes the ecs.ModifyDedicatedHostAutoRenewAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydedicatedhostautorenewattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDedicatedHostAutoRenewAttributeWithCallback(request *ModifyDedicatedHostAutoRenewAttributeRequest, callback func(response *ModifyDedicatedHostAutoRenewAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,15 +71,15 @@ func (client *Client) ModifyDedicatedHostAutoRenewAttributeWithCallback(request // ModifyDedicatedHostAutoRenewAttributeRequest is the request struct for api ModifyDedicatedHostAutoRenewAttribute type ModifyDedicatedHostAutoRenewAttributeRequest struct { *requests.RpcRequest - Duration requests.Integer `position:"Query" name:"Duration"` DedicatedHostIds string `position:"Query" name:"DedicatedHostIds"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - PeriodUnit string `position:"Query" name:"PeriodUnit"` - AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` + Duration requests.Integer `position:"Query" name:"Duration"` + RenewalStatus string `position:"Query" name:"RenewalStatus"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - RenewalStatus string `position:"Query" name:"RenewalStatus"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` } // ModifyDedicatedHostAutoRenewAttributeResponse is the response struct for api ModifyDedicatedHostAutoRenewAttribute @@ -99,6 +94,7 @@ func CreateModifyDedicatedHostAutoRenewAttributeRequest() (request *ModifyDedica RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDedicatedHostAutoRenewAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_cluster_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_cluster_attribute.go new file mode 100644 index 000000000..075370c2a --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_host_cluster_attribute.go @@ -0,0 +1,105 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyDedicatedHostClusterAttribute invokes the ecs.ModifyDedicatedHostClusterAttribute API synchronously +func (client *Client) ModifyDedicatedHostClusterAttribute(request *ModifyDedicatedHostClusterAttributeRequest) (response *ModifyDedicatedHostClusterAttributeResponse, err error) { + response = CreateModifyDedicatedHostClusterAttributeResponse() + err = client.DoAction(request, response) + return +} + +// ModifyDedicatedHostClusterAttributeWithChan invokes the ecs.ModifyDedicatedHostClusterAttribute API asynchronously +func (client *Client) ModifyDedicatedHostClusterAttributeWithChan(request *ModifyDedicatedHostClusterAttributeRequest) (<-chan *ModifyDedicatedHostClusterAttributeResponse, <-chan error) { + responseChan := make(chan *ModifyDedicatedHostClusterAttributeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyDedicatedHostClusterAttribute(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyDedicatedHostClusterAttributeWithCallback invokes the ecs.ModifyDedicatedHostClusterAttribute API asynchronously +func (client *Client) ModifyDedicatedHostClusterAttributeWithCallback(request *ModifyDedicatedHostClusterAttributeRequest, callback func(response *ModifyDedicatedHostClusterAttributeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyDedicatedHostClusterAttributeResponse + var err error + defer close(result) + response, err = client.ModifyDedicatedHostClusterAttribute(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyDedicatedHostClusterAttributeRequest is the request struct for api ModifyDedicatedHostClusterAttribute +type ModifyDedicatedHostClusterAttributeRequest struct { + *requests.RpcRequest + DedicatedHostClusterName string `position:"Query" name:"DedicatedHostClusterName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + DedicatedHostClusterId string `position:"Query" name:"DedicatedHostClusterId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// ModifyDedicatedHostClusterAttributeResponse is the response struct for api ModifyDedicatedHostClusterAttribute +type ModifyDedicatedHostClusterAttributeResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyDedicatedHostClusterAttributeRequest creates a request to invoke ModifyDedicatedHostClusterAttribute API +func CreateModifyDedicatedHostClusterAttributeRequest() (request *ModifyDedicatedHostClusterAttributeRequest) { + request = &ModifyDedicatedHostClusterAttributeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDedicatedHostClusterAttribute", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyDedicatedHostClusterAttributeResponse creates a response to parse from ModifyDedicatedHostClusterAttribute response +func CreateModifyDedicatedHostClusterAttributeResponse() (response *ModifyDedicatedHostClusterAttributeResponse) { + response = &ModifyDedicatedHostClusterAttributeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_hosts_charge_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_hosts_charge_type.go new file mode 100644 index 000000000..41588e353 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_dedicated_hosts_charge_type.go @@ -0,0 +1,112 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyDedicatedHostsChargeType invokes the ecs.ModifyDedicatedHostsChargeType API synchronously +func (client *Client) ModifyDedicatedHostsChargeType(request *ModifyDedicatedHostsChargeTypeRequest) (response *ModifyDedicatedHostsChargeTypeResponse, err error) { + response = CreateModifyDedicatedHostsChargeTypeResponse() + err = client.DoAction(request, response) + return +} + +// ModifyDedicatedHostsChargeTypeWithChan invokes the ecs.ModifyDedicatedHostsChargeType API asynchronously +func (client *Client) ModifyDedicatedHostsChargeTypeWithChan(request *ModifyDedicatedHostsChargeTypeRequest) (<-chan *ModifyDedicatedHostsChargeTypeResponse, <-chan error) { + responseChan := make(chan *ModifyDedicatedHostsChargeTypeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyDedicatedHostsChargeType(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyDedicatedHostsChargeTypeWithCallback invokes the ecs.ModifyDedicatedHostsChargeType API asynchronously +func (client *Client) ModifyDedicatedHostsChargeTypeWithCallback(request *ModifyDedicatedHostsChargeTypeRequest, callback func(response *ModifyDedicatedHostsChargeTypeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyDedicatedHostsChargeTypeResponse + var err error + defer close(result) + response, err = client.ModifyDedicatedHostsChargeType(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyDedicatedHostsChargeTypeRequest is the request struct for api ModifyDedicatedHostsChargeType +type ModifyDedicatedHostsChargeTypeRequest struct { + *requests.RpcRequest + DedicatedHostIds string `position:"Query" name:"DedicatedHostIds"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + DedicatedHostChargeType string `position:"Query" name:"DedicatedHostChargeType"` + Period requests.Integer `position:"Query" name:"Period"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + AutoPay requests.Boolean `position:"Query" name:"AutoPay"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + DetailFee requests.Boolean `position:"Query" name:"DetailFee"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` +} + +// ModifyDedicatedHostsChargeTypeResponse is the response struct for api ModifyDedicatedHostsChargeType +type ModifyDedicatedHostsChargeTypeResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + OrderId string `json:"OrderId" xml:"OrderId"` + FeeOfInstances FeeOfInstancesInModifyDedicatedHostsChargeType `json:"FeeOfInstances" xml:"FeeOfInstances"` +} + +// CreateModifyDedicatedHostsChargeTypeRequest creates a request to invoke ModifyDedicatedHostsChargeType API +func CreateModifyDedicatedHostsChargeTypeRequest() (request *ModifyDedicatedHostsChargeTypeRequest) { + request = &ModifyDedicatedHostsChargeTypeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDedicatedHostsChargeType", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyDedicatedHostsChargeTypeResponse creates a response to parse from ModifyDedicatedHostsChargeType response +func CreateModifyDedicatedHostsChargeTypeResponse() (response *ModifyDedicatedHostsChargeTypeResponse) { + response = &ModifyDedicatedHostsChargeTypeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_demand.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_demand.go new file mode 100644 index 000000000..60a2dfe02 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_demand.go @@ -0,0 +1,114 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyDemand invokes the ecs.ModifyDemand API synchronously +func (client *Client) ModifyDemand(request *ModifyDemandRequest) (response *ModifyDemandResponse, err error) { + response = CreateModifyDemandResponse() + err = client.DoAction(request, response) + return +} + +// ModifyDemandWithChan invokes the ecs.ModifyDemand API asynchronously +func (client *Client) ModifyDemandWithChan(request *ModifyDemandRequest) (<-chan *ModifyDemandResponse, <-chan error) { + responseChan := make(chan *ModifyDemandResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyDemand(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyDemandWithCallback invokes the ecs.ModifyDemand API asynchronously +func (client *Client) ModifyDemandWithCallback(request *ModifyDemandRequest, callback func(response *ModifyDemandResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyDemandResponse + var err error + defer close(result) + response, err = client.ModifyDemand(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyDemandRequest is the request struct for api ModifyDemand +type ModifyDemandRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + StartTime string `position:"Query" name:"StartTime"` + DemandDescription string `position:"Query" name:"DemandDescription"` + InstanceType string `position:"Query" name:"InstanceType"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + DemandName string `position:"Query" name:"DemandName"` + Amount requests.Integer `position:"Query" name:"Amount"` + Period requests.Integer `position:"Query" name:"Period"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + EndTime string `position:"Query" name:"EndTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + DemandId string `position:"Query" name:"DemandId"` + ZoneId string `position:"Query" name:"ZoneId"` +} + +// ModifyDemandResponse is the response struct for api ModifyDemand +type ModifyDemandResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyDemandRequest creates a request to invoke ModifyDemand API +func CreateModifyDemandRequest() (request *ModifyDemandRequest) { + request = &ModifyDemandRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDemand", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyDemandResponse creates a response to parse from ModifyDemand response +func CreateModifyDemandResponse() (response *ModifyDemandResponse) { + response = &ModifyDemandResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_deployment_set_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_deployment_set_attribute.go index 66b322b22..9aea00a1f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_deployment_set_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_deployment_set_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyDeploymentSetAttribute invokes the ecs.ModifyDeploymentSetAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifydeploymentsetattribute.html func (client *Client) ModifyDeploymentSetAttribute(request *ModifyDeploymentSetAttributeRequest) (response *ModifyDeploymentSetAttributeResponse, err error) { response = CreateModifyDeploymentSetAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyDeploymentSetAttribute(request *ModifyDeploymentSetA } // ModifyDeploymentSetAttributeWithChan invokes the ecs.ModifyDeploymentSetAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydeploymentsetattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDeploymentSetAttributeWithChan(request *ModifyDeploymentSetAttributeRequest) (<-chan *ModifyDeploymentSetAttributeResponse, <-chan error) { responseChan := make(chan *ModifyDeploymentSetAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyDeploymentSetAttributeWithChan(request *ModifyDeploy } // ModifyDeploymentSetAttributeWithCallback invokes the ecs.ModifyDeploymentSetAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydeploymentsetattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDeploymentSetAttributeWithCallback(request *ModifyDeploymentSetAttributeRequest, callback func(response *ModifyDeploymentSetAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,11 +71,11 @@ func (client *Client) ModifyDeploymentSetAttributeWithCallback(request *ModifyDe // ModifyDeploymentSetAttributeRequest is the request struct for api ModifyDeploymentSetAttribute type ModifyDeploymentSetAttributeRequest struct { *requests.RpcRequest - DeploymentSetId string `position:"Query" name:"DeploymentSetId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + DeploymentSetId string `position:"Query" name:"DeploymentSetId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - Description string `position:"Query" name:"Description"` DeploymentSetName string `position:"Query" name:"DeploymentSetName"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -97,6 +92,7 @@ func CreateModifyDeploymentSetAttributeRequest() (request *ModifyDeploymentSetAt RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDeploymentSetAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_attribute.go index a01013d9f..dcd6bf125 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyDiskAttribute invokes the ecs.ModifyDiskAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifydiskattribute.html func (client *Client) ModifyDiskAttribute(request *ModifyDiskAttributeRequest) (response *ModifyDiskAttributeResponse, err error) { response = CreateModifyDiskAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyDiskAttribute(request *ModifyDiskAttributeRequest) ( } // ModifyDiskAttributeWithChan invokes the ecs.ModifyDiskAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydiskattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDiskAttributeWithChan(request *ModifyDiskAttributeRequest) (<-chan *ModifyDiskAttributeResponse, <-chan error) { responseChan := make(chan *ModifyDiskAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyDiskAttributeWithChan(request *ModifyDiskAttributeRe } // ModifyDiskAttributeWithCallback invokes the ecs.ModifyDiskAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydiskattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDiskAttributeWithCallback(request *ModifyDiskAttributeRequest, callback func(response *ModifyDiskAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,16 +71,17 @@ func (client *Client) ModifyDiskAttributeWithCallback(request *ModifyDiskAttribu // ModifyDiskAttributeRequest is the request struct for api ModifyDiskAttribute type ModifyDiskAttributeRequest struct { *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` DiskName string `position:"Query" name:"DiskName"` DeleteAutoSnapshot requests.Boolean `position:"Query" name:"DeleteAutoSnapshot"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + DiskIds *[]string `position:"Query" name:"DiskIds" type:"Repeated"` + DiskId string `position:"Query" name:"DiskId"` + DeleteWithInstance requests.Boolean `position:"Query" name:"DeleteWithInstance"` EnableAutoSnapshot requests.Boolean `position:"Query" name:"EnableAutoSnapshot"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - Description string `position:"Query" name:"Description"` - DiskId string `position:"Query" name:"DiskId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - DeleteWithInstance requests.Boolean `position:"Query" name:"DeleteWithInstance"` } // ModifyDiskAttributeResponse is the response struct for api ModifyDiskAttribute @@ -100,6 +96,7 @@ func CreateModifyDiskAttributeRequest() (request *ModifyDiskAttributeRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDiskAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_charge_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_charge_type.go index 5b9bba896..f762261c4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_charge_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_charge_type.go @@ -21,7 +21,6 @@ import ( ) // ModifyDiskChargeType invokes the ecs.ModifyDiskChargeType API synchronously -// api document: https://help.aliyun.com/api/ecs/modifydiskchargetype.html func (client *Client) ModifyDiskChargeType(request *ModifyDiskChargeTypeRequest) (response *ModifyDiskChargeTypeResponse, err error) { response = CreateModifyDiskChargeTypeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyDiskChargeType(request *ModifyDiskChargeTypeRequest) } // ModifyDiskChargeTypeWithChan invokes the ecs.ModifyDiskChargeType API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydiskchargetype.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDiskChargeTypeWithChan(request *ModifyDiskChargeTypeRequest) (<-chan *ModifyDiskChargeTypeResponse, <-chan error) { responseChan := make(chan *ModifyDiskChargeTypeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyDiskChargeTypeWithChan(request *ModifyDiskChargeType } // ModifyDiskChargeTypeWithCallback invokes the ecs.ModifyDiskChargeType API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifydiskchargetype.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyDiskChargeTypeWithCallback(request *ModifyDiskChargeTypeRequest, callback func(response *ModifyDiskChargeTypeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,14 +72,14 @@ func (client *Client) ModifyDiskChargeTypeWithCallback(request *ModifyDiskCharge type ModifyDiskChargeTypeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` DiskChargeType string `position:"Query" name:"DiskChargeType"` - InstanceId string `position:"Query" name:"InstanceId"` + DiskIds string `position:"Query" name:"DiskIds"` AutoPay requests.Boolean `position:"Query" name:"AutoPay"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ClientToken string `position:"Query" name:"ClientToken"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - DiskIds string `position:"Query" name:"DiskIds"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // ModifyDiskChargeTypeResponse is the response struct for api ModifyDiskChargeType @@ -100,6 +95,7 @@ func CreateModifyDiskChargeTypeRequest() (request *ModifyDiskChargeTypeRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDiskChargeType", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_spec.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_spec.go new file mode 100644 index 000000000..1bb125061 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_disk_spec.go @@ -0,0 +1,108 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyDiskSpec invokes the ecs.ModifyDiskSpec API synchronously +func (client *Client) ModifyDiskSpec(request *ModifyDiskSpecRequest) (response *ModifyDiskSpecResponse, err error) { + response = CreateModifyDiskSpecResponse() + err = client.DoAction(request, response) + return +} + +// ModifyDiskSpecWithChan invokes the ecs.ModifyDiskSpec API asynchronously +func (client *Client) ModifyDiskSpecWithChan(request *ModifyDiskSpecRequest) (<-chan *ModifyDiskSpecResponse, <-chan error) { + responseChan := make(chan *ModifyDiskSpecResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyDiskSpec(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyDiskSpecWithCallback invokes the ecs.ModifyDiskSpec API asynchronously +func (client *Client) ModifyDiskSpecWithCallback(request *ModifyDiskSpecRequest, callback func(response *ModifyDiskSpecResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyDiskSpecResponse + var err error + defer close(result) + response, err = client.ModifyDiskSpec(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyDiskSpecRequest is the request struct for api ModifyDiskSpec +type ModifyDiskSpecRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + DiskCategory string `position:"Query" name:"DiskCategory"` + DiskId string `position:"Query" name:"DiskId"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PerformanceLevel string `position:"Query" name:"PerformanceLevel"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// ModifyDiskSpecResponse is the response struct for api ModifyDiskSpec +type ModifyDiskSpecResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TaskId string `json:"TaskId" xml:"TaskId"` + OrderId string `json:"OrderId" xml:"OrderId"` +} + +// CreateModifyDiskSpecRequest creates a request to invoke ModifyDiskSpec API +func CreateModifyDiskSpecRequest() (request *ModifyDiskSpecRequest) { + request = &ModifyDiskSpecRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyDiskSpec", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyDiskSpecResponse creates a response to parse from ModifyDiskSpec response +func CreateModifyDiskSpecResponse() (response *ModifyDiskSpecResponse) { + response = &ModifyDiskSpecResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_eip_address_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_eip_address_attribute.go index cf46a852e..bff518d3f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_eip_address_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_eip_address_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyEipAddressAttribute invokes the ecs.ModifyEipAddressAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyeipaddressattribute.html func (client *Client) ModifyEipAddressAttribute(request *ModifyEipAddressAttributeRequest) (response *ModifyEipAddressAttributeResponse, err error) { response = CreateModifyEipAddressAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyEipAddressAttribute(request *ModifyEipAddressAttribu } // ModifyEipAddressAttributeWithChan invokes the ecs.ModifyEipAddressAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyeipaddressattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyEipAddressAttributeWithChan(request *ModifyEipAddressAttributeRequest) (<-chan *ModifyEipAddressAttributeResponse, <-chan error) { responseChan := make(chan *ModifyEipAddressAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyEipAddressAttributeWithChan(request *ModifyEipAddres } // ModifyEipAddressAttributeWithCallback invokes the ecs.ModifyEipAddressAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyeipaddressattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyEipAddressAttributeWithCallback(request *ModifyEipAddressAttributeRequest, callback func(response *ModifyEipAddressAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) ModifyEipAddressAttributeWithCallback(request *ModifyEipAd type ModifyEipAddressAttributeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + AllocationId string `position:"Query" name:"AllocationId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` Bandwidth string `position:"Query" name:"Bandwidth"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - AllocationId string `position:"Query" name:"AllocationId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -96,6 +91,7 @@ func CreateModifyEipAddressAttributeRequest() (request *ModifyEipAddressAttribut RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyEipAddressAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_elasticity_assurance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_elasticity_assurance.go new file mode 100644 index 000000000..e351c4032 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_elasticity_assurance.go @@ -0,0 +1,106 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyElasticityAssurance invokes the ecs.ModifyElasticityAssurance API synchronously +func (client *Client) ModifyElasticityAssurance(request *ModifyElasticityAssuranceRequest) (response *ModifyElasticityAssuranceResponse, err error) { + response = CreateModifyElasticityAssuranceResponse() + err = client.DoAction(request, response) + return +} + +// ModifyElasticityAssuranceWithChan invokes the ecs.ModifyElasticityAssurance API asynchronously +func (client *Client) ModifyElasticityAssuranceWithChan(request *ModifyElasticityAssuranceRequest) (<-chan *ModifyElasticityAssuranceResponse, <-chan error) { + responseChan := make(chan *ModifyElasticityAssuranceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyElasticityAssurance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyElasticityAssuranceWithCallback invokes the ecs.ModifyElasticityAssurance API asynchronously +func (client *Client) ModifyElasticityAssuranceWithCallback(request *ModifyElasticityAssuranceRequest, callback func(response *ModifyElasticityAssuranceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyElasticityAssuranceResponse + var err error + defer close(result) + response, err = client.ModifyElasticityAssurance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyElasticityAssuranceRequest is the request struct for api ModifyElasticityAssurance +type ModifyElasticityAssuranceRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + PrivatePoolOptionsName string `position:"Query" name:"PrivatePoolOptions.Name"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PackageType string `position:"Query" name:"PackageType"` +} + +// ModifyElasticityAssuranceResponse is the response struct for api ModifyElasticityAssurance +type ModifyElasticityAssuranceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyElasticityAssuranceRequest creates a request to invoke ModifyElasticityAssurance API +func CreateModifyElasticityAssuranceRequest() (request *ModifyElasticityAssuranceRequest) { + request = &ModifyElasticityAssuranceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyElasticityAssurance", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyElasticityAssuranceResponse creates a response to parse from ModifyElasticityAssurance response +func CreateModifyElasticityAssuranceResponse() (response *ModifyElasticityAssuranceResponse) { + response = &ModifyElasticityAssuranceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_forward_entry.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_forward_entry.go index d831c393d..0d87eed6d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_forward_entry.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_forward_entry.go @@ -21,7 +21,6 @@ import ( ) // ModifyForwardEntry invokes the ecs.ModifyForwardEntry API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyforwardentry.html func (client *Client) ModifyForwardEntry(request *ModifyForwardEntryRequest) (response *ModifyForwardEntryResponse, err error) { response = CreateModifyForwardEntryResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyForwardEntry(request *ModifyForwardEntryRequest) (re } // ModifyForwardEntryWithChan invokes the ecs.ModifyForwardEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyforwardentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyForwardEntryWithChan(request *ModifyForwardEntryRequest) (<-chan *ModifyForwardEntryResponse, <-chan error) { responseChan := make(chan *ModifyForwardEntryResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyForwardEntryWithChan(request *ModifyForwardEntryRequ } // ModifyForwardEntryWithCallback invokes the ecs.ModifyForwardEntry API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyforwardentry.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyForwardEntryWithCallback(request *ModifyForwardEntryRequest, callback func(response *ModifyForwardEntryResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,15 +72,15 @@ func (client *Client) ModifyForwardEntryWithCallback(request *ModifyForwardEntry type ModifyForwardEntryRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ForwardTableId string `position:"Query" name:"ForwardTableId"` + InternalIp string `position:"Query" name:"InternalIp"` + ForwardEntryId string `position:"Query" name:"ForwardEntryId"` + ExternalIp string `position:"Query" name:"ExternalIp"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` IpProtocol string `position:"Query" name:"IpProtocol"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - ForwardTableId string `position:"Query" name:"ForwardTableId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InternalIp string `position:"Query" name:"InternalIp"` - ForwardEntryId string `position:"Query" name:"ForwardEntryId"` InternalPort string `position:"Query" name:"InternalPort"` - ExternalIp string `position:"Query" name:"ExternalIp"` ExternalPort string `position:"Query" name:"ExternalPort"` } @@ -101,6 +96,7 @@ func CreateModifyForwardEntryRequest() (request *ModifyForwardEntryRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyForwardEntry", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_ha_vip_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_ha_vip_attribute.go index 034501af0..e99dd8718 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_ha_vip_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_ha_vip_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyHaVipAttribute invokes the ecs.ModifyHaVipAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyhavipattribute.html func (client *Client) ModifyHaVipAttribute(request *ModifyHaVipAttributeRequest) (response *ModifyHaVipAttributeResponse, err error) { response = CreateModifyHaVipAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyHaVipAttribute(request *ModifyHaVipAttributeRequest) } // ModifyHaVipAttributeWithChan invokes the ecs.ModifyHaVipAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyhavipattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyHaVipAttributeWithChan(request *ModifyHaVipAttributeRequest) (<-chan *ModifyHaVipAttributeResponse, <-chan error) { responseChan := make(chan *ModifyHaVipAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyHaVipAttributeWithChan(request *ModifyHaVipAttribute } // ModifyHaVipAttributeWithCallback invokes the ecs.ModifyHaVipAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyhavipattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyHaVipAttributeWithCallback(request *ModifyHaVipAttributeRequest, callback func(response *ModifyHaVipAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,12 +71,12 @@ func (client *Client) ModifyHaVipAttributeWithCallback(request *ModifyHaVipAttri // ModifyHaVipAttributeRequest is the request struct for api ModifyHaVipAttribute type ModifyHaVipAttributeRequest struct { *requests.RpcRequest - HaVipId string `position:"Query" name:"HaVipId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` + HaVipId string `position:"Query" name:"HaVipId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -97,6 +92,7 @@ func CreateModifyHaVipAttributeRequest() (request *ModifyHaVipAttributeRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyHaVipAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_hpc_cluster_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_hpc_cluster_attribute.go index 9df6f6053..aaab44b20 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_hpc_cluster_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_hpc_cluster_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyHpcClusterAttribute invokes the ecs.ModifyHpcClusterAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyhpcclusterattribute.html func (client *Client) ModifyHpcClusterAttribute(request *ModifyHpcClusterAttributeRequest) (response *ModifyHpcClusterAttributeResponse, err error) { response = CreateModifyHpcClusterAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyHpcClusterAttribute(request *ModifyHpcClusterAttribu } // ModifyHpcClusterAttributeWithChan invokes the ecs.ModifyHpcClusterAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyhpcclusterattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyHpcClusterAttributeWithChan(request *ModifyHpcClusterAttributeRequest) (<-chan *ModifyHpcClusterAttributeResponse, <-chan error) { responseChan := make(chan *ModifyHpcClusterAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyHpcClusterAttributeWithChan(request *ModifyHpcCluste } // ModifyHpcClusterAttributeWithCallback invokes the ecs.ModifyHpcClusterAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyhpcclusterattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyHpcClusterAttributeWithCallback(request *ModifyHpcClusterAttributeRequest, callback func(response *ModifyHpcClusterAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -98,6 +93,7 @@ func CreateModifyHpcClusterAttributeRequest() (request *ModifyHpcClusterAttribut RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyHpcClusterAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_attribute.go index bed589ab9..3ba44bd42 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyImageAttribute invokes the ecs.ModifyImageAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyimageattribute.html func (client *Client) ModifyImageAttribute(request *ModifyImageAttributeRequest) (response *ModifyImageAttributeResponse, err error) { response = CreateModifyImageAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyImageAttribute(request *ModifyImageAttributeRequest) } // ModifyImageAttributeWithChan invokes the ecs.ModifyImageAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyimageattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyImageAttributeWithChan(request *ModifyImageAttributeRequest) (<-chan *ModifyImageAttributeResponse, <-chan error) { responseChan := make(chan *ModifyImageAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyImageAttributeWithChan(request *ModifyImageAttribute } // ModifyImageAttributeWithCallback invokes the ecs.ModifyImageAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyimageattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyImageAttributeWithCallback(request *ModifyImageAttributeRequest, callback func(response *ModifyImageAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,11 +73,15 @@ type ModifyImageAttributeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ImageId string `position:"Query" name:"ImageId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ImageName string `position:"Query" name:"ImageName"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` + BootMode string `position:"Query" name:"BootMode"` + ImageName string `position:"Query" name:"ImageName"` + LicenseType string `position:"Query" name:"LicenseType"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ImageFamily string `position:"Query" name:"ImageFamily"` + Status string `position:"Query" name:"Status"` } // ModifyImageAttributeResponse is the response struct for api ModifyImageAttribute @@ -97,6 +96,7 @@ func CreateModifyImageAttributeRequest() (request *ModifyImageAttributeRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyImageAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_share_group_permission.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_share_group_permission.go index fb3142aa9..6750ffb47 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_share_group_permission.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_share_group_permission.go @@ -21,7 +21,6 @@ import ( ) // ModifyImageShareGroupPermission invokes the ecs.ModifyImageShareGroupPermission API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyimagesharegrouppermission.html func (client *Client) ModifyImageShareGroupPermission(request *ModifyImageShareGroupPermissionRequest) (response *ModifyImageShareGroupPermissionResponse, err error) { response = CreateModifyImageShareGroupPermissionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyImageShareGroupPermission(request *ModifyImageShareG } // ModifyImageShareGroupPermissionWithChan invokes the ecs.ModifyImageShareGroupPermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyimagesharegrouppermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyImageShareGroupPermissionWithChan(request *ModifyImageShareGroupPermissionRequest) (<-chan *ModifyImageShareGroupPermissionResponse, <-chan error) { responseChan := make(chan *ModifyImageShareGroupPermissionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyImageShareGroupPermissionWithChan(request *ModifyIma } // ModifyImageShareGroupPermissionWithCallback invokes the ecs.ModifyImageShareGroupPermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyimagesharegrouppermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyImageShareGroupPermissionWithCallback(request *ModifyImageShareGroupPermissionRequest, callback func(response *ModifyImageShareGroupPermissionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -81,8 +76,8 @@ type ModifyImageShareGroupPermissionRequest struct { AddGroup1 string `position:"Query" name:"AddGroup.1"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - RemoveGroup1 string `position:"Query" name:"RemoveGroup.1"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + RemoveGroup1 string `position:"Query" name:"RemoveGroup.1"` } // ModifyImageShareGroupPermissionResponse is the response struct for api ModifyImageShareGroupPermission @@ -97,6 +92,7 @@ func CreateModifyImageShareGroupPermissionRequest() (request *ModifyImageShareGr RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyImageShareGroupPermission", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_share_permission.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_share_permission.go index d73f19f78..064207523 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_share_permission.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_image_share_permission.go @@ -21,7 +21,6 @@ import ( ) // ModifyImageSharePermission invokes the ecs.ModifyImageSharePermission API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyimagesharepermission.html func (client *Client) ModifyImageSharePermission(request *ModifyImageSharePermissionRequest) (response *ModifyImageSharePermissionResponse, err error) { response = CreateModifyImageSharePermissionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyImageSharePermission(request *ModifyImageSharePermis } // ModifyImageSharePermissionWithChan invokes the ecs.ModifyImageSharePermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyimagesharepermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyImageSharePermissionWithChan(request *ModifyImageSharePermissionRequest) (<-chan *ModifyImageSharePermissionResponse, <-chan error) { responseChan := make(chan *ModifyImageSharePermissionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyImageSharePermissionWithChan(request *ModifyImageSha } // ModifyImageSharePermissionWithCallback invokes the ecs.ModifyImageSharePermission API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyimagesharepermission.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyImageSharePermissionWithCallback(request *ModifyImageSharePermissionRequest, callback func(response *ModifyImageSharePermissionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,11 +73,12 @@ type ModifyImageSharePermissionRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ImageId string `position:"Query" name:"ImageId"` - AddAccount *[]string `position:"Query" name:"AddAccount" type:"Repeated"` + LaunchPermission string `position:"Query" name:"LaunchPermission"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - RemoveAccount *[]string `position:"Query" name:"RemoveAccount" type:"Repeated"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + AddAccount *[]string `position:"Query" name:"AddAccount" type:"Repeated"` + RemoveAccount *[]string `position:"Query" name:"RemoveAccount" type:"Repeated"` } // ModifyImageSharePermissionResponse is the response struct for api ModifyImageSharePermission @@ -97,6 +93,7 @@ func CreateModifyImageSharePermissionRequest() (request *ModifyImageSharePermiss RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyImageSharePermission", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_attachment_attributes.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_attachment_attributes.go new file mode 100644 index 000000000..aeeb1290f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_attachment_attributes.go @@ -0,0 +1,105 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyInstanceAttachmentAttributes invokes the ecs.ModifyInstanceAttachmentAttributes API synchronously +func (client *Client) ModifyInstanceAttachmentAttributes(request *ModifyInstanceAttachmentAttributesRequest) (response *ModifyInstanceAttachmentAttributesResponse, err error) { + response = CreateModifyInstanceAttachmentAttributesResponse() + err = client.DoAction(request, response) + return +} + +// ModifyInstanceAttachmentAttributesWithChan invokes the ecs.ModifyInstanceAttachmentAttributes API asynchronously +func (client *Client) ModifyInstanceAttachmentAttributesWithChan(request *ModifyInstanceAttachmentAttributesRequest) (<-chan *ModifyInstanceAttachmentAttributesResponse, <-chan error) { + responseChan := make(chan *ModifyInstanceAttachmentAttributesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyInstanceAttachmentAttributes(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyInstanceAttachmentAttributesWithCallback invokes the ecs.ModifyInstanceAttachmentAttributes API asynchronously +func (client *Client) ModifyInstanceAttachmentAttributesWithCallback(request *ModifyInstanceAttachmentAttributesRequest, callback func(response *ModifyInstanceAttachmentAttributesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyInstanceAttachmentAttributesResponse + var err error + defer close(result) + response, err = client.ModifyInstanceAttachmentAttributes(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyInstanceAttachmentAttributesRequest is the request struct for api ModifyInstanceAttachmentAttributes +type ModifyInstanceAttachmentAttributesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PrivatePoolOptionsMatchCriteria string `position:"Query" name:"PrivatePoolOptions.MatchCriteria"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` +} + +// ModifyInstanceAttachmentAttributesResponse is the response struct for api ModifyInstanceAttachmentAttributes +type ModifyInstanceAttachmentAttributesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyInstanceAttachmentAttributesRequest creates a request to invoke ModifyInstanceAttachmentAttributes API +func CreateModifyInstanceAttachmentAttributesRequest() (request *ModifyInstanceAttachmentAttributesRequest) { + request = &ModifyInstanceAttachmentAttributesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceAttachmentAttributes", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyInstanceAttachmentAttributesResponse creates a response to parse from ModifyInstanceAttachmentAttributes response +func CreateModifyInstanceAttachmentAttributesResponse() (response *ModifyInstanceAttachmentAttributesResponse) { + response = &ModifyInstanceAttachmentAttributesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_attribute.go index 57bfed403..9f23edd79 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceAttribute invokes the ecs.ModifyInstanceAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceattribute.html func (client *Client) ModifyInstanceAttribute(request *ModifyInstanceAttributeRequest) (response *ModifyInstanceAttributeResponse, err error) { response = CreateModifyInstanceAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceAttribute(request *ModifyInstanceAttributeRe } // ModifyInstanceAttributeWithChan invokes the ecs.ModifyInstanceAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceAttributeWithChan(request *ModifyInstanceAttributeRequest) (<-chan *ModifyInstanceAttributeResponse, <-chan error) { responseChan := make(chan *ModifyInstanceAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceAttributeWithChan(request *ModifyInstanceAtt } // ModifyInstanceAttributeWithCallback invokes the ecs.ModifyInstanceAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceAttributeWithCallback(request *ModifyInstanceAttributeRequest, callback func(response *ModifyInstanceAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,19 +71,21 @@ func (client *Client) ModifyInstanceAttributeWithCallback(request *ModifyInstanc // ModifyInstanceAttributeRequest is the request struct for api ModifyInstanceAttribute type ModifyInstanceAttributeRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - Recyclable requests.Boolean `position:"Query" name:"Recyclable"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - Description string `position:"Query" name:"Description"` - CreditSpecification string `position:"Query" name:"CreditSpecification"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - DeletionProtection requests.Boolean `position:"Query" name:"DeletionProtection"` - UserData string `position:"Query" name:"UserData"` - Password string `position:"Query" name:"Password"` - HostName string `position:"Query" name:"HostName"` - InstanceId string `position:"Query" name:"InstanceId"` - InstanceName string `position:"Query" name:"InstanceName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Recyclable requests.Boolean `position:"Query" name:"Recyclable"` + NetworkInterfaceQueueNumber requests.Integer `position:"Query" name:"NetworkInterfaceQueueNumber"` + Description string `position:"Query" name:"Description"` + DeletionProtection requests.Boolean `position:"Query" name:"DeletionProtection"` + UserData string `position:"Query" name:"UserData"` + Password string `position:"Query" name:"Password"` + HostName string `position:"Query" name:"HostName"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + CreditSpecification string `position:"Query" name:"CreditSpecification"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SecurityGroupIds *[]string `position:"Query" name:"SecurityGroupIds" type:"Repeated"` + InstanceId string `position:"Query" name:"InstanceId"` + InstanceName string `position:"Query" name:"InstanceName"` } // ModifyInstanceAttributeResponse is the response struct for api ModifyInstanceAttribute @@ -103,6 +100,7 @@ func CreateModifyInstanceAttributeRequest() (request *ModifyInstanceAttributeReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_auto_release_time.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_auto_release_time.go index 6e596d3de..47e55bb76 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_auto_release_time.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_auto_release_time.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceAutoReleaseTime invokes the ecs.ModifyInstanceAutoReleaseTime API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceautoreleasetime.html func (client *Client) ModifyInstanceAutoReleaseTime(request *ModifyInstanceAutoReleaseTimeRequest) (response *ModifyInstanceAutoReleaseTimeResponse, err error) { response = CreateModifyInstanceAutoReleaseTimeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceAutoReleaseTime(request *ModifyInstanceAutoR } // ModifyInstanceAutoReleaseTimeWithChan invokes the ecs.ModifyInstanceAutoReleaseTime API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceautoreleasetime.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceAutoReleaseTimeWithChan(request *ModifyInstanceAutoReleaseTimeRequest) (<-chan *ModifyInstanceAutoReleaseTimeResponse, <-chan error) { responseChan := make(chan *ModifyInstanceAutoReleaseTimeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceAutoReleaseTimeWithChan(request *ModifyInsta } // ModifyInstanceAutoReleaseTimeWithCallback invokes the ecs.ModifyInstanceAutoReleaseTime API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceautoreleasetime.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceAutoReleaseTimeWithCallback(request *ModifyInstanceAutoReleaseTimeRequest, callback func(response *ModifyInstanceAutoReleaseTimeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,11 @@ func (client *Client) ModifyInstanceAutoReleaseTimeWithCallback(request *ModifyI type ModifyInstanceAutoReleaseTimeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` AutoReleaseTime string `position:"Query" name:"AutoReleaseTime"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // ModifyInstanceAutoReleaseTimeResponse is the response struct for api ModifyInstanceAutoReleaseTime @@ -96,6 +91,7 @@ func CreateModifyInstanceAutoReleaseTimeRequest() (request *ModifyInstanceAutoRe RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceAutoReleaseTime", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_auto_renew_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_auto_renew_attribute.go index 3df2c793f..dfadf33b5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_auto_renew_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_auto_renew_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceAutoRenewAttribute invokes the ecs.ModifyInstanceAutoRenewAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceautorenewattribute.html func (client *Client) ModifyInstanceAutoRenewAttribute(request *ModifyInstanceAutoRenewAttributeRequest) (response *ModifyInstanceAutoRenewAttributeResponse, err error) { response = CreateModifyInstanceAutoRenewAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceAutoRenewAttribute(request *ModifyInstanceAu } // ModifyInstanceAutoRenewAttributeWithChan invokes the ecs.ModifyInstanceAutoRenewAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceautorenewattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceAutoRenewAttributeWithChan(request *ModifyInstanceAutoRenewAttributeRequest) (<-chan *ModifyInstanceAutoRenewAttributeResponse, <-chan error) { responseChan := make(chan *ModifyInstanceAutoRenewAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceAutoRenewAttributeWithChan(request *ModifyIn } // ModifyInstanceAutoRenewAttributeWithCallback invokes the ecs.ModifyInstanceAutoRenewAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstanceautorenewattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceAutoRenewAttributeWithCallback(request *ModifyInstanceAutoRenewAttributeRequest, callback func(response *ModifyInstanceAutoRenewAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,15 +71,15 @@ func (client *Client) ModifyInstanceAutoRenewAttributeWithCallback(request *Modi // ModifyInstanceAutoRenewAttributeRequest is the request struct for api ModifyInstanceAutoRenewAttribute type ModifyInstanceAutoRenewAttributeRequest struct { *requests.RpcRequest - Duration requests.Integer `position:"Query" name:"Duration"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Duration requests.Integer `position:"Query" name:"Duration"` + RenewalStatus string `position:"Query" name:"RenewalStatus"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` PeriodUnit string `position:"Query" name:"PeriodUnit"` InstanceId string `position:"Query" name:"InstanceId"` AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - RenewalStatus string `position:"Query" name:"RenewalStatus"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` } // ModifyInstanceAutoRenewAttributeResponse is the response struct for api ModifyInstanceAutoRenewAttribute @@ -99,6 +94,7 @@ func CreateModifyInstanceAutoRenewAttributeRequest() (request *ModifyInstanceAut RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceAutoRenewAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_charge_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_charge_type.go index 658fcdf61..79c71fc19 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_charge_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_charge_type.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceChargeType invokes the ecs.ModifyInstanceChargeType API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancechargetype.html func (client *Client) ModifyInstanceChargeType(request *ModifyInstanceChargeTypeRequest) (response *ModifyInstanceChargeTypeResponse, err error) { response = CreateModifyInstanceChargeTypeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceChargeType(request *ModifyInstanceChargeType } // ModifyInstanceChargeTypeWithChan invokes the ecs.ModifyInstanceChargeType API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancechargetype.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceChargeTypeWithChan(request *ModifyInstanceChargeTypeRequest) (<-chan *ModifyInstanceChargeTypeResponse, <-chan error) { responseChan := make(chan *ModifyInstanceChargeTypeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceChargeTypeWithChan(request *ModifyInstanceCh } // ModifyInstanceChargeTypeWithCallback invokes the ecs.ModifyInstanceChargeType API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancechargetype.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceChargeTypeWithCallback(request *ModifyInstanceChargeTypeRequest, callback func(response *ModifyInstanceChargeTypeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,24 +72,26 @@ func (client *Client) ModifyInstanceChargeTypeWithCallback(request *ModifyInstan type ModifyInstanceChargeTypeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + IsDetailFee requests.Boolean `position:"Query" name:"IsDetailFee"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` Period requests.Integer `position:"Query" name:"Period"` DryRun requests.Boolean `position:"Query" name:"DryRun"` AutoPay requests.Boolean `position:"Query" name:"AutoPay"` IncludeDataDisks requests.Boolean `position:"Query" name:"IncludeDataDisks"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ClientToken string `position:"Query" name:"ClientToken"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` PeriodUnit string `position:"Query" name:"PeriodUnit"` InstanceIds string `position:"Query" name:"InstanceIds"` - InstanceChargeType string `position:"Query" name:"InstanceChargeType"` } // ModifyInstanceChargeTypeResponse is the response struct for api ModifyInstanceChargeType type ModifyInstanceChargeTypeResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - OrderId string `json:"OrderId" xml:"OrderId"` + RequestId string `json:"RequestId" xml:"RequestId"` + OrderId string `json:"OrderId" xml:"OrderId"` + FeeOfInstances FeeOfInstancesInModifyInstanceChargeType `json:"FeeOfInstances" xml:"FeeOfInstances"` } // CreateModifyInstanceChargeTypeRequest creates a request to invoke ModifyInstanceChargeType API @@ -103,6 +100,7 @@ func CreateModifyInstanceChargeTypeRequest() (request *ModifyInstanceChargeTypeR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceChargeType", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_deployment.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_deployment.go index c2bf25eca..f64e7dbf9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_deployment.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_deployment.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceDeployment invokes the ecs.ModifyInstanceDeployment API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancedeployment.html func (client *Client) ModifyInstanceDeployment(request *ModifyInstanceDeploymentRequest) (response *ModifyInstanceDeploymentResponse, err error) { response = CreateModifyInstanceDeploymentResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceDeployment(request *ModifyInstanceDeployment } // ModifyInstanceDeploymentWithChan invokes the ecs.ModifyInstanceDeployment API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancedeployment.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceDeploymentWithChan(request *ModifyInstanceDeploymentRequest) (<-chan *ModifyInstanceDeploymentResponse, <-chan error) { responseChan := make(chan *ModifyInstanceDeploymentResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceDeploymentWithChan(request *ModifyInstanceDe } // ModifyInstanceDeploymentWithCallback invokes the ecs.ModifyInstanceDeployment API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancedeployment.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceDeploymentWithCallback(request *ModifyInstanceDeploymentRequest, callback func(response *ModifyInstanceDeploymentResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,14 +71,20 @@ func (client *Client) ModifyInstanceDeploymentWithCallback(request *ModifyInstan // ModifyInstanceDeploymentRequest is the request struct for api ModifyInstanceDeployment type ModifyInstanceDeploymentRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - DeploymentSetId string `position:"Query" name:"DeploymentSetId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - DedicatedHostId string `position:"Query" name:"DedicatedHostId"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - Force requests.Boolean `position:"Query" name:"Force"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + DeploymentSetGroupNo requests.Integer `position:"Query" name:"DeploymentSetGroupNo"` + DedicatedHostClusterId string `position:"Query" name:"DedicatedHostClusterId"` + InstanceType string `position:"Query" name:"InstanceType"` + DeploymentSetId string `position:"Query" name:"DeploymentSetId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + Tenancy string `position:"Query" name:"Tenancy"` + DedicatedHostId string `position:"Query" name:"DedicatedHostId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + Force requests.Boolean `position:"Query" name:"Force"` + MigrationType string `position:"Query" name:"MigrationType"` + Affinity string `position:"Query" name:"Affinity"` } // ModifyInstanceDeploymentResponse is the response struct for api ModifyInstanceDeployment @@ -98,6 +99,7 @@ func CreateModifyInstanceDeploymentRequest() (request *ModifyInstanceDeploymentR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceDeployment", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_maintenance_attributes.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_maintenance_attributes.go new file mode 100644 index 000000000..eb068e732 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_maintenance_attributes.go @@ -0,0 +1,112 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyInstanceMaintenanceAttributes invokes the ecs.ModifyInstanceMaintenanceAttributes API synchronously +func (client *Client) ModifyInstanceMaintenanceAttributes(request *ModifyInstanceMaintenanceAttributesRequest) (response *ModifyInstanceMaintenanceAttributesResponse, err error) { + response = CreateModifyInstanceMaintenanceAttributesResponse() + err = client.DoAction(request, response) + return +} + +// ModifyInstanceMaintenanceAttributesWithChan invokes the ecs.ModifyInstanceMaintenanceAttributes API asynchronously +func (client *Client) ModifyInstanceMaintenanceAttributesWithChan(request *ModifyInstanceMaintenanceAttributesRequest) (<-chan *ModifyInstanceMaintenanceAttributesResponse, <-chan error) { + responseChan := make(chan *ModifyInstanceMaintenanceAttributesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyInstanceMaintenanceAttributes(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyInstanceMaintenanceAttributesWithCallback invokes the ecs.ModifyInstanceMaintenanceAttributes API asynchronously +func (client *Client) ModifyInstanceMaintenanceAttributesWithCallback(request *ModifyInstanceMaintenanceAttributesRequest, callback func(response *ModifyInstanceMaintenanceAttributesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyInstanceMaintenanceAttributesResponse + var err error + defer close(result) + response, err = client.ModifyInstanceMaintenanceAttributes(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyInstanceMaintenanceAttributesRequest is the request struct for api ModifyInstanceMaintenanceAttributes +type ModifyInstanceMaintenanceAttributesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + MaintenanceWindow *[]ModifyInstanceMaintenanceAttributesMaintenanceWindow `position:"Query" name:"MaintenanceWindow" type:"Repeated"` + ActionOnMaintenance string `position:"Query" name:"ActionOnMaintenance"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + NotifyOnMaintenance requests.Boolean `position:"Query" name:"NotifyOnMaintenance"` +} + +// ModifyInstanceMaintenanceAttributesMaintenanceWindow is a repeated param struct in ModifyInstanceMaintenanceAttributesRequest +type ModifyInstanceMaintenanceAttributesMaintenanceWindow struct { + StartTime string `name:"StartTime"` + EndTime string `name:"EndTime"` +} + +// ModifyInstanceMaintenanceAttributesResponse is the response struct for api ModifyInstanceMaintenanceAttributes +type ModifyInstanceMaintenanceAttributesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyInstanceMaintenanceAttributesRequest creates a request to invoke ModifyInstanceMaintenanceAttributes API +func CreateModifyInstanceMaintenanceAttributesRequest() (request *ModifyInstanceMaintenanceAttributesRequest) { + request = &ModifyInstanceMaintenanceAttributesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceMaintenanceAttributes", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyInstanceMaintenanceAttributesResponse creates a response to parse from ModifyInstanceMaintenanceAttributes response +func CreateModifyInstanceMaintenanceAttributesResponse() (response *ModifyInstanceMaintenanceAttributesResponse) { + response = &ModifyInstanceMaintenanceAttributesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_metadata_options.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_metadata_options.go new file mode 100644 index 000000000..ef474d8c8 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_metadata_options.go @@ -0,0 +1,105 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyInstanceMetadataOptions invokes the ecs.ModifyInstanceMetadataOptions API synchronously +func (client *Client) ModifyInstanceMetadataOptions(request *ModifyInstanceMetadataOptionsRequest) (response *ModifyInstanceMetadataOptionsResponse, err error) { + response = CreateModifyInstanceMetadataOptionsResponse() + err = client.DoAction(request, response) + return +} + +// ModifyInstanceMetadataOptionsWithChan invokes the ecs.ModifyInstanceMetadataOptions API asynchronously +func (client *Client) ModifyInstanceMetadataOptionsWithChan(request *ModifyInstanceMetadataOptionsRequest) (<-chan *ModifyInstanceMetadataOptionsResponse, <-chan error) { + responseChan := make(chan *ModifyInstanceMetadataOptionsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyInstanceMetadataOptions(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyInstanceMetadataOptionsWithCallback invokes the ecs.ModifyInstanceMetadataOptions API asynchronously +func (client *Client) ModifyInstanceMetadataOptionsWithCallback(request *ModifyInstanceMetadataOptionsRequest, callback func(response *ModifyInstanceMetadataOptionsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyInstanceMetadataOptionsResponse + var err error + defer close(result) + response, err = client.ModifyInstanceMetadataOptions(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyInstanceMetadataOptionsRequest is the request struct for api ModifyInstanceMetadataOptions +type ModifyInstanceMetadataOptionsRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + HttpPutResponseHopLimit requests.Integer `position:"Query" name:"HttpPutResponseHopLimit"` + HttpEndpoint string `position:"Query" name:"HttpEndpoint"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + HttpTokens string `position:"Query" name:"HttpTokens"` +} + +// ModifyInstanceMetadataOptionsResponse is the response struct for api ModifyInstanceMetadataOptions +type ModifyInstanceMetadataOptionsResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyInstanceMetadataOptionsRequest creates a request to invoke ModifyInstanceMetadataOptions API +func CreateModifyInstanceMetadataOptionsRequest() (request *ModifyInstanceMetadataOptionsRequest) { + request = &ModifyInstanceMetadataOptionsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceMetadataOptions", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyInstanceMetadataOptionsResponse creates a response to parse from ModifyInstanceMetadataOptions response +func CreateModifyInstanceMetadataOptionsResponse() (response *ModifyInstanceMetadataOptionsResponse) { + response = &ModifyInstanceMetadataOptionsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_network_spec.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_network_spec.go index cf4c68318..956e5eb15 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_network_spec.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_network_spec.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceNetworkSpec invokes the ecs.ModifyInstanceNetworkSpec API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancenetworkspec.html func (client *Client) ModifyInstanceNetworkSpec(request *ModifyInstanceNetworkSpecRequest) (response *ModifyInstanceNetworkSpecResponse, err error) { response = CreateModifyInstanceNetworkSpecResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceNetworkSpec(request *ModifyInstanceNetworkSp } // ModifyInstanceNetworkSpecWithChan invokes the ecs.ModifyInstanceNetworkSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancenetworkspec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceNetworkSpecWithChan(request *ModifyInstanceNetworkSpecRequest) (<-chan *ModifyInstanceNetworkSpecResponse, <-chan error) { responseChan := make(chan *ModifyInstanceNetworkSpecResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceNetworkSpecWithChan(request *ModifyInstanceN } // ModifyInstanceNetworkSpecWithCallback invokes the ecs.ModifyInstanceNetworkSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancenetworkspec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceNetworkSpecWithCallback(request *ModifyInstanceNetworkSpecRequest, callback func(response *ModifyInstanceNetworkSpecResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,14 @@ func (client *Client) ModifyInstanceNetworkSpecWithCallback(request *ModifyInsta type ModifyInstanceNetworkSpecRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + ISP string `position:"Query" name:"ISP"` + InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` + StartTime string `position:"Query" name:"StartTime"` AutoPay requests.Boolean `position:"Query" name:"AutoPay"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ClientToken string `position:"Query" name:"ClientToken"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` EndTime string `position:"Query" name:"EndTime"` - StartTime string `position:"Query" name:"StartTime"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` InstanceId string `position:"Query" name:"InstanceId"` NetworkChargeType string `position:"Query" name:"NetworkChargeType"` @@ -104,6 +100,7 @@ func CreateModifyInstanceNetworkSpecRequest() (request *ModifyInstanceNetworkSpe RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceNetworkSpec", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_spec.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_spec.go index b6d1e7b31..99e0fc8e7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_spec.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_spec.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceSpec invokes the ecs.ModifyInstanceSpec API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancespec.html func (client *Client) ModifyInstanceSpec(request *ModifyInstanceSpecRequest) (response *ModifyInstanceSpecResponse, err error) { response = CreateModifyInstanceSpecResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceSpec(request *ModifyInstanceSpecRequest) (re } // ModifyInstanceSpecWithChan invokes the ecs.ModifyInstanceSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancespec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceSpecWithChan(request *ModifyInstanceSpecRequest) (<-chan *ModifyInstanceSpecResponse, <-chan error) { responseChan := make(chan *ModifyInstanceSpecResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceSpecWithChan(request *ModifyInstanceSpecRequ } // ModifyInstanceSpecWithCallback invokes the ecs.ModifyInstanceSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancespec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceSpecWithCallback(request *ModifyInstanceSpecRequest, callback func(response *ModifyInstanceSpecResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,19 +72,19 @@ func (client *Client) ModifyInstanceSpecWithCallback(request *ModifyInstanceSpec type ModifyInstanceSpecRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` AllowMigrateAcrossZone requests.Boolean `position:"Query" name:"AllowMigrateAcrossZone"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` + SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` + InstanceType string `position:"Query" name:"InstanceType"` + TemporaryEndTime string `position:"Query" name:"Temporary.EndTime"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` TemporaryInternetMaxBandwidthOut requests.Integer `position:"Query" name:"Temporary.InternetMaxBandwidthOut"` - SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` TemporaryStartTime string `position:"Query" name:"Temporary.StartTime"` Async requests.Boolean `position:"Query" name:"Async"` InstanceId string `position:"Query" name:"InstanceId"` - InstanceType string `position:"Query" name:"InstanceType"` - TemporaryEndTime string `position:"Query" name:"Temporary.EndTime"` InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` } @@ -105,6 +100,7 @@ func CreateModifyInstanceSpecRequest() (request *ModifyInstanceSpecRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceSpec", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_vnc_passwd.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_vnc_passwd.go index dcc971aa4..0a77cc7be 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_vnc_passwd.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_vnc_passwd.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceVncPasswd invokes the ecs.ModifyInstanceVncPasswd API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancevncpasswd.html func (client *Client) ModifyInstanceVncPasswd(request *ModifyInstanceVncPasswdRequest) (response *ModifyInstanceVncPasswdResponse, err error) { response = CreateModifyInstanceVncPasswdResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceVncPasswd(request *ModifyInstanceVncPasswdRe } // ModifyInstanceVncPasswdWithChan invokes the ecs.ModifyInstanceVncPasswd API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancevncpasswd.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceVncPasswdWithChan(request *ModifyInstanceVncPasswdRequest) (<-chan *ModifyInstanceVncPasswdResponse, <-chan error) { responseChan := make(chan *ModifyInstanceVncPasswdResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceVncPasswdWithChan(request *ModifyInstanceVnc } // ModifyInstanceVncPasswdWithCallback invokes the ecs.ModifyInstanceVncPasswd API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancevncpasswd.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceVncPasswdWithCallback(request *ModifyInstanceVncPasswdRequest, callback func(response *ModifyInstanceVncPasswdResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) ModifyInstanceVncPasswdWithCallback(request *ModifyInstanc type ModifyInstanceVncPasswdRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` VncPassword string `position:"Query" name:"VncPassword"` } @@ -96,6 +91,7 @@ func CreateModifyInstanceVncPasswdRequest() (request *ModifyInstanceVncPasswdReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceVncPasswd", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_vpc_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_vpc_attribute.go index 6c4e510f8..55c4d6a1b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_vpc_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_instance_vpc_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyInstanceVpcAttribute invokes the ecs.ModifyInstanceVpcAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancevpcattribute.html func (client *Client) ModifyInstanceVpcAttribute(request *ModifyInstanceVpcAttributeRequest) (response *ModifyInstanceVpcAttributeResponse, err error) { response = CreateModifyInstanceVpcAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyInstanceVpcAttribute(request *ModifyInstanceVpcAttri } // ModifyInstanceVpcAttributeWithChan invokes the ecs.ModifyInstanceVpcAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancevpcattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceVpcAttributeWithChan(request *ModifyInstanceVpcAttributeRequest) (<-chan *ModifyInstanceVpcAttributeResponse, <-chan error) { responseChan := make(chan *ModifyInstanceVpcAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyInstanceVpcAttributeWithChan(request *ModifyInstance } // ModifyInstanceVpcAttributeWithCallback invokes the ecs.ModifyInstanceVpcAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyinstancevpcattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyInstanceVpcAttributeWithCallback(request *ModifyInstanceVpcAttributeRequest, callback func(response *ModifyInstanceVpcAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,13 +71,15 @@ func (client *Client) ModifyInstanceVpcAttributeWithCallback(request *ModifyInst // ModifyInstanceVpcAttributeRequest is the request struct for api ModifyInstanceVpcAttribute type ModifyInstanceVpcAttributeRequest struct { *requests.RpcRequest - VSwitchId string `position:"Query" name:"VSwitchId"` - PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + SecurityGroupId *[]string `position:"Query" name:"SecurityGroupId" type:"Repeated"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` + PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` + InstanceId string `position:"Query" name:"InstanceId"` + VpcId string `position:"Query" name:"VpcId"` } // ModifyInstanceVpcAttributeResponse is the response struct for api ModifyInstanceVpcAttribute @@ -97,6 +94,7 @@ func CreateModifyInstanceVpcAttributeRequest() (request *ModifyInstanceVpcAttrib RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyInstanceVpcAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_launch_template_default_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_launch_template_default_version.go index ddb4db403..8d2015814 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_launch_template_default_version.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_launch_template_default_version.go @@ -21,7 +21,6 @@ import ( ) // ModifyLaunchTemplateDefaultVersion invokes the ecs.ModifyLaunchTemplateDefaultVersion API synchronously -// api document: https://help.aliyun.com/api/ecs/modifylaunchtemplatedefaultversion.html func (client *Client) ModifyLaunchTemplateDefaultVersion(request *ModifyLaunchTemplateDefaultVersionRequest) (response *ModifyLaunchTemplateDefaultVersionResponse, err error) { response = CreateModifyLaunchTemplateDefaultVersionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyLaunchTemplateDefaultVersion(request *ModifyLaunchTe } // ModifyLaunchTemplateDefaultVersionWithChan invokes the ecs.ModifyLaunchTemplateDefaultVersion API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifylaunchtemplatedefaultversion.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyLaunchTemplateDefaultVersionWithChan(request *ModifyLaunchTemplateDefaultVersionRequest) (<-chan *ModifyLaunchTemplateDefaultVersionResponse, <-chan error) { responseChan := make(chan *ModifyLaunchTemplateDefaultVersionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyLaunchTemplateDefaultVersionWithChan(request *Modify } // ModifyLaunchTemplateDefaultVersionWithCallback invokes the ecs.ModifyLaunchTemplateDefaultVersion API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifylaunchtemplatedefaultversion.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyLaunchTemplateDefaultVersionWithCallback(request *ModifyLaunchTemplateDefaultVersionRequest, callback func(response *ModifyLaunchTemplateDefaultVersionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -97,6 +92,7 @@ func CreateModifyLaunchTemplateDefaultVersionRequest() (request *ModifyLaunchTem RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyLaunchTemplateDefaultVersion", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_managed_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_managed_instance.go new file mode 100644 index 000000000..da4cd7cf8 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_managed_instance.go @@ -0,0 +1,105 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyManagedInstance invokes the ecs.ModifyManagedInstance API synchronously +func (client *Client) ModifyManagedInstance(request *ModifyManagedInstanceRequest) (response *ModifyManagedInstanceResponse, err error) { + response = CreateModifyManagedInstanceResponse() + err = client.DoAction(request, response) + return +} + +// ModifyManagedInstanceWithChan invokes the ecs.ModifyManagedInstance API asynchronously +func (client *Client) ModifyManagedInstanceWithChan(request *ModifyManagedInstanceRequest) (<-chan *ModifyManagedInstanceResponse, <-chan error) { + responseChan := make(chan *ModifyManagedInstanceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyManagedInstance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyManagedInstanceWithCallback invokes the ecs.ModifyManagedInstance API asynchronously +func (client *Client) ModifyManagedInstanceWithCallback(request *ModifyManagedInstanceRequest, callback func(response *ModifyManagedInstanceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyManagedInstanceResponse + var err error + defer close(result) + response, err = client.ModifyManagedInstance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyManagedInstanceRequest is the request struct for api ModifyManagedInstance +type ModifyManagedInstanceRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + InstanceName string `position:"Query" name:"InstanceName"` +} + +// ModifyManagedInstanceResponse is the response struct for api ModifyManagedInstance +type ModifyManagedInstanceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Instance Instance `json:"Instance" xml:"Instance"` +} + +// CreateModifyManagedInstanceRequest creates a request to invoke ModifyManagedInstance API +func CreateModifyManagedInstanceRequest() (request *ModifyManagedInstanceRequest) { + request = &ModifyManagedInstanceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyManagedInstance", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyManagedInstanceResponse creates a response to parse from ModifyManagedInstance response +func CreateModifyManagedInstanceResponse() (response *ModifyManagedInstanceResponse) { + response = &ModifyManagedInstanceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_network_interface_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_network_interface_attribute.go index 81620cc00..9565bb249 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_network_interface_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_network_interface_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyNetworkInterfaceAttribute invokes the ecs.ModifyNetworkInterfaceAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifynetworkinterfaceattribute.html func (client *Client) ModifyNetworkInterfaceAttribute(request *ModifyNetworkInterfaceAttributeRequest) (response *ModifyNetworkInterfaceAttributeResponse, err error) { response = CreateModifyNetworkInterfaceAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyNetworkInterfaceAttribute(request *ModifyNetworkInte } // ModifyNetworkInterfaceAttributeWithChan invokes the ecs.ModifyNetworkInterfaceAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifynetworkinterfaceattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyNetworkInterfaceAttributeWithChan(request *ModifyNetworkInterfaceAttributeRequest) (<-chan *ModifyNetworkInterfaceAttributeResponse, <-chan error) { responseChan := make(chan *ModifyNetworkInterfaceAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyNetworkInterfaceAttributeWithChan(request *ModifyNet } // ModifyNetworkInterfaceAttributeWithCallback invokes the ecs.ModifyNetworkInterfaceAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifynetworkinterfaceattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyNetworkInterfaceAttributeWithCallback(request *ModifyNetworkInterfaceAttributeRequest, callback func(response *ModifyNetworkInterfaceAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,6 +71,7 @@ func (client *Client) ModifyNetworkInterfaceAttributeWithCallback(request *Modif // ModifyNetworkInterfaceAttributeRequest is the request struct for api ModifyNetworkInterfaceAttribute type ModifyNetworkInterfaceAttributeRequest struct { *requests.RpcRequest + QueueNumber requests.Integer `position:"Query" name:"QueueNumber"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` SecurityGroupId *[]string `position:"Query" name:"SecurityGroupId" type:"Repeated"` Description string `position:"Query" name:"Description"` @@ -98,6 +94,7 @@ func CreateModifyNetworkInterfaceAttributeRequest() (request *ModifyNetworkInter RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyNetworkInterfaceAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_physical_connection_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_physical_connection_attribute.go index 728bde2ca..667ba56a7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_physical_connection_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_physical_connection_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyPhysicalConnectionAttribute invokes the ecs.ModifyPhysicalConnectionAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyphysicalconnectionattribute.html func (client *Client) ModifyPhysicalConnectionAttribute(request *ModifyPhysicalConnectionAttributeRequest) (response *ModifyPhysicalConnectionAttributeResponse, err error) { response = CreateModifyPhysicalConnectionAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyPhysicalConnectionAttribute(request *ModifyPhysicalC } // ModifyPhysicalConnectionAttributeWithChan invokes the ecs.ModifyPhysicalConnectionAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyphysicalconnectionattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyPhysicalConnectionAttributeWithChan(request *ModifyPhysicalConnectionAttributeRequest) (<-chan *ModifyPhysicalConnectionAttributeResponse, <-chan error) { responseChan := make(chan *ModifyPhysicalConnectionAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyPhysicalConnectionAttributeWithChan(request *ModifyP } // ModifyPhysicalConnectionAttributeWithCallback invokes the ecs.ModifyPhysicalConnectionAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyphysicalconnectionattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyPhysicalConnectionAttributeWithCallback(request *ModifyPhysicalConnectionAttributeRequest, callback func(response *ModifyPhysicalConnectionAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,21 +71,21 @@ func (client *Client) ModifyPhysicalConnectionAttributeWithCallback(request *Mod // ModifyPhysicalConnectionAttributeRequest is the request struct for api ModifyPhysicalConnectionAttribute type ModifyPhysicalConnectionAttributeRequest struct { *requests.RpcRequest - RedundantPhysicalConnectionId string `position:"Query" name:"RedundantPhysicalConnectionId"` - PeerLocation string `position:"Query" name:"PeerLocation"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` PortType string `position:"Query" name:"PortType"` CircuitCode string `position:"Query" name:"CircuitCode"` - Bandwidth requests.Integer `position:"Query" name:"bandwidth"` ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + UserCidr string `position:"Query" name:"UserCidr"` + RedundantPhysicalConnectionId string `position:"Query" name:"RedundantPhysicalConnectionId"` + PeerLocation string `position:"Query" name:"PeerLocation"` + Bandwidth requests.Integer `position:"Query" name:"bandwidth"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - Description string `position:"Query" name:"Description"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` LineOperator string `position:"Query" name:"LineOperator"` PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` Name string `position:"Query" name:"Name"` - UserCidr string `position:"Query" name:"UserCidr"` } // ModifyPhysicalConnectionAttributeResponse is the response struct for api ModifyPhysicalConnectionAttribute @@ -105,6 +100,7 @@ func CreateModifyPhysicalConnectionAttributeRequest() (request *ModifyPhysicalCo RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyPhysicalConnectionAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_prepay_instance_spec.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_prepay_instance_spec.go index 4bdf8234e..3e2c9586d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_prepay_instance_spec.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_prepay_instance_spec.go @@ -21,7 +21,6 @@ import ( ) // ModifyPrepayInstanceSpec invokes the ecs.ModifyPrepayInstanceSpec API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyprepayinstancespec.html func (client *Client) ModifyPrepayInstanceSpec(request *ModifyPrepayInstanceSpecRequest) (response *ModifyPrepayInstanceSpecResponse, err error) { response = CreateModifyPrepayInstanceSpecResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyPrepayInstanceSpec(request *ModifyPrepayInstanceSpec } // ModifyPrepayInstanceSpecWithChan invokes the ecs.ModifyPrepayInstanceSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyprepayinstancespec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyPrepayInstanceSpecWithChan(request *ModifyPrepayInstanceSpecRequest) (<-chan *ModifyPrepayInstanceSpecResponse, <-chan error) { responseChan := make(chan *ModifyPrepayInstanceSpecResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyPrepayInstanceSpecWithChan(request *ModifyPrepayInst } // ModifyPrepayInstanceSpecWithCallback invokes the ecs.ModifyPrepayInstanceSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyprepayinstancespec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyPrepayInstanceSpecWithCallback(request *ModifyPrepayInstanceSpecRequest, callback func(response *ModifyPrepayInstanceSpecResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,16 +72,19 @@ func (client *Client) ModifyPrepayInstanceSpecWithCallback(request *ModifyPrepay type ModifyPrepayInstanceSpecRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - AutoPay requests.Boolean `position:"Query" name:"AutoPay"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` OperatorType string `position:"Query" name:"OperatorType"` SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` - InstanceId string `position:"Query" name:"InstanceId"` + RebootTime string `position:"Query" name:"RebootTime"` MigrateAcrossZone requests.Boolean `position:"Query" name:"MigrateAcrossZone"` InstanceType string `position:"Query" name:"InstanceType"` + AutoPay requests.Boolean `position:"Query" name:"AutoPay"` + RebootWhenFinished requests.Boolean `position:"Query" name:"RebootWhenFinished"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + EndTime string `position:"Query" name:"EndTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // ModifyPrepayInstanceSpecResponse is the response struct for api ModifyPrepayInstanceSpec @@ -102,6 +100,7 @@ func CreateModifyPrepayInstanceSpecRequest() (request *ModifyPrepayInstanceSpecR RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyPrepayInstanceSpec", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_reserved_instance_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_reserved_instance_attribute.go new file mode 100644 index 000000000..9de265f4f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_reserved_instance_attribute.go @@ -0,0 +1,108 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyReservedInstanceAttribute invokes the ecs.ModifyReservedInstanceAttribute API synchronously +func (client *Client) ModifyReservedInstanceAttribute(request *ModifyReservedInstanceAttributeRequest) (response *ModifyReservedInstanceAttributeResponse, err error) { + response = CreateModifyReservedInstanceAttributeResponse() + err = client.DoAction(request, response) + return +} + +// ModifyReservedInstanceAttributeWithChan invokes the ecs.ModifyReservedInstanceAttribute API asynchronously +func (client *Client) ModifyReservedInstanceAttributeWithChan(request *ModifyReservedInstanceAttributeRequest) (<-chan *ModifyReservedInstanceAttributeResponse, <-chan error) { + responseChan := make(chan *ModifyReservedInstanceAttributeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyReservedInstanceAttribute(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyReservedInstanceAttributeWithCallback invokes the ecs.ModifyReservedInstanceAttribute API asynchronously +func (client *Client) ModifyReservedInstanceAttributeWithCallback(request *ModifyReservedInstanceAttributeRequest, callback func(response *ModifyReservedInstanceAttributeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyReservedInstanceAttributeResponse + var err error + defer close(result) + response, err = client.ModifyReservedInstanceAttribute(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyReservedInstanceAttributeRequest is the request struct for api ModifyReservedInstanceAttribute +type ModifyReservedInstanceAttributeRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ReservedInstanceId string `position:"Query" name:"ReservedInstanceId"` + ReservedInstanceName string `position:"Query" name:"ReservedInstanceName"` +} + +// ModifyReservedInstanceAttributeResponse is the response struct for api ModifyReservedInstanceAttribute +type ModifyReservedInstanceAttributeResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + HttpStatusCode int `json:"HttpStatusCode" xml:"HttpStatusCode"` +} + +// CreateModifyReservedInstanceAttributeRequest creates a request to invoke ModifyReservedInstanceAttribute API +func CreateModifyReservedInstanceAttributeRequest() (request *ModifyReservedInstanceAttributeRequest) { + request = &ModifyReservedInstanceAttributeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyReservedInstanceAttribute", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyReservedInstanceAttributeResponse creates a response to parse from ModifyReservedInstanceAttribute response +func CreateModifyReservedInstanceAttributeResponse() (response *ModifyReservedInstanceAttributeResponse) { + response = &ModifyReservedInstanceAttributeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_reserved_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_reserved_instances.go index 29c4ca392..23dd74f67 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_reserved_instances.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_reserved_instances.go @@ -21,7 +21,6 @@ import ( ) // ModifyReservedInstances invokes the ecs.ModifyReservedInstances API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyreservedinstances.html func (client *Client) ModifyReservedInstances(request *ModifyReservedInstancesRequest) (response *ModifyReservedInstancesResponse, err error) { response = CreateModifyReservedInstancesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyReservedInstances(request *ModifyReservedInstancesRe } // ModifyReservedInstancesWithChan invokes the ecs.ModifyReservedInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyreservedinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyReservedInstancesWithChan(request *ModifyReservedInstancesRequest) (<-chan *ModifyReservedInstancesResponse, <-chan error) { responseChan := make(chan *ModifyReservedInstancesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyReservedInstancesWithChan(request *ModifyReservedIns } // ModifyReservedInstancesWithCallback invokes the ecs.ModifyReservedInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyreservedinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyReservedInstancesWithCallback(request *ModifyReservedInstancesRequest, callback func(response *ModifyReservedInstancesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -106,6 +101,7 @@ func CreateModifyReservedInstancesRequest() (request *ModifyReservedInstancesReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyReservedInstances", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_router_interface_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_router_interface_attribute.go index db09fb58a..5ae2eaf20 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_router_interface_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_router_interface_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyRouterInterfaceAttribute invokes the ecs.ModifyRouterInterfaceAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyrouterinterfaceattribute.html func (client *Client) ModifyRouterInterfaceAttribute(request *ModifyRouterInterfaceAttributeRequest) (response *ModifyRouterInterfaceAttributeResponse, err error) { response = CreateModifyRouterInterfaceAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyRouterInterfaceAttribute(request *ModifyRouterInterf } // ModifyRouterInterfaceAttributeWithChan invokes the ecs.ModifyRouterInterfaceAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyrouterinterfaceattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyRouterInterfaceAttributeWithChan(request *ModifyRouterInterfaceAttributeRequest) (<-chan *ModifyRouterInterfaceAttributeResponse, <-chan error) { responseChan := make(chan *ModifyRouterInterfaceAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyRouterInterfaceAttributeWithChan(request *ModifyRout } // ModifyRouterInterfaceAttributeWithCallback invokes the ecs.ModifyRouterInterfaceAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyrouterinterfaceattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyRouterInterfaceAttributeWithCallback(request *ModifyRouterInterfaceAttributeRequest, callback func(response *ModifyRouterInterfaceAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,16 +73,16 @@ type ModifyRouterInterfaceAttributeRequest struct { *requests.RpcRequest OppositeRouterId string `position:"Query" name:"OppositeRouterId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` Description string `position:"Query" name:"Description"` HealthCheckTargetIp string `position:"Query" name:"HealthCheckTargetIp"` + OppositeInterfaceId string `position:"Query" name:"OppositeInterfaceId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` RouterInterfaceId string `position:"Query" name:"RouterInterfaceId"` OppositeInterfaceOwnerId requests.Integer `position:"Query" name:"OppositeInterfaceOwnerId"` HealthCheckSourceIp string `position:"Query" name:"HealthCheckSourceIp"` Name string `position:"Query" name:"Name"` OppositeRouterType string `position:"Query" name:"OppositeRouterType"` - OppositeInterfaceId string `position:"Query" name:"OppositeInterfaceId"` } // ModifyRouterInterfaceAttributeResponse is the response struct for api ModifyRouterInterfaceAttribute @@ -102,6 +97,7 @@ func CreateModifyRouterInterfaceAttributeRequest() (request *ModifyRouterInterfa RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyRouterInterfaceAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_router_interface_spec.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_router_interface_spec.go index 044e5e91a..5f02a51ad 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_router_interface_spec.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_router_interface_spec.go @@ -21,7 +21,6 @@ import ( ) // ModifyRouterInterfaceSpec invokes the ecs.ModifyRouterInterfaceSpec API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyrouterinterfacespec.html func (client *Client) ModifyRouterInterfaceSpec(request *ModifyRouterInterfaceSpecRequest) (response *ModifyRouterInterfaceSpecResponse, err error) { response = CreateModifyRouterInterfaceSpecResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyRouterInterfaceSpec(request *ModifyRouterInterfaceSp } // ModifyRouterInterfaceSpecWithChan invokes the ecs.ModifyRouterInterfaceSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyrouterinterfacespec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyRouterInterfaceSpecWithChan(request *ModifyRouterInterfaceSpecRequest) (<-chan *ModifyRouterInterfaceSpecResponse, <-chan error) { responseChan := make(chan *ModifyRouterInterfaceSpecResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyRouterInterfaceSpecWithChan(request *ModifyRouterInt } // ModifyRouterInterfaceSpecWithCallback invokes the ecs.ModifyRouterInterfaceSpec API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyrouterinterfacespec.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyRouterInterfaceSpecWithCallback(request *ModifyRouterInterfaceSpecRequest, callback func(response *ModifyRouterInterfaceSpecResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,13 @@ func (client *Client) ModifyRouterInterfaceSpecWithCallback(request *ModifyRoute type ModifyRouterInterfaceSpecRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` + Spec string `position:"Query" name:"Spec"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` RouterInterfaceId string `position:"Query" name:"RouterInterfaceId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - Spec string `position:"Query" name:"Spec"` } // ModifyRouterInterfaceSpecResponse is the response struct for api ModifyRouterInterfaceSpec @@ -99,6 +94,7 @@ func CreateModifyRouterInterfaceSpecRequest() (request *ModifyRouterInterfaceSpe RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyRouterInterfaceSpec", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_attribute.go index 4f01612db..179586517 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifySecurityGroupAttribute invokes the ecs.ModifySecurityGroupAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygroupattribute.html func (client *Client) ModifySecurityGroupAttribute(request *ModifySecurityGroupAttributeRequest) (response *ModifySecurityGroupAttributeResponse, err error) { response = CreateModifySecurityGroupAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifySecurityGroupAttribute(request *ModifySecurityGroupA } // ModifySecurityGroupAttributeWithChan invokes the ecs.ModifySecurityGroupAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygroupattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySecurityGroupAttributeWithChan(request *ModifySecurityGroupAttributeRequest) (<-chan *ModifySecurityGroupAttributeResponse, <-chan error) { responseChan := make(chan *ModifySecurityGroupAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifySecurityGroupAttributeWithChan(request *ModifySecuri } // ModifySecurityGroupAttributeWithCallback invokes the ecs.ModifySecurityGroupAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygroupattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySecurityGroupAttributeWithCallback(request *ModifySecurityGroupAttributeRequest, callback func(response *ModifySecurityGroupAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) ModifySecurityGroupAttributeWithCallback(request *ModifySe type ModifySecurityGroupAttributeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` SecurityGroupId string `position:"Query" name:"SecurityGroupId"` Description string `position:"Query" name:"Description"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` SecurityGroupName string `position:"Query" name:"SecurityGroupName"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` } // ModifySecurityGroupAttributeResponse is the response struct for api ModifySecurityGroupAttribute @@ -97,6 +92,7 @@ func CreateModifySecurityGroupAttributeRequest() (request *ModifySecurityGroupAt RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifySecurityGroupAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_egress_rule.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_egress_rule.go index 5b1bb177e..7b5a87215 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_egress_rule.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_egress_rule.go @@ -21,7 +21,6 @@ import ( ) // ModifySecurityGroupEgressRule invokes the ecs.ModifySecurityGroupEgressRule API synchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygroupegressrule.html func (client *Client) ModifySecurityGroupEgressRule(request *ModifySecurityGroupEgressRuleRequest) (response *ModifySecurityGroupEgressRuleResponse, err error) { response = CreateModifySecurityGroupEgressRuleResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifySecurityGroupEgressRule(request *ModifySecurityGroup } // ModifySecurityGroupEgressRuleWithChan invokes the ecs.ModifySecurityGroupEgressRule API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygroupegressrule.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySecurityGroupEgressRuleWithChan(request *ModifySecurityGroupEgressRuleRequest) (<-chan *ModifySecurityGroupEgressRuleResponse, <-chan error) { responseChan := make(chan *ModifySecurityGroupEgressRuleResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifySecurityGroupEgressRuleWithChan(request *ModifySecur } // ModifySecurityGroupEgressRuleWithCallback invokes the ecs.ModifySecurityGroupEgressRule API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygroupegressrule.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySecurityGroupEgressRuleWithCallback(request *ModifySecurityGroupEgressRuleRequest, callback func(response *ModifySecurityGroupEgressRuleResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -110,6 +105,7 @@ func CreateModifySecurityGroupEgressRuleRequest() (request *ModifySecurityGroupE RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifySecurityGroupEgressRule", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_policy.go index e9eeaed84..9f045fe69 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_policy.go @@ -21,7 +21,6 @@ import ( ) // ModifySecurityGroupPolicy invokes the ecs.ModifySecurityGroupPolicy API synchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygrouppolicy.html func (client *Client) ModifySecurityGroupPolicy(request *ModifySecurityGroupPolicyRequest) (response *ModifySecurityGroupPolicyResponse, err error) { response = CreateModifySecurityGroupPolicyResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifySecurityGroupPolicy(request *ModifySecurityGroupPoli } // ModifySecurityGroupPolicyWithChan invokes the ecs.ModifySecurityGroupPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygrouppolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySecurityGroupPolicyWithChan(request *ModifySecurityGroupPolicyRequest) (<-chan *ModifySecurityGroupPolicyResponse, <-chan error) { responseChan := make(chan *ModifySecurityGroupPolicyResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifySecurityGroupPolicyWithChan(request *ModifySecurityG } // ModifySecurityGroupPolicyWithCallback invokes the ecs.ModifySecurityGroupPolicy API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygrouppolicy.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySecurityGroupPolicyWithCallback(request *ModifySecurityGroupPolicyRequest, callback func(response *ModifySecurityGroupPolicyResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,11 +73,11 @@ type ModifySecurityGroupPolicyRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ClientToken string `position:"Query" name:"ClientToken"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + InnerAccessPolicy string `position:"Query" name:"InnerAccessPolicy"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - InnerAccessPolicy string `position:"Query" name:"InnerAccessPolicy"` } // ModifySecurityGroupPolicyResponse is the response struct for api ModifySecurityGroupPolicy @@ -97,6 +92,7 @@ func CreateModifySecurityGroupPolicyRequest() (request *ModifySecurityGroupPolic RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifySecurityGroupPolicy", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_rule.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_rule.go index d298fb817..0ea833794 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_rule.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_security_group_rule.go @@ -21,7 +21,6 @@ import ( ) // ModifySecurityGroupRule invokes the ecs.ModifySecurityGroupRule API synchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygrouprule.html func (client *Client) ModifySecurityGroupRule(request *ModifySecurityGroupRuleRequest) (response *ModifySecurityGroupRuleResponse, err error) { response = CreateModifySecurityGroupRuleResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifySecurityGroupRule(request *ModifySecurityGroupRuleRe } // ModifySecurityGroupRuleWithChan invokes the ecs.ModifySecurityGroupRule API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygrouprule.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySecurityGroupRuleWithChan(request *ModifySecurityGroupRuleRequest) (<-chan *ModifySecurityGroupRuleResponse, <-chan error) { responseChan := make(chan *ModifySecurityGroupRuleResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifySecurityGroupRuleWithChan(request *ModifySecurityGro } // ModifySecurityGroupRuleWithCallback invokes the ecs.ModifySecurityGroupRule API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysecuritygrouprule.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySecurityGroupRuleWithCallback(request *ModifySecurityGroupRuleRequest, callback func(response *ModifySecurityGroupRuleResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -110,6 +105,7 @@ func CreateModifySecurityGroupRuleRequest() (request *ModifySecurityGroupRuleReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifySecurityGroupRule", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_snapshot_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_snapshot_attribute.go index 3b1796388..572e86c14 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_snapshot_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_snapshot_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifySnapshotAttribute invokes the ecs.ModifySnapshotAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifysnapshotattribute.html func (client *Client) ModifySnapshotAttribute(request *ModifySnapshotAttributeRequest) (response *ModifySnapshotAttributeResponse, err error) { response = CreateModifySnapshotAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifySnapshotAttribute(request *ModifySnapshotAttributeRe } // ModifySnapshotAttributeWithChan invokes the ecs.ModifySnapshotAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysnapshotattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySnapshotAttributeWithChan(request *ModifySnapshotAttributeRequest) (<-chan *ModifySnapshotAttributeResponse, <-chan error) { responseChan := make(chan *ModifySnapshotAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifySnapshotAttributeWithChan(request *ModifySnapshotAtt } // ModifySnapshotAttributeWithCallback invokes the ecs.ModifySnapshotAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifysnapshotattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifySnapshotAttributeWithCallback(request *ModifySnapshotAttributeRequest, callback func(response *ModifySnapshotAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,11 +73,12 @@ type ModifySnapshotAttributeRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` SnapshotId string `position:"Query" name:"SnapshotId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` SnapshotName string `position:"Query" name:"SnapshotName"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + DisableInstantAccess requests.Boolean `position:"Query" name:"DisableInstantAccess"` } // ModifySnapshotAttributeResponse is the response struct for api ModifySnapshotAttribute @@ -97,6 +93,7 @@ func CreateModifySnapshotAttributeRequest() (request *ModifySnapshotAttributeReq RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifySnapshotAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_snapshot_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_snapshot_group.go new file mode 100644 index 000000000..50398fdb7 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_snapshot_group.go @@ -0,0 +1,105 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifySnapshotGroup invokes the ecs.ModifySnapshotGroup API synchronously +func (client *Client) ModifySnapshotGroup(request *ModifySnapshotGroupRequest) (response *ModifySnapshotGroupResponse, err error) { + response = CreateModifySnapshotGroupResponse() + err = client.DoAction(request, response) + return +} + +// ModifySnapshotGroupWithChan invokes the ecs.ModifySnapshotGroup API asynchronously +func (client *Client) ModifySnapshotGroupWithChan(request *ModifySnapshotGroupRequest) (<-chan *ModifySnapshotGroupResponse, <-chan error) { + responseChan := make(chan *ModifySnapshotGroupResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifySnapshotGroup(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifySnapshotGroupWithCallback invokes the ecs.ModifySnapshotGroup API asynchronously +func (client *Client) ModifySnapshotGroupWithCallback(request *ModifySnapshotGroupRequest, callback func(response *ModifySnapshotGroupResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifySnapshotGroupResponse + var err error + defer close(result) + response, err = client.ModifySnapshotGroup(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifySnapshotGroupRequest is the request struct for api ModifySnapshotGroup +type ModifySnapshotGroupRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + SnapshotGroupId string `position:"Query" name:"SnapshotGroupId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Name string `position:"Query" name:"Name"` +} + +// ModifySnapshotGroupResponse is the response struct for api ModifySnapshotGroup +type ModifySnapshotGroupResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifySnapshotGroupRequest creates a request to invoke ModifySnapshotGroup API +func CreateModifySnapshotGroupRequest() (request *ModifySnapshotGroupRequest) { + request = &ModifySnapshotGroupRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifySnapshotGroup", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifySnapshotGroupResponse creates a response to parse from ModifySnapshotGroup response +func CreateModifySnapshotGroupResponse() (response *ModifySnapshotGroupResponse) { + response = &ModifySnapshotGroupResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_storage_capacity_unit_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_storage_capacity_unit_attribute.go new file mode 100644 index 000000000..594ef9b67 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_storage_capacity_unit_attribute.go @@ -0,0 +1,105 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyStorageCapacityUnitAttribute invokes the ecs.ModifyStorageCapacityUnitAttribute API synchronously +func (client *Client) ModifyStorageCapacityUnitAttribute(request *ModifyStorageCapacityUnitAttributeRequest) (response *ModifyStorageCapacityUnitAttributeResponse, err error) { + response = CreateModifyStorageCapacityUnitAttributeResponse() + err = client.DoAction(request, response) + return +} + +// ModifyStorageCapacityUnitAttributeWithChan invokes the ecs.ModifyStorageCapacityUnitAttribute API asynchronously +func (client *Client) ModifyStorageCapacityUnitAttributeWithChan(request *ModifyStorageCapacityUnitAttributeRequest) (<-chan *ModifyStorageCapacityUnitAttributeResponse, <-chan error) { + responseChan := make(chan *ModifyStorageCapacityUnitAttributeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyStorageCapacityUnitAttribute(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyStorageCapacityUnitAttributeWithCallback invokes the ecs.ModifyStorageCapacityUnitAttribute API asynchronously +func (client *Client) ModifyStorageCapacityUnitAttributeWithCallback(request *ModifyStorageCapacityUnitAttributeRequest, callback func(response *ModifyStorageCapacityUnitAttributeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyStorageCapacityUnitAttributeResponse + var err error + defer close(result) + response, err = client.ModifyStorageCapacityUnitAttribute(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyStorageCapacityUnitAttributeRequest is the request struct for api ModifyStorageCapacityUnitAttribute +type ModifyStorageCapacityUnitAttributeRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + StorageCapacityUnitId string `position:"Query" name:"StorageCapacityUnitId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Name string `position:"Query" name:"Name"` +} + +// ModifyStorageCapacityUnitAttributeResponse is the response struct for api ModifyStorageCapacityUnitAttribute +type ModifyStorageCapacityUnitAttributeResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyStorageCapacityUnitAttributeRequest creates a request to invoke ModifyStorageCapacityUnitAttribute API +func CreateModifyStorageCapacityUnitAttributeRequest() (request *ModifyStorageCapacityUnitAttributeRequest) { + request = &ModifyStorageCapacityUnitAttributeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyStorageCapacityUnitAttribute", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyStorageCapacityUnitAttributeResponse creates a response to parse from ModifyStorageCapacityUnitAttribute response +func CreateModifyStorageCapacityUnitAttributeResponse() (response *ModifyStorageCapacityUnitAttributeResponse) { + response = &ModifyStorageCapacityUnitAttributeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_storage_set_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_storage_set_attribute.go new file mode 100644 index 000000000..4c57b60ec --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_storage_set_attribute.go @@ -0,0 +1,106 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ModifyStorageSetAttribute invokes the ecs.ModifyStorageSetAttribute API synchronously +func (client *Client) ModifyStorageSetAttribute(request *ModifyStorageSetAttributeRequest) (response *ModifyStorageSetAttributeResponse, err error) { + response = CreateModifyStorageSetAttributeResponse() + err = client.DoAction(request, response) + return +} + +// ModifyStorageSetAttributeWithChan invokes the ecs.ModifyStorageSetAttribute API asynchronously +func (client *Client) ModifyStorageSetAttributeWithChan(request *ModifyStorageSetAttributeRequest) (<-chan *ModifyStorageSetAttributeResponse, <-chan error) { + responseChan := make(chan *ModifyStorageSetAttributeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyStorageSetAttribute(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyStorageSetAttributeWithCallback invokes the ecs.ModifyStorageSetAttribute API asynchronously +func (client *Client) ModifyStorageSetAttributeWithCallback(request *ModifyStorageSetAttributeRequest, callback func(response *ModifyStorageSetAttributeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyStorageSetAttributeResponse + var err error + defer close(result) + response, err = client.ModifyStorageSetAttribute(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyStorageSetAttributeRequest is the request struct for api ModifyStorageSetAttribute +type ModifyStorageSetAttributeRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + StorageSetId string `position:"Query" name:"StorageSetId"` + StorageSetName string `position:"Query" name:"StorageSetName"` +} + +// ModifyStorageSetAttributeResponse is the response struct for api ModifyStorageSetAttribute +type ModifyStorageSetAttributeResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyStorageSetAttributeRequest creates a request to invoke ModifyStorageSetAttribute API +func CreateModifyStorageSetAttributeRequest() (request *ModifyStorageSetAttributeRequest) { + request = &ModifyStorageSetAttributeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyStorageSetAttribute", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateModifyStorageSetAttributeResponse creates a response to parse from ModifyStorageSetAttribute response +func CreateModifyStorageSetAttributeResponse() (response *ModifyStorageSetAttributeResponse) { + response = &ModifyStorageSetAttributeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_user_business_behavior.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_user_business_behavior.go index c30d0ac7a..72c26e368 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_user_business_behavior.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_user_business_behavior.go @@ -21,7 +21,6 @@ import ( ) // ModifyUserBusinessBehavior invokes the ecs.ModifyUserBusinessBehavior API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyuserbusinessbehavior.html func (client *Client) ModifyUserBusinessBehavior(request *ModifyUserBusinessBehaviorRequest) (response *ModifyUserBusinessBehaviorResponse, err error) { response = CreateModifyUserBusinessBehaviorResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyUserBusinessBehavior(request *ModifyUserBusinessBeha } // ModifyUserBusinessBehaviorWithChan invokes the ecs.ModifyUserBusinessBehavior API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyuserbusinessbehavior.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyUserBusinessBehaviorWithChan(request *ModifyUserBusinessBehaviorRequest) (<-chan *ModifyUserBusinessBehaviorResponse, <-chan error) { responseChan := make(chan *ModifyUserBusinessBehaviorResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyUserBusinessBehaviorWithChan(request *ModifyUserBusi } // ModifyUserBusinessBehaviorWithCallback invokes the ecs.ModifyUserBusinessBehavior API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyuserbusinessbehavior.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyUserBusinessBehaviorWithCallback(request *ModifyUserBusinessBehaviorRequest, callback func(response *ModifyUserBusinessBehaviorResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateModifyUserBusinessBehaviorRequest() (request *ModifyUserBusinessBehav RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyUserBusinessBehavior", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_v_router_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_v_router_attribute.go index 5bcd9a872..9794ea1e3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_v_router_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_v_router_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyVRouterAttribute invokes the ecs.ModifyVRouterAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyvrouterattribute.html func (client *Client) ModifyVRouterAttribute(request *ModifyVRouterAttributeRequest) (response *ModifyVRouterAttributeResponse, err error) { response = CreateModifyVRouterAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyVRouterAttribute(request *ModifyVRouterAttributeRequ } // ModifyVRouterAttributeWithChan invokes the ecs.ModifyVRouterAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyvrouterattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyVRouterAttributeWithChan(request *ModifyVRouterAttributeRequest) (<-chan *ModifyVRouterAttributeResponse, <-chan error) { responseChan := make(chan *ModifyVRouterAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyVRouterAttributeWithChan(request *ModifyVRouterAttri } // ModifyVRouterAttributeWithCallback invokes the ecs.ModifyVRouterAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyvrouterattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyVRouterAttributeWithCallback(request *ModifyVRouterAttributeRequest, callback func(response *ModifyVRouterAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,12 +71,12 @@ func (client *Client) ModifyVRouterAttributeWithCallback(request *ModifyVRouterA // ModifyVRouterAttributeRequest is the request struct for api ModifyVRouterAttribute type ModifyVRouterAttributeRequest struct { *requests.RpcRequest - VRouterName string `position:"Query" name:"VRouterName"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` VRouterId string `position:"Query" name:"VRouterId"` + Description string `position:"Query" name:"Description"` + VRouterName string `position:"Query" name:"VRouterName"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - Description string `position:"Query" name:"Description"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -97,6 +92,7 @@ func CreateModifyVRouterAttributeRequest() (request *ModifyVRouterAttributeReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyVRouterAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_v_switch_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_v_switch_attribute.go index c7cd18a0f..c26ae8a31 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_v_switch_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_v_switch_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyVSwitchAttribute invokes the ecs.ModifyVSwitchAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyvswitchattribute.html func (client *Client) ModifyVSwitchAttribute(request *ModifyVSwitchAttributeRequest) (response *ModifyVSwitchAttributeResponse, err error) { response = CreateModifyVSwitchAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyVSwitchAttribute(request *ModifyVSwitchAttributeRequ } // ModifyVSwitchAttributeWithChan invokes the ecs.ModifyVSwitchAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyvswitchattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyVSwitchAttributeWithChan(request *ModifyVSwitchAttributeRequest) (<-chan *ModifyVSwitchAttributeResponse, <-chan error) { responseChan := make(chan *ModifyVSwitchAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyVSwitchAttributeWithChan(request *ModifyVSwitchAttri } // ModifyVSwitchAttributeWithCallback invokes the ecs.ModifyVSwitchAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyvswitchattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyVSwitchAttributeWithCallback(request *ModifyVSwitchAttributeRequest, callback func(response *ModifyVSwitchAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,13 +71,13 @@ func (client *Client) ModifyVSwitchAttributeWithCallback(request *ModifyVSwitchA // ModifyVSwitchAttributeRequest is the request struct for api ModifyVSwitchAttribute type ModifyVSwitchAttributeRequest struct { *requests.RpcRequest - VSwitchId string `position:"Query" name:"VSwitchId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - VSwitchName string `position:"Query" name:"VSwitchName"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VSwitchId string `position:"Query" name:"VSwitchId"` + VSwitchName string `position:"Query" name:"VSwitchName"` } // ModifyVSwitchAttributeResponse is the response struct for api ModifyVSwitchAttribute @@ -97,6 +92,7 @@ func CreateModifyVSwitchAttributeRequest() (request *ModifyVSwitchAttributeReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyVSwitchAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_virtual_border_router_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_virtual_border_router_attribute.go index 96fb0499b..9353b62b8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_virtual_border_router_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_virtual_border_router_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyVirtualBorderRouterAttribute invokes the ecs.ModifyVirtualBorderRouterAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyvirtualborderrouterattribute.html func (client *Client) ModifyVirtualBorderRouterAttribute(request *ModifyVirtualBorderRouterAttributeRequest) (response *ModifyVirtualBorderRouterAttributeResponse, err error) { response = CreateModifyVirtualBorderRouterAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyVirtualBorderRouterAttribute(request *ModifyVirtualB } // ModifyVirtualBorderRouterAttributeWithChan invokes the ecs.ModifyVirtualBorderRouterAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyvirtualborderrouterattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyVirtualBorderRouterAttributeWithChan(request *ModifyVirtualBorderRouterAttributeRequest) (<-chan *ModifyVirtualBorderRouterAttributeResponse, <-chan error) { responseChan := make(chan *ModifyVirtualBorderRouterAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyVirtualBorderRouterAttributeWithChan(request *Modify } // ModifyVirtualBorderRouterAttributeWithCallback invokes the ecs.ModifyVirtualBorderRouterAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyvirtualborderrouterattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyVirtualBorderRouterAttributeWithCallback(request *ModifyVirtualBorderRouterAttributeRequest, callback func(response *ModifyVirtualBorderRouterAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -79,17 +74,17 @@ type ModifyVirtualBorderRouterAttributeRequest struct { ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` CircuitCode string `position:"Query" name:"CircuitCode"` VlanId requests.Integer `position:"Query" name:"VlanId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` Description string `position:"Query" name:"Description"` VbrId string `position:"Query" name:"VbrId"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` PeerGatewayIp string `position:"Query" name:"PeerGatewayIp"` PeeringSubnetMask string `position:"Query" name:"PeeringSubnetMask"` - Name string `position:"Query" name:"Name"` LocalGatewayIp string `position:"Query" name:"LocalGatewayIp"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Name string `position:"Query" name:"Name"` } // ModifyVirtualBorderRouterAttributeResponse is the response struct for api ModifyVirtualBorderRouterAttribute @@ -104,6 +99,7 @@ func CreateModifyVirtualBorderRouterAttributeRequest() (request *ModifyVirtualBo RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyVirtualBorderRouterAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_vpc_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_vpc_attribute.go index 79525aaf6..728250cbc 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_vpc_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/modify_vpc_attribute.go @@ -21,7 +21,6 @@ import ( ) // ModifyVpcAttribute invokes the ecs.ModifyVpcAttribute API synchronously -// api document: https://help.aliyun.com/api/ecs/modifyvpcattribute.html func (client *Client) ModifyVpcAttribute(request *ModifyVpcAttributeRequest) (response *ModifyVpcAttributeResponse, err error) { response = CreateModifyVpcAttributeResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ModifyVpcAttribute(request *ModifyVpcAttributeRequest) (re } // ModifyVpcAttributeWithChan invokes the ecs.ModifyVpcAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyvpcattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyVpcAttributeWithChan(request *ModifyVpcAttributeRequest) (<-chan *ModifyVpcAttributeResponse, <-chan error) { responseChan := make(chan *ModifyVpcAttributeResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ModifyVpcAttributeWithChan(request *ModifyVpcAttributeRequ } // ModifyVpcAttributeWithCallback invokes the ecs.ModifyVpcAttribute API asynchronously -// api document: https://help.aliyun.com/api/ecs/modifyvpcattribute.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ModifyVpcAttributeWithCallback(request *ModifyVpcAttributeRequest, callback func(response *ModifyVpcAttributeResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,15 +71,15 @@ func (client *Client) ModifyVpcAttributeWithCallback(request *ModifyVpcAttribute // ModifyVpcAttributeRequest is the request struct for api ModifyVpcAttribute type ModifyVpcAttributeRequest struct { *requests.RpcRequest - VpcName string `position:"Query" name:"VpcName"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - VpcId string `position:"Query" name:"VpcId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - CidrBlock string `position:"Query" name:"CidrBlock"` Description string `position:"Query" name:"Description"` + VpcName string `position:"Query" name:"VpcName"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + VpcId string `position:"Query" name:"VpcId"` + CidrBlock string `position:"Query" name:"CidrBlock"` } // ModifyVpcAttributeResponse is the response struct for api ModifyVpcAttribute @@ -99,6 +94,7 @@ func CreateModifyVpcAttributeRequest() (request *ModifyVpcAttributeRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ModifyVpcAttribute", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/purchase_reserved_instances_offering.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/purchase_reserved_instances_offering.go index a4e6c694d..1438a525b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/purchase_reserved_instances_offering.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/purchase_reserved_instances_offering.go @@ -21,7 +21,6 @@ import ( ) // PurchaseReservedInstancesOffering invokes the ecs.PurchaseReservedInstancesOffering API synchronously -// api document: https://help.aliyun.com/api/ecs/purchasereservedinstancesoffering.html func (client *Client) PurchaseReservedInstancesOffering(request *PurchaseReservedInstancesOfferingRequest) (response *PurchaseReservedInstancesOfferingResponse, err error) { response = CreatePurchaseReservedInstancesOfferingResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) PurchaseReservedInstancesOffering(request *PurchaseReserve } // PurchaseReservedInstancesOfferingWithChan invokes the ecs.PurchaseReservedInstancesOffering API asynchronously -// api document: https://help.aliyun.com/api/ecs/purchasereservedinstancesoffering.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) PurchaseReservedInstancesOfferingWithChan(request *PurchaseReservedInstancesOfferingRequest) (<-chan *PurchaseReservedInstancesOfferingResponse, <-chan error) { responseChan := make(chan *PurchaseReservedInstancesOfferingResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) PurchaseReservedInstancesOfferingWithChan(request *Purchas } // PurchaseReservedInstancesOfferingWithCallback invokes the ecs.PurchaseReservedInstancesOffering API asynchronously -// api document: https://help.aliyun.com/api/ecs/purchasereservedinstancesoffering.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) PurchaseReservedInstancesOfferingWithCallback(request *PurchaseReservedInstancesOfferingRequest, callback func(response *PurchaseReservedInstancesOfferingResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,21 +71,29 @@ func (client *Client) PurchaseReservedInstancesOfferingWithCallback(request *Pur // PurchaseReservedInstancesOfferingRequest is the request struct for api PurchaseReservedInstancesOffering type PurchaseReservedInstancesOfferingRequest struct { *requests.RpcRequest - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ClientToken string `position:"Query" name:"ClientToken"` - Description string `position:"Query" name:"Description"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - Scope string `position:"Query" name:"Scope"` - InstanceType string `position:"Query" name:"InstanceType"` - Period requests.Integer `position:"Query" name:"Period"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - PeriodUnit string `position:"Query" name:"PeriodUnit"` - OfferingType string `position:"Query" name:"OfferingType"` - ZoneId string `position:"Query" name:"ZoneId"` - ReservedInstanceName string `position:"Query" name:"ReservedInstanceName"` - InstanceAmount requests.Integer `position:"Query" name:"InstanceAmount"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + Platform string `position:"Query" name:"Platform"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + Scope string `position:"Query" name:"Scope"` + InstanceType string `position:"Query" name:"InstanceType"` + Tag *[]PurchaseReservedInstancesOfferingTag `position:"Query" name:"Tag" type:"Repeated"` + Period requests.Integer `position:"Query" name:"Period"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + OfferingType string `position:"Query" name:"OfferingType"` + ZoneId string `position:"Query" name:"ZoneId"` + ReservedInstanceName string `position:"Query" name:"ReservedInstanceName"` + InstanceAmount requests.Integer `position:"Query" name:"InstanceAmount"` +} + +// PurchaseReservedInstancesOfferingTag is a repeated param struct in PurchaseReservedInstancesOfferingRequest +type PurchaseReservedInstancesOfferingTag struct { + Key string `name:"Key"` + Value string `name:"Value"` } // PurchaseReservedInstancesOfferingResponse is the response struct for api PurchaseReservedInstancesOffering @@ -106,6 +109,7 @@ func CreatePurchaseReservedInstancesOfferingRequest() (request *PurchaseReserved RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "PurchaseReservedInstancesOffering", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/purchase_storage_capacity_unit.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/purchase_storage_capacity_unit.go new file mode 100644 index 000000000..4ab28556b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/purchase_storage_capacity_unit.go @@ -0,0 +1,113 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// PurchaseStorageCapacityUnit invokes the ecs.PurchaseStorageCapacityUnit API synchronously +func (client *Client) PurchaseStorageCapacityUnit(request *PurchaseStorageCapacityUnitRequest) (response *PurchaseStorageCapacityUnitResponse, err error) { + response = CreatePurchaseStorageCapacityUnitResponse() + err = client.DoAction(request, response) + return +} + +// PurchaseStorageCapacityUnitWithChan invokes the ecs.PurchaseStorageCapacityUnit API asynchronously +func (client *Client) PurchaseStorageCapacityUnitWithChan(request *PurchaseStorageCapacityUnitRequest) (<-chan *PurchaseStorageCapacityUnitResponse, <-chan error) { + responseChan := make(chan *PurchaseStorageCapacityUnitResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.PurchaseStorageCapacityUnit(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// PurchaseStorageCapacityUnitWithCallback invokes the ecs.PurchaseStorageCapacityUnit API asynchronously +func (client *Client) PurchaseStorageCapacityUnitWithCallback(request *PurchaseStorageCapacityUnitRequest, callback func(response *PurchaseStorageCapacityUnitResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *PurchaseStorageCapacityUnitResponse + var err error + defer close(result) + response, err = client.PurchaseStorageCapacityUnit(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// PurchaseStorageCapacityUnitRequest is the request struct for api PurchaseStorageCapacityUnit +type PurchaseStorageCapacityUnitRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + Description string `position:"Query" name:"Description"` + StartTime string `position:"Query" name:"StartTime"` + Capacity requests.Integer `position:"Query" name:"Capacity"` + Period requests.Integer `position:"Query" name:"Period"` + Amount requests.Integer `position:"Query" name:"Amount"` + FromApp string `position:"Query" name:"FromApp"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + Name string `position:"Query" name:"Name"` +} + +// PurchaseStorageCapacityUnitResponse is the response struct for api PurchaseStorageCapacityUnit +type PurchaseStorageCapacityUnitResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + OrderId string `json:"OrderId" xml:"OrderId"` + StorageCapacityUnitIds StorageCapacityUnitIds `json:"StorageCapacityUnitIds" xml:"StorageCapacityUnitIds"` +} + +// CreatePurchaseStorageCapacityUnitRequest creates a request to invoke PurchaseStorageCapacityUnit API +func CreatePurchaseStorageCapacityUnitRequest() (request *PurchaseStorageCapacityUnitRequest) { + request = &PurchaseStorageCapacityUnitRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "PurchaseStorageCapacityUnit", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreatePurchaseStorageCapacityUnitResponse creates a response to parse from PurchaseStorageCapacityUnit response +func CreatePurchaseStorageCapacityUnitResponse() (response *PurchaseStorageCapacityUnitResponse) { + response = &PurchaseStorageCapacityUnitResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/re_activate_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/re_activate_instances.go index 155dcde2c..dc8290ed7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/re_activate_instances.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/re_activate_instances.go @@ -21,7 +21,6 @@ import ( ) // ReActivateInstances invokes the ecs.ReActivateInstances API synchronously -// api document: https://help.aliyun.com/api/ecs/reactivateinstances.html func (client *Client) ReActivateInstances(request *ReActivateInstancesRequest) (response *ReActivateInstancesResponse, err error) { response = CreateReActivateInstancesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ReActivateInstances(request *ReActivateInstancesRequest) ( } // ReActivateInstancesWithChan invokes the ecs.ReActivateInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/reactivateinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReActivateInstancesWithChan(request *ReActivateInstancesRequest) (<-chan *ReActivateInstancesResponse, <-chan error) { responseChan := make(chan *ReActivateInstancesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ReActivateInstancesWithChan(request *ReActivateInstancesRe } // ReActivateInstancesWithCallback invokes the ecs.ReActivateInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/reactivateinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReActivateInstancesWithCallback(request *ReActivateInstancesRequest, callback func(response *ReActivateInstancesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,10 +72,10 @@ func (client *Client) ReActivateInstancesWithCallback(request *ReActivateInstanc type ReActivateInstancesRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // ReActivateInstancesResponse is the response struct for api ReActivateInstances @@ -95,6 +90,7 @@ func CreateReActivateInstancesRequest() (request *ReActivateInstancesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ReActivateInstances", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/re_init_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/re_init_disk.go index 69f325638..9434d99f2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/re_init_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/re_init_disk.go @@ -21,7 +21,6 @@ import ( ) // ReInitDisk invokes the ecs.ReInitDisk API synchronously -// api document: https://help.aliyun.com/api/ecs/reinitdisk.html func (client *Client) ReInitDisk(request *ReInitDiskRequest) (response *ReInitDiskResponse, err error) { response = CreateReInitDiskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ReInitDisk(request *ReInitDiskRequest) (response *ReInitDi } // ReInitDiskWithChan invokes the ecs.ReInitDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/reinitdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReInitDiskWithChan(request *ReInitDiskRequest) (<-chan *ReInitDiskResponse, <-chan error) { responseChan := make(chan *ReInitDiskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ReInitDiskWithChan(request *ReInitDiskRequest) (<-chan *Re } // ReInitDiskWithCallback invokes the ecs.ReInitDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/reinitdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReInitDiskWithCallback(request *ReInitDiskRequest, callback func(response *ReInitDiskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,13 +72,13 @@ func (client *Client) ReInitDiskWithCallback(request *ReInitDiskRequest, callbac type ReInitDiskRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - Password string `position:"Query" name:"Password"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` AutoStartInstance requests.Boolean `position:"Query" name:"AutoStartInstance"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - DiskId string `position:"Query" name:"DiskId"` SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` KeyPairName string `position:"Query" name:"KeyPairName"` + Password string `position:"Query" name:"Password"` + DiskId string `position:"Query" name:"DiskId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -99,6 +94,7 @@ func CreateReInitDiskRequest() (request *ReInitDiskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ReInitDisk", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reboot_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reboot_instance.go index 60a99b148..ea6c5e127 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reboot_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reboot_instance.go @@ -21,7 +21,6 @@ import ( ) // RebootInstance invokes the ecs.RebootInstance API synchronously -// api document: https://help.aliyun.com/api/ecs/rebootinstance.html func (client *Client) RebootInstance(request *RebootInstanceRequest) (response *RebootInstanceResponse, err error) { response = CreateRebootInstanceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RebootInstance(request *RebootInstanceRequest) (response * } // RebootInstanceWithChan invokes the ecs.RebootInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/rebootinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RebootInstanceWithChan(request *RebootInstanceRequest) (<-chan *RebootInstanceResponse, <-chan error) { responseChan := make(chan *RebootInstanceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RebootInstanceWithChan(request *RebootInstanceRequest) (<- } // RebootInstanceWithCallback invokes the ecs.RebootInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/rebootinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RebootInstanceWithCallback(request *RebootInstanceRequest, callback func(response *RebootInstanceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) RebootInstanceWithCallback(request *RebootInstanceRequest, type RebootInstanceRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + ForceStop requests.Boolean `position:"Query" name:"ForceStop"` DryRun requests.Boolean `position:"Query" name:"DryRun"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - ForceStop requests.Boolean `position:"Query" name:"ForceStop"` + InstanceId string `position:"Query" name:"InstanceId"` } // RebootInstanceResponse is the response struct for api RebootInstance @@ -97,6 +92,7 @@ func CreateRebootInstanceRequest() (request *RebootInstanceRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RebootInstance", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reboot_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reboot_instances.go new file mode 100644 index 000000000..4981d55f9 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reboot_instances.go @@ -0,0 +1,107 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// RebootInstances invokes the ecs.RebootInstances API synchronously +func (client *Client) RebootInstances(request *RebootInstancesRequest) (response *RebootInstancesResponse, err error) { + response = CreateRebootInstancesResponse() + err = client.DoAction(request, response) + return +} + +// RebootInstancesWithChan invokes the ecs.RebootInstances API asynchronously +func (client *Client) RebootInstancesWithChan(request *RebootInstancesRequest) (<-chan *RebootInstancesResponse, <-chan error) { + responseChan := make(chan *RebootInstancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RebootInstances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RebootInstancesWithCallback invokes the ecs.RebootInstances API asynchronously +func (client *Client) RebootInstancesWithCallback(request *RebootInstancesRequest, callback func(response *RebootInstancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RebootInstancesResponse + var err error + defer close(result) + response, err = client.RebootInstances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RebootInstancesRequest is the request struct for api RebootInstances +type RebootInstancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + BatchOptimization string `position:"Query" name:"BatchOptimization"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ForceReboot requests.Boolean `position:"Query" name:"ForceReboot"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` +} + +// RebootInstancesResponse is the response struct for api RebootInstances +type RebootInstancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceResponses InstanceResponsesInRebootInstances `json:"InstanceResponses" xml:"InstanceResponses"` +} + +// CreateRebootInstancesRequest creates a request to invoke RebootInstances API +func CreateRebootInstancesRequest() (request *RebootInstancesRequest) { + request = &RebootInstancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "RebootInstances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateRebootInstancesResponse creates a response to parse from RebootInstances response +func CreateRebootInstancesResponse() (response *RebootInstancesResponse) { + response = &RebootInstancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/recover_virtual_border_router.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/recover_virtual_border_router.go index dae7e69e5..117ae77b9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/recover_virtual_border_router.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/recover_virtual_border_router.go @@ -21,7 +21,6 @@ import ( ) // RecoverVirtualBorderRouter invokes the ecs.RecoverVirtualBorderRouter API synchronously -// api document: https://help.aliyun.com/api/ecs/recovervirtualborderrouter.html func (client *Client) RecoverVirtualBorderRouter(request *RecoverVirtualBorderRouterRequest) (response *RecoverVirtualBorderRouterResponse, err error) { response = CreateRecoverVirtualBorderRouterResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RecoverVirtualBorderRouter(request *RecoverVirtualBorderRo } // RecoverVirtualBorderRouterWithChan invokes the ecs.RecoverVirtualBorderRouter API asynchronously -// api document: https://help.aliyun.com/api/ecs/recovervirtualborderrouter.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RecoverVirtualBorderRouterWithChan(request *RecoverVirtualBorderRouterRequest) (<-chan *RecoverVirtualBorderRouterResponse, <-chan error) { responseChan := make(chan *RecoverVirtualBorderRouterResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RecoverVirtualBorderRouterWithChan(request *RecoverVirtual } // RecoverVirtualBorderRouterWithCallback invokes the ecs.RecoverVirtualBorderRouter API asynchronously -// api document: https://help.aliyun.com/api/ecs/recovervirtualborderrouter.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RecoverVirtualBorderRouterWithCallback(request *RecoverVirtualBorderRouterRequest, callback func(response *RecoverVirtualBorderRouterResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,11 @@ func (client *Client) RecoverVirtualBorderRouterWithCallback(request *RecoverVir type RecoverVirtualBorderRouterRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - UserCidr string `position:"Query" name:"UserCidr"` VbrId string `position:"Query" name:"VbrId"` + UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -97,6 +92,7 @@ func CreateRecoverVirtualBorderRouterRequest() (request *RecoverVirtualBorderRou RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RecoverVirtualBorderRouter", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/redeploy_dedicated_host.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/redeploy_dedicated_host.go new file mode 100644 index 000000000..dfe152db6 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/redeploy_dedicated_host.go @@ -0,0 +1,103 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// RedeployDedicatedHost invokes the ecs.RedeployDedicatedHost API synchronously +func (client *Client) RedeployDedicatedHost(request *RedeployDedicatedHostRequest) (response *RedeployDedicatedHostResponse, err error) { + response = CreateRedeployDedicatedHostResponse() + err = client.DoAction(request, response) + return +} + +// RedeployDedicatedHostWithChan invokes the ecs.RedeployDedicatedHost API asynchronously +func (client *Client) RedeployDedicatedHostWithChan(request *RedeployDedicatedHostRequest) (<-chan *RedeployDedicatedHostResponse, <-chan error) { + responseChan := make(chan *RedeployDedicatedHostResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RedeployDedicatedHost(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RedeployDedicatedHostWithCallback invokes the ecs.RedeployDedicatedHost API asynchronously +func (client *Client) RedeployDedicatedHostWithCallback(request *RedeployDedicatedHostRequest, callback func(response *RedeployDedicatedHostResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RedeployDedicatedHostResponse + var err error + defer close(result) + response, err = client.RedeployDedicatedHost(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RedeployDedicatedHostRequest is the request struct for api RedeployDedicatedHost +type RedeployDedicatedHostRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + DedicatedHostId string `position:"Query" name:"DedicatedHostId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// RedeployDedicatedHostResponse is the response struct for api RedeployDedicatedHost +type RedeployDedicatedHostResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateRedeployDedicatedHostRequest creates a request to invoke RedeployDedicatedHost API +func CreateRedeployDedicatedHostRequest() (request *RedeployDedicatedHostRequest) { + request = &RedeployDedicatedHostRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "RedeployDedicatedHost", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateRedeployDedicatedHostResponse creates a response to parse from RedeployDedicatedHost response +func CreateRedeployDedicatedHostResponse() (response *RedeployDedicatedHostResponse) { + response = &RedeployDedicatedHostResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/redeploy_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/redeploy_instance.go index 35d55df9f..842b1a364 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/redeploy_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/redeploy_instance.go @@ -21,7 +21,6 @@ import ( ) // RedeployInstance invokes the ecs.RedeployInstance API synchronously -// api document: https://help.aliyun.com/api/ecs/redeployinstance.html func (client *Client) RedeployInstance(request *RedeployInstanceRequest) (response *RedeployInstanceResponse, err error) { response = CreateRedeployInstanceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RedeployInstance(request *RedeployInstanceRequest) (respon } // RedeployInstanceWithChan invokes the ecs.RedeployInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/redeployinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RedeployInstanceWithChan(request *RedeployInstanceRequest) (<-chan *RedeployInstanceResponse, <-chan error) { responseChan := make(chan *RedeployInstanceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RedeployInstanceWithChan(request *RedeployInstanceRequest) } // RedeployInstanceWithCallback invokes the ecs.RedeployInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/redeployinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RedeployInstanceWithCallback(request *RedeployInstanceRequest, callback func(response *RedeployInstanceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -97,6 +92,7 @@ func CreateRedeployInstanceRequest() (request *RedeployInstanceRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RedeployInstance", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_capacity_reservation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_capacity_reservation.go new file mode 100644 index 000000000..ad0a44868 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_capacity_reservation.go @@ -0,0 +1,104 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ReleaseCapacityReservation invokes the ecs.ReleaseCapacityReservation API synchronously +func (client *Client) ReleaseCapacityReservation(request *ReleaseCapacityReservationRequest) (response *ReleaseCapacityReservationResponse, err error) { + response = CreateReleaseCapacityReservationResponse() + err = client.DoAction(request, response) + return +} + +// ReleaseCapacityReservationWithChan invokes the ecs.ReleaseCapacityReservation API asynchronously +func (client *Client) ReleaseCapacityReservationWithChan(request *ReleaseCapacityReservationRequest) (<-chan *ReleaseCapacityReservationResponse, <-chan error) { + responseChan := make(chan *ReleaseCapacityReservationResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ReleaseCapacityReservation(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ReleaseCapacityReservationWithCallback invokes the ecs.ReleaseCapacityReservation API asynchronously +func (client *Client) ReleaseCapacityReservationWithCallback(request *ReleaseCapacityReservationRequest, callback func(response *ReleaseCapacityReservationResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ReleaseCapacityReservationResponse + var err error + defer close(result) + response, err = client.ReleaseCapacityReservation(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ReleaseCapacityReservationRequest is the request struct for api ReleaseCapacityReservation +type ReleaseCapacityReservationRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// ReleaseCapacityReservationResponse is the response struct for api ReleaseCapacityReservation +type ReleaseCapacityReservationResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateReleaseCapacityReservationRequest creates a request to invoke ReleaseCapacityReservation API +func CreateReleaseCapacityReservationRequest() (request *ReleaseCapacityReservationRequest) { + request = &ReleaseCapacityReservationRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ReleaseCapacityReservation", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateReleaseCapacityReservationResponse creates a response to parse from ReleaseCapacityReservation response +func CreateReleaseCapacityReservationResponse() (response *ReleaseCapacityReservationResponse) { + response = &ReleaseCapacityReservationResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_dedicated_host.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_dedicated_host.go index a8269b6e5..a6d44a3d7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_dedicated_host.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_dedicated_host.go @@ -21,7 +21,6 @@ import ( ) // ReleaseDedicatedHost invokes the ecs.ReleaseDedicatedHost API synchronously -// api document: https://help.aliyun.com/api/ecs/releasededicatedhost.html func (client *Client) ReleaseDedicatedHost(request *ReleaseDedicatedHostRequest) (response *ReleaseDedicatedHostResponse, err error) { response = CreateReleaseDedicatedHostResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ReleaseDedicatedHost(request *ReleaseDedicatedHostRequest) } // ReleaseDedicatedHostWithChan invokes the ecs.ReleaseDedicatedHost API asynchronously -// api document: https://help.aliyun.com/api/ecs/releasededicatedhost.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReleaseDedicatedHostWithChan(request *ReleaseDedicatedHostRequest) (<-chan *ReleaseDedicatedHostResponse, <-chan error) { responseChan := make(chan *ReleaseDedicatedHostResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ReleaseDedicatedHostWithChan(request *ReleaseDedicatedHost } // ReleaseDedicatedHostWithCallback invokes the ecs.ReleaseDedicatedHost API asynchronously -// api document: https://help.aliyun.com/api/ecs/releasededicatedhost.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReleaseDedicatedHostWithCallback(request *ReleaseDedicatedHostRequest, callback func(response *ReleaseDedicatedHostResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -95,6 +90,7 @@ func CreateReleaseDedicatedHostRequest() (request *ReleaseDedicatedHostRequest) RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ReleaseDedicatedHost", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_eip_address.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_eip_address.go index 8d1217f21..e1d2357c2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_eip_address.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_eip_address.go @@ -21,7 +21,6 @@ import ( ) // ReleaseEipAddress invokes the ecs.ReleaseEipAddress API synchronously -// api document: https://help.aliyun.com/api/ecs/releaseeipaddress.html func (client *Client) ReleaseEipAddress(request *ReleaseEipAddressRequest) (response *ReleaseEipAddressResponse, err error) { response = CreateReleaseEipAddressResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ReleaseEipAddress(request *ReleaseEipAddressRequest) (resp } // ReleaseEipAddressWithChan invokes the ecs.ReleaseEipAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/releaseeipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReleaseEipAddressWithChan(request *ReleaseEipAddressRequest) (<-chan *ReleaseEipAddressResponse, <-chan error) { responseChan := make(chan *ReleaseEipAddressResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ReleaseEipAddressWithChan(request *ReleaseEipAddressReques } // ReleaseEipAddressWithCallback invokes the ecs.ReleaseEipAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/releaseeipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReleaseEipAddressWithCallback(request *ReleaseEipAddressRequest, callback func(response *ReleaseEipAddressResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) ReleaseEipAddressWithCallback(request *ReleaseEipAddressRe type ReleaseEipAddressRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + AllocationId string `position:"Query" name:"AllocationId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - AllocationId string `position:"Query" name:"AllocationId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -95,6 +90,7 @@ func CreateReleaseEipAddressRequest() (request *ReleaseEipAddressRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ReleaseEipAddress", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_public_ip_address.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_public_ip_address.go index 819340ef6..b9b2d2fd6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_public_ip_address.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/release_public_ip_address.go @@ -21,7 +21,6 @@ import ( ) // ReleasePublicIpAddress invokes the ecs.ReleasePublicIpAddress API synchronously -// api document: https://help.aliyun.com/api/ecs/releasepublicipaddress.html func (client *Client) ReleasePublicIpAddress(request *ReleasePublicIpAddressRequest) (response *ReleasePublicIpAddressResponse, err error) { response = CreateReleasePublicIpAddressResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ReleasePublicIpAddress(request *ReleasePublicIpAddressRequ } // ReleasePublicIpAddressWithChan invokes the ecs.ReleasePublicIpAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/releasepublicipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReleasePublicIpAddressWithChan(request *ReleasePublicIpAddressRequest) (<-chan *ReleasePublicIpAddressResponse, <-chan error) { responseChan := make(chan *ReleasePublicIpAddressResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ReleasePublicIpAddressWithChan(request *ReleasePublicIpAdd } // ReleasePublicIpAddressWithCallback invokes the ecs.ReleasePublicIpAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/releasepublicipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReleasePublicIpAddressWithCallback(request *ReleasePublicIpAddressRequest, callback func(response *ReleasePublicIpAddressResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,11 @@ func (client *Client) ReleasePublicIpAddressWithCallback(request *ReleasePublicI type ReleasePublicIpAddressRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - PublicIpAddress string `position:"Query" name:"PublicIpAddress"` - InstanceId string `position:"Query" name:"InstanceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PublicIpAddress string `position:"Query" name:"PublicIpAddress"` + InstanceId string `position:"Query" name:"InstanceId"` } // ReleasePublicIpAddressResponse is the response struct for api ReleasePublicIpAddress @@ -96,6 +91,7 @@ func CreateReleasePublicIpAddressRequest() (request *ReleasePublicIpAddressReque RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ReleasePublicIpAddress", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/remove_bandwidth_package_ips.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/remove_bandwidth_package_ips.go index 4abb537f6..c2ceefd3e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/remove_bandwidth_package_ips.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/remove_bandwidth_package_ips.go @@ -21,7 +21,6 @@ import ( ) // RemoveBandwidthPackageIps invokes the ecs.RemoveBandwidthPackageIps API synchronously -// api document: https://help.aliyun.com/api/ecs/removebandwidthpackageips.html func (client *Client) RemoveBandwidthPackageIps(request *RemoveBandwidthPackageIpsRequest) (response *RemoveBandwidthPackageIpsResponse, err error) { response = CreateRemoveBandwidthPackageIpsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RemoveBandwidthPackageIps(request *RemoveBandwidthPackageI } // RemoveBandwidthPackageIpsWithChan invokes the ecs.RemoveBandwidthPackageIps API asynchronously -// api document: https://help.aliyun.com/api/ecs/removebandwidthpackageips.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RemoveBandwidthPackageIpsWithChan(request *RemoveBandwidthPackageIpsRequest) (<-chan *RemoveBandwidthPackageIpsResponse, <-chan error) { responseChan := make(chan *RemoveBandwidthPackageIpsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RemoveBandwidthPackageIpsWithChan(request *RemoveBandwidth } // RemoveBandwidthPackageIpsWithCallback invokes the ecs.RemoveBandwidthPackageIps API asynchronously -// api document: https://help.aliyun.com/api/ecs/removebandwidthpackageips.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RemoveBandwidthPackageIpsWithCallback(request *RemoveBandwidthPackageIpsRequest, callback func(response *RemoveBandwidthPackageIpsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,11 +71,11 @@ func (client *Client) RemoveBandwidthPackageIpsWithCallback(request *RemoveBandw // RemoveBandwidthPackageIpsRequest is the request struct for api RemoveBandwidthPackageIps type RemoveBandwidthPackageIpsRequest struct { *requests.RpcRequest - RemovedIpAddresses *[]string `position:"Query" name:"RemovedIpAddresses" type:"Repeated"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + RemovedIpAddresses *[]string `position:"Query" name:"RemovedIpAddresses" type:"Repeated"` BandwidthPackageId string `position:"Query" name:"BandwidthPackageId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ClientToken string `position:"Query" name:"ClientToken"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -97,6 +92,7 @@ func CreateRemoveBandwidthPackageIpsRequest() (request *RemoveBandwidthPackageIp RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RemoveBandwidthPackageIps", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/remove_tags.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/remove_tags.go index f5bcdd1f8..d36f3a707 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/remove_tags.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/remove_tags.go @@ -21,7 +21,6 @@ import ( ) // RemoveTags invokes the ecs.RemoveTags API synchronously -// api document: https://help.aliyun.com/api/ecs/removetags.html func (client *Client) RemoveTags(request *RemoveTagsRequest) (response *RemoveTagsResponse, err error) { response = CreateRemoveTagsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RemoveTags(request *RemoveTagsRequest) (response *RemoveTa } // RemoveTagsWithChan invokes the ecs.RemoveTags API asynchronously -// api document: https://help.aliyun.com/api/ecs/removetags.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RemoveTagsWithChan(request *RemoveTagsRequest) (<-chan *RemoveTagsResponse, <-chan error) { responseChan := make(chan *RemoveTagsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RemoveTagsWithChan(request *RemoveTagsRequest) (<-chan *Re } // RemoveTagsWithCallback invokes the ecs.RemoveTags API asynchronously -// api document: https://help.aliyun.com/api/ecs/removetags.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RemoveTagsWithCallback(request *RemoveTagsRequest, callback func(response *RemoveTagsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,9 +72,9 @@ func (client *Client) RemoveTagsWithCallback(request *RemoveTagsRequest, callbac type RemoveTagsRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Tag *[]RemoveTagsTag `position:"Query" name:"Tag" type:"Repeated"` ResourceId string `position:"Query" name:"ResourceId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - Tag *[]RemoveTagsTag `position:"Query" name:"Tag" type:"Repeated"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` ResourceType string `position:"Query" name:"ResourceType"` } @@ -102,6 +97,7 @@ func CreateRemoveTagsRequest() (request *RemoveTagsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RemoveTags", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/renew_dedicated_hosts.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/renew_dedicated_hosts.go index c5032957a..a5343efdb 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/renew_dedicated_hosts.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/renew_dedicated_hosts.go @@ -21,7 +21,6 @@ import ( ) // RenewDedicatedHosts invokes the ecs.RenewDedicatedHosts API synchronously -// api document: https://help.aliyun.com/api/ecs/renewdedicatedhosts.html func (client *Client) RenewDedicatedHosts(request *RenewDedicatedHostsRequest) (response *RenewDedicatedHostsResponse, err error) { response = CreateRenewDedicatedHostsResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RenewDedicatedHosts(request *RenewDedicatedHostsRequest) ( } // RenewDedicatedHostsWithChan invokes the ecs.RenewDedicatedHosts API asynchronously -// api document: https://help.aliyun.com/api/ecs/renewdedicatedhosts.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RenewDedicatedHostsWithChan(request *RenewDedicatedHostsRequest) (<-chan *RenewDedicatedHostsResponse, <-chan error) { responseChan := make(chan *RenewDedicatedHostsResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RenewDedicatedHostsWithChan(request *RenewDedicatedHostsRe } // RenewDedicatedHostsWithCallback invokes the ecs.RenewDedicatedHosts API asynchronously -// api document: https://help.aliyun.com/api/ecs/renewdedicatedhosts.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RenewDedicatedHostsWithCallback(request *RenewDedicatedHostsRequest, callback func(response *RenewDedicatedHostsResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -98,6 +93,7 @@ func CreateRenewDedicatedHostsRequest() (request *RenewDedicatedHostsRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RenewDedicatedHosts", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/renew_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/renew_instance.go index 928fc2298..ccc5de11f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/renew_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/renew_instance.go @@ -21,7 +21,6 @@ import ( ) // RenewInstance invokes the ecs.RenewInstance API synchronously -// api document: https://help.aliyun.com/api/ecs/renewinstance.html func (client *Client) RenewInstance(request *RenewInstanceRequest) (response *RenewInstanceResponse, err error) { response = CreateRenewInstanceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RenewInstance(request *RenewInstanceRequest) (response *Re } // RenewInstanceWithChan invokes the ecs.RenewInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/renewinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RenewInstanceWithChan(request *RenewInstanceRequest) (<-chan *RenewInstanceResponse, <-chan error) { responseChan := make(chan *RenewInstanceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RenewInstanceWithChan(request *RenewInstanceRequest) (<-ch } // RenewInstanceWithCallback invokes the ecs.RenewInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/renewinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RenewInstanceWithCallback(request *RenewInstanceRequest, callback func(response *RenewInstanceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,19 +72,21 @@ func (client *Client) RenewInstanceWithCallback(request *RenewInstanceRequest, c type RenewInstanceRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - Period requests.Integer `position:"Query" name:"Period"` - PeriodUnit string `position:"Query" name:"PeriodUnit"` - InstanceId string `position:"Query" name:"InstanceId"` ClientToken string `position:"Query" name:"ClientToken"` + Period requests.Integer `position:"Query" name:"Period"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` + ExpectedRenewDay requests.Integer `position:"Query" name:"ExpectedRenewDay"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + InstanceId string `position:"Query" name:"InstanceId"` } // RenewInstanceResponse is the response struct for api RenewInstance type RenewInstanceResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` + OrderId string `json:"OrderId" xml:"OrderId"` } // CreateRenewInstanceRequest creates a request to invoke RenewInstance API @@ -98,6 +95,7 @@ func CreateRenewInstanceRequest() (request *RenewInstanceRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RenewInstance", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/replace_system_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/replace_system_disk.go index cfcb5135b..102f4ecf4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/replace_system_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/replace_system_disk.go @@ -21,7 +21,6 @@ import ( ) // ReplaceSystemDisk invokes the ecs.ReplaceSystemDisk API synchronously -// api document: https://help.aliyun.com/api/ecs/replacesystemdisk.html func (client *Client) ReplaceSystemDisk(request *ReplaceSystemDiskRequest) (response *ReplaceSystemDiskResponse, err error) { response = CreateReplaceSystemDiskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ReplaceSystemDisk(request *ReplaceSystemDiskRequest) (resp } // ReplaceSystemDiskWithChan invokes the ecs.ReplaceSystemDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/replacesystemdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReplaceSystemDiskWithChan(request *ReplaceSystemDiskRequest) (<-chan *ReplaceSystemDiskResponse, <-chan error) { responseChan := make(chan *ReplaceSystemDiskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ReplaceSystemDiskWithChan(request *ReplaceSystemDiskReques } // ReplaceSystemDiskWithCallback invokes the ecs.ReplaceSystemDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/replacesystemdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ReplaceSystemDiskWithCallback(request *ReplaceSystemDiskRequest, callback func(response *ReplaceSystemDiskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,20 +73,20 @@ type ReplaceSystemDiskRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` ImageId string `position:"Query" name:"ImageId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` KeyPairName string `position:"Query" name:"KeyPairName"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` Platform string `position:"Query" name:"Platform"` Password string `position:"Query" name:"Password"` - InstanceId string `position:"Query" name:"InstanceId"` PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` - SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` DiskId string `position:"Query" name:"DiskId"` - UseAdditionalService requests.Boolean `position:"Query" name:"UseAdditionalService"` Architecture string `position:"Query" name:"Architecture"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + SystemDiskSize requests.Integer `position:"Query" name:"SystemDisk.Size"` + UseAdditionalService requests.Boolean `position:"Query" name:"UseAdditionalService"` } // ReplaceSystemDiskResponse is the response struct for api ReplaceSystemDisk @@ -107,6 +102,7 @@ func CreateReplaceSystemDiskRequest() (request *ReplaceSystemDiskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ReplaceSystemDisk", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/report_instances_status.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/report_instances_status.go new file mode 100644 index 000000000..e336b55ae --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/report_instances_status.go @@ -0,0 +1,110 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ReportInstancesStatus invokes the ecs.ReportInstancesStatus API synchronously +func (client *Client) ReportInstancesStatus(request *ReportInstancesStatusRequest) (response *ReportInstancesStatusResponse, err error) { + response = CreateReportInstancesStatusResponse() + err = client.DoAction(request, response) + return +} + +// ReportInstancesStatusWithChan invokes the ecs.ReportInstancesStatus API asynchronously +func (client *Client) ReportInstancesStatusWithChan(request *ReportInstancesStatusRequest) (<-chan *ReportInstancesStatusResponse, <-chan error) { + responseChan := make(chan *ReportInstancesStatusResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ReportInstancesStatus(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ReportInstancesStatusWithCallback invokes the ecs.ReportInstancesStatus API asynchronously +func (client *Client) ReportInstancesStatusWithCallback(request *ReportInstancesStatusRequest, callback func(response *ReportInstancesStatusResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ReportInstancesStatusResponse + var err error + defer close(result) + response, err = client.ReportInstancesStatus(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ReportInstancesStatusRequest is the request struct for api ReportInstancesStatus +type ReportInstancesStatusRequest struct { + *requests.RpcRequest + Reason string `position:"Query" name:"Reason"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + StartTime string `position:"Query" name:"StartTime"` + IssueCategory string `position:"Query" name:"IssueCategory"` + DiskId *[]string `position:"Query" name:"DiskId" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + EndTime string `position:"Query" name:"EndTime"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + Device *[]string `position:"Query" name:"Device" type:"Repeated"` +} + +// ReportInstancesStatusResponse is the response struct for api ReportInstancesStatus +type ReportInstancesStatusResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateReportInstancesStatusRequest creates a request to invoke ReportInstancesStatus API +func CreateReportInstancesStatusRequest() (request *ReportInstancesStatusRequest) { + request = &ReportInstancesStatusRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ReportInstancesStatus", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateReportInstancesStatusResponse creates a response to parse from ReportInstancesStatus response +func CreateReportInstancesStatusResponse() (response *ReportInstancesStatusResponse) { + response = &ReportInstancesStatusResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reset_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reset_disk.go index 6a062f7e2..e4bd8787b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reset_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reset_disk.go @@ -21,7 +21,6 @@ import ( ) // ResetDisk invokes the ecs.ResetDisk API synchronously -// api document: https://help.aliyun.com/api/ecs/resetdisk.html func (client *Client) ResetDisk(request *ResetDiskRequest) (response *ResetDiskResponse, err error) { response = CreateResetDiskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ResetDisk(request *ResetDiskRequest) (response *ResetDiskR } // ResetDiskWithChan invokes the ecs.ResetDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/resetdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ResetDiskWithChan(request *ResetDiskRequest) (<-chan *ResetDiskResponse, <-chan error) { responseChan := make(chan *ResetDiskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ResetDiskWithChan(request *ResetDiskRequest) (<-chan *Rese } // ResetDiskWithCallback invokes the ecs.ResetDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/resetdisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ResetDiskWithCallback(request *ResetDiskRequest, callback func(response *ResetDiskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -78,9 +73,9 @@ type ResetDiskRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` SnapshotId string `position:"Query" name:"SnapshotId"` + DiskId string `position:"Query" name:"DiskId"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - DiskId string `position:"Query" name:"DiskId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -96,6 +91,7 @@ func CreateResetDiskRequest() (request *ResetDiskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ResetDisk", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reset_disks.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reset_disks.go new file mode 100644 index 000000000..c423a481c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/reset_disks.go @@ -0,0 +1,110 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// ResetDisks invokes the ecs.ResetDisks API synchronously +func (client *Client) ResetDisks(request *ResetDisksRequest) (response *ResetDisksResponse, err error) { + response = CreateResetDisksResponse() + err = client.DoAction(request, response) + return +} + +// ResetDisksWithChan invokes the ecs.ResetDisks API asynchronously +func (client *Client) ResetDisksWithChan(request *ResetDisksRequest) (<-chan *ResetDisksResponse, <-chan error) { + responseChan := make(chan *ResetDisksResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ResetDisks(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ResetDisksWithCallback invokes the ecs.ResetDisks API asynchronously +func (client *Client) ResetDisksWithCallback(request *ResetDisksRequest, callback func(response *ResetDisksResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ResetDisksResponse + var err error + defer close(result) + response, err = client.ResetDisks(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ResetDisksRequest is the request struct for api ResetDisks +type ResetDisksRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + Disk *[]ResetDisksDisk `position:"Query" name:"Disk" type:"Repeated"` +} + +// ResetDisksDisk is a repeated param struct in ResetDisksRequest +type ResetDisksDisk struct { + DiskId string `name:"DiskId"` + SnapshotId string `name:"SnapshotId"` +} + +// ResetDisksResponse is the response struct for api ResetDisks +type ResetDisksResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + OperationProgressSet OperationProgressSetInResetDisks `json:"OperationProgressSet" xml:"OperationProgressSet"` +} + +// CreateResetDisksRequest creates a request to invoke ResetDisks API +func CreateResetDisksRequest() (request *ResetDisksRequest) { + request = &ResetDisksRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "ResetDisks", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateResetDisksResponse creates a response to parse from ResetDisks response +func CreateResetDisksResponse() (response *ResetDisksResponse) { + response = &ResetDisksResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/resize_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/resize_disk.go index a8a44c94b..33cd0e740 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/resize_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/resize_disk.go @@ -21,7 +21,6 @@ import ( ) // ResizeDisk invokes the ecs.ResizeDisk API synchronously -// api document: https://help.aliyun.com/api/ecs/resizedisk.html func (client *Client) ResizeDisk(request *ResizeDiskRequest) (response *ResizeDiskResponse, err error) { response = CreateResizeDiskResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) ResizeDisk(request *ResizeDiskRequest) (response *ResizeDi } // ResizeDiskWithChan invokes the ecs.ResizeDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/resizedisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ResizeDiskWithChan(request *ResizeDiskRequest) (<-chan *ResizeDiskResponse, <-chan error) { responseChan := make(chan *ResizeDiskResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) ResizeDiskWithChan(request *ResizeDiskRequest) (<-chan *Re } // ResizeDiskWithCallback invokes the ecs.ResizeDisk API asynchronously -// api document: https://help.aliyun.com/api/ecs/resizedisk.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) ResizeDiskWithCallback(request *ResizeDiskRequest, callback func(response *ResizeDiskResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,19 +72,20 @@ func (client *Client) ResizeDiskWithCallback(request *ResizeDiskRequest, callbac type ResizeDiskRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` + Type string `position:"Query" name:"Type"` + DiskId string `position:"Query" name:"DiskId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` NewSize requests.Integer `position:"Query" name:"NewSize"` - DiskId string `position:"Query" name:"DiskId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` - Type string `position:"Query" name:"Type"` } // ResizeDiskResponse is the response struct for api ResizeDisk type ResizeDiskResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` + OrderId string `json:"OrderId" xml:"OrderId"` } // CreateResizeDiskRequest creates a request to invoke ResizeDisk API @@ -98,6 +94,7 @@ func CreateResizeDiskRequest() (request *ResizeDiskRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "ResizeDisk", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/revoke_security_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/revoke_security_group.go index c3bc4bfee..43b3a6a9d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/revoke_security_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/revoke_security_group.go @@ -21,7 +21,6 @@ import ( ) // RevokeSecurityGroup invokes the ecs.RevokeSecurityGroup API synchronously -// api document: https://help.aliyun.com/api/ecs/revokesecuritygroup.html func (client *Client) RevokeSecurityGroup(request *RevokeSecurityGroupRequest) (response *RevokeSecurityGroupResponse, err error) { response = CreateRevokeSecurityGroupResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RevokeSecurityGroup(request *RevokeSecurityGroupRequest) ( } // RevokeSecurityGroupWithChan invokes the ecs.RevokeSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/revokesecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RevokeSecurityGroupWithChan(request *RevokeSecurityGroupRequest) (<-chan *RevokeSecurityGroupResponse, <-chan error) { responseChan := make(chan *RevokeSecurityGroupResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RevokeSecurityGroupWithChan(request *RevokeSecurityGroupRe } // RevokeSecurityGroupWithCallback invokes the ecs.RevokeSecurityGroup API asynchronously -// api document: https://help.aliyun.com/api/ecs/revokesecuritygroup.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RevokeSecurityGroupWithCallback(request *RevokeSecurityGroupRequest, callback func(response *RevokeSecurityGroupResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -110,6 +105,7 @@ func CreateRevokeSecurityGroupRequest() (request *RevokeSecurityGroupRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RevokeSecurityGroup", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/revoke_security_group_egress.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/revoke_security_group_egress.go index be1433352..79f0fd236 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/revoke_security_group_egress.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/revoke_security_group_egress.go @@ -21,7 +21,6 @@ import ( ) // RevokeSecurityGroupEgress invokes the ecs.RevokeSecurityGroupEgress API synchronously -// api document: https://help.aliyun.com/api/ecs/revokesecuritygroupegress.html func (client *Client) RevokeSecurityGroupEgress(request *RevokeSecurityGroupEgressRequest) (response *RevokeSecurityGroupEgressResponse, err error) { response = CreateRevokeSecurityGroupEgressResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RevokeSecurityGroupEgress(request *RevokeSecurityGroupEgre } // RevokeSecurityGroupEgressWithChan invokes the ecs.RevokeSecurityGroupEgress API asynchronously -// api document: https://help.aliyun.com/api/ecs/revokesecuritygroupegress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RevokeSecurityGroupEgressWithChan(request *RevokeSecurityGroupEgressRequest) (<-chan *RevokeSecurityGroupEgressResponse, <-chan error) { responseChan := make(chan *RevokeSecurityGroupEgressResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RevokeSecurityGroupEgressWithChan(request *RevokeSecurityG } // RevokeSecurityGroupEgressWithCallback invokes the ecs.RevokeSecurityGroupEgress API asynchronously -// api document: https://help.aliyun.com/api/ecs/revokesecuritygroupegress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RevokeSecurityGroupEgressWithCallback(request *RevokeSecurityGroupEgressRequest, callback func(response *RevokeSecurityGroupEgressResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -110,6 +105,7 @@ func CreateRevokeSecurityGroupEgressRequest() (request *RevokeSecurityGroupEgres RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RevokeSecurityGroupEgress", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/run_command.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/run_command.go new file mode 100644 index 000000000..c53da1100 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/run_command.go @@ -0,0 +1,119 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// RunCommand invokes the ecs.RunCommand API synchronously +func (client *Client) RunCommand(request *RunCommandRequest) (response *RunCommandResponse, err error) { + response = CreateRunCommandResponse() + err = client.DoAction(request, response) + return +} + +// RunCommandWithChan invokes the ecs.RunCommand API asynchronously +func (client *Client) RunCommandWithChan(request *RunCommandRequest) (<-chan *RunCommandResponse, <-chan error) { + responseChan := make(chan *RunCommandResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RunCommand(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RunCommandWithCallback invokes the ecs.RunCommand API asynchronously +func (client *Client) RunCommandWithCallback(request *RunCommandRequest, callback func(response *RunCommandResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RunCommandResponse + var err error + defer close(result) + response, err = client.RunCommand(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RunCommandRequest is the request struct for api RunCommand +type RunCommandRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + WorkingDir string `position:"Query" name:"WorkingDir"` + Description string `position:"Query" name:"Description"` + Type string `position:"Query" name:"Type"` + CommandContent string `position:"Query" name:"CommandContent"` + Timeout requests.Integer `position:"Query" name:"Timeout"` + Frequency string `position:"Query" name:"Frequency"` + ContentEncoding string `position:"Query" name:"ContentEncoding"` + WindowsPasswordName string `position:"Query" name:"WindowsPasswordName"` + KeepCommand requests.Boolean `position:"Query" name:"KeepCommand"` + Timed requests.Boolean `position:"Query" name:"Timed"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + Name string `position:"Query" name:"Name"` + Parameters map[string]interface{} `position:"Query" name:"Parameters"` + EnableParameter requests.Boolean `position:"Query" name:"EnableParameter"` + Username string `position:"Query" name:"Username"` +} + +// RunCommandResponse is the response struct for api RunCommand +type RunCommandResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + CommandId string `json:"CommandId" xml:"CommandId"` + InvokeId string `json:"InvokeId" xml:"InvokeId"` +} + +// CreateRunCommandRequest creates a request to invoke RunCommand API +func CreateRunCommandRequest() (request *RunCommandRequest) { + request = &RunCommandRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "RunCommand", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateRunCommandResponse creates a response to parse from RunCommand response +func CreateRunCommandResponse() (response *RunCommandResponse) { + response = &RunCommandResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/run_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/run_instances.go index 7588da075..89ded3efa 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/run_instances.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/run_instances.go @@ -21,7 +21,6 @@ import ( ) // RunInstances invokes the ecs.RunInstances API synchronously -// api document: https://help.aliyun.com/api/ecs/runinstances.html func (client *Client) RunInstances(request *RunInstancesRequest) (response *RunInstancesResponse, err error) { response = CreateRunInstancesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) RunInstances(request *RunInstancesRequest) (response *RunI } // RunInstancesWithChan invokes the ecs.RunInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/runinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RunInstancesWithChan(request *RunInstancesRequest) (<-chan *RunInstancesResponse, <-chan error) { responseChan := make(chan *RunInstancesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) RunInstancesWithChan(request *RunInstancesRequest) (<-chan } // RunInstancesWithCallback invokes the ecs.RunInstances API asynchronously -// api document: https://help.aliyun.com/api/ecs/runinstances.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) RunInstancesWithCallback(request *RunInstancesRequest, callback func(response *RunInstancesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,64 +71,96 @@ func (client *Client) RunInstancesWithCallback(request *RunInstancesRequest, cal // RunInstancesRequest is the request struct for api RunInstances type RunInstancesRequest struct { *requests.RpcRequest - LaunchTemplateName string `position:"Query" name:"LaunchTemplateName"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - UniqueSuffix requests.Boolean `position:"Query" name:"UniqueSuffix"` - HpcClusterId string `position:"Query" name:"HpcClusterId"` - SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` - KeyPairName string `position:"Query" name:"KeyPairName"` - MinAmount requests.Integer `position:"Query" name:"MinAmount"` - SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` - DeletionProtection requests.Boolean `position:"Query" name:"DeletionProtection"` - ResourceGroupId string `position:"Query" name:"ResourceGroupId"` - HostName string `position:"Query" name:"HostName"` - Password string `position:"Query" name:"Password"` - Tag *[]RunInstancesTag `position:"Query" name:"Tag" type:"Repeated"` - AutoRenewPeriod requests.Integer `position:"Query" name:"AutoRenewPeriod"` - Period requests.Integer `position:"Query" name:"Period"` - DryRun requests.Boolean `position:"Query" name:"DryRun"` - LaunchTemplateId string `position:"Query" name:"LaunchTemplateId"` - Ipv6AddressCount requests.Integer `position:"Query" name:"Ipv6AddressCount"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` - CapacityReservationPreference string `position:"Query" name:"CapacityReservationPreference"` - VSwitchId string `position:"Query" name:"VSwitchId"` - SpotStrategy string `position:"Query" name:"SpotStrategy"` - PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` - PeriodUnit string `position:"Query" name:"PeriodUnit"` - InstanceName string `position:"Query" name:"InstanceName"` - AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` - InternetChargeType string `position:"Query" name:"InternetChargeType"` - ZoneId string `position:"Query" name:"ZoneId"` - Ipv6Address *[]string `position:"Query" name:"Ipv6Address" type:"Repeated"` - InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` - ImageId string `position:"Query" name:"ImageId"` - SpotInterruptionBehavior string `position:"Query" name:"SpotInterruptionBehavior"` - ClientToken string `position:"Query" name:"ClientToken"` - IoOptimized string `position:"Query" name:"IoOptimized"` - SecurityGroupId string `position:"Query" name:"SecurityGroupId"` - InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` - Description string `position:"Query" name:"Description"` - SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` - CapacityReservationId string `position:"Query" name:"CapacityReservationId"` - UserData string `position:"Query" name:"UserData"` - PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` - InstanceType string `position:"Query" name:"InstanceType"` - HibernationConfigured requests.Boolean `position:"Query" name:"HibernationConfigured"` - InstanceChargeType string `position:"Query" name:"InstanceChargeType"` - NetworkInterface *[]RunInstancesNetworkInterface `position:"Query" name:"NetworkInterface" type:"Repeated"` - DeploymentSetId string `position:"Query" name:"DeploymentSetId"` - Amount requests.Integer `position:"Query" name:"Amount"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - SystemDiskDiskName string `position:"Query" name:"SystemDisk.DiskName"` - RamRoleName string `position:"Query" name:"RamRoleName"` - AutoReleaseTime string `position:"Query" name:"AutoReleaseTime"` - DedicatedHostId string `position:"Query" name:"DedicatedHostId"` - CreditSpecification string `position:"Query" name:"CreditSpecification"` - DataDisk *[]RunInstancesDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` - LaunchTemplateVersion requests.Integer `position:"Query" name:"LaunchTemplateVersion"` - SystemDiskSize string `position:"Query" name:"SystemDisk.Size"` - SystemDiskDescription string `position:"Query" name:"SystemDisk.Description"` + UniqueSuffix requests.Boolean `position:"Query" name:"UniqueSuffix"` + SecurityEnhancementStrategy string `position:"Query" name:"SecurityEnhancementStrategy"` + MinAmount requests.Integer `position:"Query" name:"MinAmount"` + DeletionProtection requests.Boolean `position:"Query" name:"DeletionProtection"` + ResourceGroupId string `position:"Query" name:"ResourceGroupId"` + PrivatePoolOptionsMatchCriteria string `position:"Query" name:"PrivatePoolOptions.MatchCriteria"` + HostName string `position:"Query" name:"HostName"` + Password string `position:"Query" name:"Password"` + DeploymentSetGroupNo requests.Integer `position:"Query" name:"DeploymentSetGroupNo"` + SystemDiskAutoSnapshotPolicyId string `position:"Query" name:"SystemDisk.AutoSnapshotPolicyId"` + CpuOptionsCore requests.Integer `position:"Query" name:"CpuOptions.Core"` + Period requests.Integer `position:"Query" name:"Period"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + CpuOptionsNuma string `position:"Query" name:"CpuOptions.Numa"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SpotStrategy string `position:"Query" name:"SpotStrategy"` + PrivateIpAddress string `position:"Query" name:"PrivateIpAddress"` + PeriodUnit string `position:"Query" name:"PeriodUnit"` + AutoRenew requests.Boolean `position:"Query" name:"AutoRenew"` + InternetChargeType string `position:"Query" name:"InternetChargeType"` + InternetMaxBandwidthIn requests.Integer `position:"Query" name:"InternetMaxBandwidthIn"` + Affinity string `position:"Query" name:"Affinity"` + ImageId string `position:"Query" name:"ImageId"` + SpotInterruptionBehavior string `position:"Query" name:"SpotInterruptionBehavior"` + NetworkInterfaceQueueNumber requests.Integer `position:"Query" name:"NetworkInterfaceQueueNumber"` + IoOptimized string `position:"Query" name:"IoOptimized"` + SecurityGroupId string `position:"Query" name:"SecurityGroupId"` + HibernationOptionsConfigured requests.Boolean `position:"Query" name:"HibernationOptions.Configured"` + SystemDiskPerformanceLevel string `position:"Query" name:"SystemDisk.PerformanceLevel"` + PasswordInherit requests.Boolean `position:"Query" name:"PasswordInherit"` + InstanceType string `position:"Query" name:"InstanceType"` + Arn *[]RunInstancesArn `position:"Query" name:"Arn" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + SchedulerOptionsDedicatedHostClusterId string `position:"Query" name:"SchedulerOptions.DedicatedHostClusterId"` + SystemDiskDiskName string `position:"Query" name:"SystemDisk.DiskName"` + DedicatedHostId string `position:"Query" name:"DedicatedHostId"` + SecurityGroupIds *[]string `position:"Query" name:"SecurityGroupIds" type:"Repeated"` + SpotDuration requests.Integer `position:"Query" name:"SpotDuration"` + SystemDiskSize string `position:"Query" name:"SystemDisk.Size"` + ImageFamily string `position:"Query" name:"ImageFamily"` + LaunchTemplateName string `position:"Query" name:"LaunchTemplateName"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + HpcClusterId string `position:"Query" name:"HpcClusterId"` + HttpPutResponseHopLimit requests.Integer `position:"Query" name:"HttpPutResponseHopLimit"` + Isp string `position:"Query" name:"Isp"` + KeyPairName string `position:"Query" name:"KeyPairName"` + SpotPriceLimit requests.Float `position:"Query" name:"SpotPriceLimit"` + StorageSetPartitionNumber requests.Integer `position:"Query" name:"StorageSetPartitionNumber"` + Tag *[]RunInstancesTag `position:"Query" name:"Tag" type:"Repeated"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + AutoRenewPeriod requests.Integer `position:"Query" name:"AutoRenewPeriod"` + LaunchTemplateId string `position:"Query" name:"LaunchTemplateId"` + Ipv6AddressCount requests.Integer `position:"Query" name:"Ipv6AddressCount"` + HostNames *[]string `position:"Query" name:"HostNames" type:"Repeated"` + CapacityReservationPreference string `position:"Query" name:"CapacityReservationPreference"` + VSwitchId string `position:"Query" name:"VSwitchId"` + InstanceName string `position:"Query" name:"InstanceName"` + ZoneId string `position:"Query" name:"ZoneId"` + Ipv6Address *[]string `position:"Query" name:"Ipv6Address" type:"Repeated"` + ClientToken string `position:"Query" name:"ClientToken"` + InternetMaxBandwidthOut requests.Integer `position:"Query" name:"InternetMaxBandwidthOut"` + Description string `position:"Query" name:"Description"` + CpuOptionsThreadsPerCore requests.Integer `position:"Query" name:"CpuOptions.ThreadsPerCore"` + SystemDiskCategory string `position:"Query" name:"SystemDisk.Category"` + SecurityOptionsTrustedSystemMode string `position:"Query" name:"SecurityOptions.TrustedSystemMode"` + CapacityReservationId string `position:"Query" name:"CapacityReservationId"` + UserData string `position:"Query" name:"UserData"` + HttpEndpoint string `position:"Query" name:"HttpEndpoint"` + InstanceChargeType string `position:"Query" name:"InstanceChargeType"` + NetworkInterface *[]RunInstancesNetworkInterface `position:"Query" name:"NetworkInterface" type:"Repeated"` + DeploymentSetId string `position:"Query" name:"DeploymentSetId"` + Amount requests.Integer `position:"Query" name:"Amount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + Tenancy string `position:"Query" name:"Tenancy"` + RamRoleName string `position:"Query" name:"RamRoleName"` + AutoReleaseTime string `position:"Query" name:"AutoReleaseTime"` + CreditSpecification string `position:"Query" name:"CreditSpecification"` + DataDisk *[]RunInstancesDataDisk `position:"Query" name:"DataDisk" type:"Repeated"` + LaunchTemplateVersion requests.Integer `position:"Query" name:"LaunchTemplateVersion"` + SchedulerOptionsManagedPrivateSpaceId string `position:"Query" name:"SchedulerOptions.ManagedPrivateSpaceId"` + StorageSetId string `position:"Query" name:"StorageSetId"` + HttpTokens string `position:"Query" name:"HttpTokens"` + SystemDiskDescription string `position:"Query" name:"SystemDisk.Description"` +} + +// RunInstancesArn is a repeated param struct in RunInstancesRequest +type RunInstancesArn struct { + AssumeRoleFor string `name:"AssumeRoleFor"` + Rolearn string `name:"Rolearn"` + RoleType string `name:"RoleType"` } // RunInstancesTag is a repeated param struct in RunInstancesRequest @@ -144,30 +171,37 @@ type RunInstancesTag struct { // RunInstancesNetworkInterface is a repeated param struct in RunInstancesRequest type RunInstancesNetworkInterface struct { - PrimaryIpAddress string `name:"PrimaryIpAddress"` - VSwitchId string `name:"VSwitchId"` - SecurityGroupId string `name:"SecurityGroupId"` - NetworkInterfaceName string `name:"NetworkInterfaceName"` - Description string `name:"Description"` + PrimaryIpAddress string `name:"PrimaryIpAddress"` + VSwitchId string `name:"VSwitchId"` + SecurityGroupId string `name:"SecurityGroupId"` + SecurityGroupIds *[]string `name:"SecurityGroupIds" type:"Repeated"` + NetworkInterfaceName string `name:"NetworkInterfaceName"` + Description string `name:"Description"` + QueueNumber string `name:"QueueNumber"` } // RunInstancesDataDisk is a repeated param struct in RunInstancesRequest type RunInstancesDataDisk struct { - Size string `name:"Size"` - SnapshotId string `name:"SnapshotId"` - Category string `name:"Category"` - Encrypted string `name:"Encrypted"` - KMSKeyId string `name:"KMSKeyId"` - DiskName string `name:"DiskName"` - Description string `name:"Description"` - Device string `name:"Device"` - DeleteWithInstance string `name:"DeleteWithInstance"` + Size string `name:"Size"` + SnapshotId string `name:"SnapshotId"` + Category string `name:"Category"` + Encrypted string `name:"Encrypted"` + KMSKeyId string `name:"KMSKeyId"` + DiskName string `name:"DiskName"` + Description string `name:"Description"` + Device string `name:"Device"` + DeleteWithInstance string `name:"DeleteWithInstance"` + PerformanceLevel string `name:"PerformanceLevel"` + AutoSnapshotPolicyId string `name:"AutoSnapshotPolicyId"` + EncryptAlgorithm string `name:"EncryptAlgorithm"` } // RunInstancesResponse is the response struct for api RunInstances type RunInstancesResponse struct { *responses.BaseResponse RequestId string `json:"RequestId" xml:"RequestId"` + TradePrice float64 `json:"TradePrice" xml:"TradePrice"` + OrderId string `json:"OrderId" xml:"OrderId"` InstanceIdSets InstanceIdSets `json:"InstanceIdSets" xml:"InstanceIdSets"` } @@ -177,6 +211,7 @@ func CreateRunInstancesRequest() (request *RunInstancesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "RunInstances", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/send_file.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/send_file.go new file mode 100644 index 000000000..0182cbd6c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/send_file.go @@ -0,0 +1,114 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// SendFile invokes the ecs.SendFile API synchronously +func (client *Client) SendFile(request *SendFileRequest) (response *SendFileResponse, err error) { + response = CreateSendFileResponse() + err = client.DoAction(request, response) + return +} + +// SendFileWithChan invokes the ecs.SendFile API asynchronously +func (client *Client) SendFileWithChan(request *SendFileRequest) (<-chan *SendFileResponse, <-chan error) { + responseChan := make(chan *SendFileResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SendFile(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SendFileWithCallback invokes the ecs.SendFile API asynchronously +func (client *Client) SendFileWithCallback(request *SendFileRequest, callback func(response *SendFileResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SendFileResponse + var err error + defer close(result) + response, err = client.SendFile(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SendFileRequest is the request struct for api SendFile +type SendFileRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + Description string `position:"Query" name:"Description"` + Timeout requests.Integer `position:"Query" name:"Timeout"` + Content string `position:"Query" name:"Content"` + FileOwner string `position:"Query" name:"FileOwner"` + Overwrite requests.Boolean `position:"Query" name:"Overwrite"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + FileMode string `position:"Query" name:"FileMode"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + ContentType string `position:"Query" name:"ContentType"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` + Name string `position:"Query" name:"Name"` + FileGroup string `position:"Query" name:"FileGroup"` + TargetDir string `position:"Query" name:"TargetDir"` +} + +// SendFileResponse is the response struct for api SendFile +type SendFileResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + InvokeId string `json:"InvokeId" xml:"InvokeId"` +} + +// CreateSendFileRequest creates a request to invoke SendFile API +func CreateSendFileRequest() (request *SendFileRequest) { + request = &SendFileRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "SendFile", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateSendFileResponse creates a response to parse from SendFile response +func CreateSendFileResponse() (response *SendFileResponse) { + response = &SendFileResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_elasticity_assurance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_elasticity_assurance.go new file mode 100644 index 000000000..b92721e32 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_elasticity_assurance.go @@ -0,0 +1,103 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// StartElasticityAssurance invokes the ecs.StartElasticityAssurance API synchronously +func (client *Client) StartElasticityAssurance(request *StartElasticityAssuranceRequest) (response *StartElasticityAssuranceResponse, err error) { + response = CreateStartElasticityAssuranceResponse() + err = client.DoAction(request, response) + return +} + +// StartElasticityAssuranceWithChan invokes the ecs.StartElasticityAssurance API asynchronously +func (client *Client) StartElasticityAssuranceWithChan(request *StartElasticityAssuranceRequest) (<-chan *StartElasticityAssuranceResponse, <-chan error) { + responseChan := make(chan *StartElasticityAssuranceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StartElasticityAssurance(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StartElasticityAssuranceWithCallback invokes the ecs.StartElasticityAssurance API asynchronously +func (client *Client) StartElasticityAssuranceWithCallback(request *StartElasticityAssuranceRequest, callback func(response *StartElasticityAssuranceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StartElasticityAssuranceResponse + var err error + defer close(result) + response, err = client.StartElasticityAssurance(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StartElasticityAssuranceRequest is the request struct for api StartElasticityAssurance +type StartElasticityAssuranceRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + PrivatePoolOptionsId string `position:"Query" name:"PrivatePoolOptions.Id"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// StartElasticityAssuranceResponse is the response struct for api StartElasticityAssurance +type StartElasticityAssuranceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateStartElasticityAssuranceRequest creates a request to invoke StartElasticityAssurance API +func CreateStartElasticityAssuranceRequest() (request *StartElasticityAssuranceRequest) { + request = &StartElasticityAssuranceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "StartElasticityAssurance", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateStartElasticityAssuranceResponse creates a response to parse from StartElasticityAssurance response +func CreateStartElasticityAssuranceResponse() (response *StartElasticityAssuranceResponse) { + response = &StartElasticityAssuranceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_image_pipeline_execution.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_image_pipeline_execution.go new file mode 100644 index 000000000..efec868eb --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_image_pipeline_execution.go @@ -0,0 +1,112 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// StartImagePipelineExecution invokes the ecs.StartImagePipelineExecution API synchronously +func (client *Client) StartImagePipelineExecution(request *StartImagePipelineExecutionRequest) (response *StartImagePipelineExecutionResponse, err error) { + response = CreateStartImagePipelineExecutionResponse() + err = client.DoAction(request, response) + return +} + +// StartImagePipelineExecutionWithChan invokes the ecs.StartImagePipelineExecution API asynchronously +func (client *Client) StartImagePipelineExecutionWithChan(request *StartImagePipelineExecutionRequest) (<-chan *StartImagePipelineExecutionResponse, <-chan error) { + responseChan := make(chan *StartImagePipelineExecutionResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StartImagePipelineExecution(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StartImagePipelineExecutionWithCallback invokes the ecs.StartImagePipelineExecution API asynchronously +func (client *Client) StartImagePipelineExecutionWithCallback(request *StartImagePipelineExecutionRequest, callback func(response *StartImagePipelineExecutionResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StartImagePipelineExecutionResponse + var err error + defer close(result) + response, err = client.StartImagePipelineExecution(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StartImagePipelineExecutionRequest is the request struct for api StartImagePipelineExecution +type StartImagePipelineExecutionRequest struct { + *requests.RpcRequest + ImagePipelineId string `position:"Query" name:"ImagePipelineId"` + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + ClientToken string `position:"Query" name:"ClientToken"` + TemplateTag *[]StartImagePipelineExecutionTemplateTag `position:"Query" name:"TemplateTag" type:"Repeated"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// StartImagePipelineExecutionTemplateTag is a repeated param struct in StartImagePipelineExecutionRequest +type StartImagePipelineExecutionTemplateTag struct { + Key string `name:"Key"` + Value string `name:"Value"` +} + +// StartImagePipelineExecutionResponse is the response struct for api StartImagePipelineExecution +type StartImagePipelineExecutionResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + ExecutionId string `json:"ExecutionId" xml:"ExecutionId"` +} + +// CreateStartImagePipelineExecutionRequest creates a request to invoke StartImagePipelineExecution API +func CreateStartImagePipelineExecutionRequest() (request *StartImagePipelineExecutionRequest) { + request = &StartImagePipelineExecutionRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "StartImagePipelineExecution", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateStartImagePipelineExecutionResponse creates a response to parse from StartImagePipelineExecution response +func CreateStartImagePipelineExecutionResponse() (response *StartImagePipelineExecutionResponse) { + response = &StartImagePipelineExecutionResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_instance.go index 1fece7fa8..b8e27dea0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_instance.go @@ -21,7 +21,6 @@ import ( ) // StartInstance invokes the ecs.StartInstance API synchronously -// api document: https://help.aliyun.com/api/ecs/startinstance.html func (client *Client) StartInstance(request *StartInstanceRequest) (response *StartInstanceResponse, err error) { response = CreateStartInstanceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) StartInstance(request *StartInstanceRequest) (response *St } // StartInstanceWithChan invokes the ecs.StartInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/startinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) StartInstanceWithChan(request *StartInstanceRequest) (<-chan *StartInstanceResponse, <-chan error) { responseChan := make(chan *StartInstanceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) StartInstanceWithChan(request *StartInstanceRequest) (<-ch } // StartInstanceWithCallback invokes the ecs.StartInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/startinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) StartInstanceWithCallback(request *StartInstanceRequest, callback func(response *StartInstanceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,14 +71,14 @@ func (client *Client) StartInstanceWithCallback(request *StartInstanceRequest, c // StartInstanceRequest is the request struct for api StartInstance type StartInstanceRequest struct { *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` SourceRegionId string `position:"Query" name:"SourceRegionId"` InitLocalDisk requests.Boolean `position:"Query" name:"InitLocalDisk"` - ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` DryRun requests.Boolean `position:"Query" name:"DryRun"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // StartInstanceResponse is the response struct for api StartInstance @@ -98,6 +93,7 @@ func CreateStartInstanceRequest() (request *StartInstanceRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "StartInstance", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_instances.go new file mode 100644 index 000000000..68d8f8d8b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/start_instances.go @@ -0,0 +1,106 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// StartInstances invokes the ecs.StartInstances API synchronously +func (client *Client) StartInstances(request *StartInstancesRequest) (response *StartInstancesResponse, err error) { + response = CreateStartInstancesResponse() + err = client.DoAction(request, response) + return +} + +// StartInstancesWithChan invokes the ecs.StartInstances API asynchronously +func (client *Client) StartInstancesWithChan(request *StartInstancesRequest) (<-chan *StartInstancesResponse, <-chan error) { + responseChan := make(chan *StartInstancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StartInstances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StartInstancesWithCallback invokes the ecs.StartInstances API asynchronously +func (client *Client) StartInstancesWithCallback(request *StartInstancesRequest, callback func(response *StartInstancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StartInstancesResponse + var err error + defer close(result) + response, err = client.StartInstances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StartInstancesRequest is the request struct for api StartInstances +type StartInstancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + BatchOptimization string `position:"Query" name:"BatchOptimization"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` +} + +// StartInstancesResponse is the response struct for api StartInstances +type StartInstancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceResponses InstanceResponsesInStartInstances `json:"InstanceResponses" xml:"InstanceResponses"` +} + +// CreateStartInstancesRequest creates a request to invoke StartInstances API +func CreateStartInstancesRequest() (request *StartInstancesRequest) { + request = &StartInstancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "StartInstances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateStartInstancesResponse creates a response to parse from StartInstances response +func CreateStartInstancesResponse() (response *StartInstancesResponse) { + response = &StartInstancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_instance.go index c9d5417db..6f22dec41 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_instance.go @@ -21,7 +21,6 @@ import ( ) // StopInstance invokes the ecs.StopInstance API synchronously -// api document: https://help.aliyun.com/api/ecs/stopinstance.html func (client *Client) StopInstance(request *StopInstanceRequest) (response *StopInstanceResponse, err error) { response = CreateStopInstanceResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) StopInstance(request *StopInstanceRequest) (response *Stop } // StopInstanceWithChan invokes the ecs.StopInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/stopinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) StopInstanceWithChan(request *StopInstanceRequest) (<-chan *StopInstanceResponse, <-chan error) { responseChan := make(chan *StopInstanceResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) StopInstanceWithChan(request *StopInstanceRequest) (<-chan } // StopInstanceWithCallback invokes the ecs.StopInstance API asynchronously -// api document: https://help.aliyun.com/api/ecs/stopinstance.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) StopInstanceWithCallback(request *StopInstanceRequest, callback func(response *StopInstanceResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,15 +72,15 @@ func (client *Client) StopInstanceWithCallback(request *StopInstanceRequest, cal type StopInstanceRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - DryRun requests.Boolean `position:"Query" name:"DryRun"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` - ConfirmStop requests.Boolean `position:"Query" name:"ConfirmStop"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` StoppedMode string `position:"Query" name:"StoppedMode"` - OwnerId requests.Integer `position:"Query" name:"OwnerId"` Hibernate requests.Boolean `position:"Query" name:"Hibernate"` ForceStop requests.Boolean `position:"Query" name:"ForceStop"` + ConfirmStop requests.Boolean `position:"Query" name:"ConfirmStop"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // StopInstanceResponse is the response struct for api StopInstance @@ -100,6 +95,7 @@ func CreateStopInstanceRequest() (request *StopInstanceRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "StopInstance", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_instances.go new file mode 100644 index 000000000..7195eaf1b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_instances.go @@ -0,0 +1,108 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" +) + +// StopInstances invokes the ecs.StopInstances API synchronously +func (client *Client) StopInstances(request *StopInstancesRequest) (response *StopInstancesResponse, err error) { + response = CreateStopInstancesResponse() + err = client.DoAction(request, response) + return +} + +// StopInstancesWithChan invokes the ecs.StopInstances API asynchronously +func (client *Client) StopInstancesWithChan(request *StopInstancesRequest) (<-chan *StopInstancesResponse, <-chan error) { + responseChan := make(chan *StopInstancesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StopInstances(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StopInstancesWithCallback invokes the ecs.StopInstances API asynchronously +func (client *Client) StopInstancesWithCallback(request *StopInstancesRequest, callback func(response *StopInstancesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StopInstancesResponse + var err error + defer close(result) + response, err = client.StopInstances(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StopInstancesRequest is the request struct for api StopInstances +type StopInstancesRequest struct { + *requests.RpcRequest + ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` + StoppedMode string `position:"Query" name:"StoppedMode"` + ForceStop requests.Boolean `position:"Query" name:"ForceStop"` + BatchOptimization string `position:"Query" name:"BatchOptimization"` + DryRun requests.Boolean `position:"Query" name:"DryRun"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId *[]string `position:"Query" name:"InstanceId" type:"Repeated"` +} + +// StopInstancesResponse is the response struct for api StopInstances +type StopInstancesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + InstanceResponses InstanceResponsesInStopInstances `json:"InstanceResponses" xml:"InstanceResponses"` +} + +// CreateStopInstancesRequest creates a request to invoke StopInstances API +func CreateStopInstancesRequest() (request *StopInstancesRequest) { + request = &StopInstancesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Ecs", "2014-05-26", "StopInstances", "ecs", "openAPI") + request.Method = requests.POST + return +} + +// CreateStopInstancesResponse creates a response to parse from StopInstances response +func CreateStopInstancesResponse() (response *StopInstancesResponse) { + response = &StopInstancesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_invocation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_invocation.go index c49dca582..87c98fcff 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_invocation.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/stop_invocation.go @@ -21,7 +21,6 @@ import ( ) // StopInvocation invokes the ecs.StopInvocation API synchronously -// api document: https://help.aliyun.com/api/ecs/stopinvocation.html func (client *Client) StopInvocation(request *StopInvocationRequest) (response *StopInvocationResponse, err error) { response = CreateStopInvocationResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) StopInvocation(request *StopInvocationRequest) (response * } // StopInvocationWithChan invokes the ecs.StopInvocation API asynchronously -// api document: https://help.aliyun.com/api/ecs/stopinvocation.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) StopInvocationWithChan(request *StopInvocationRequest) (<-chan *StopInvocationResponse, <-chan error) { responseChan := make(chan *StopInvocationResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) StopInvocationWithChan(request *StopInvocationRequest) (<- } // StopInvocationWithCallback invokes the ecs.StopInvocation API asynchronously -// api document: https://help.aliyun.com/api/ecs/stopinvocation.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) StopInvocationWithCallback(request *StopInvocationRequest, callback func(response *StopInvocationResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateStopInvocationRequest() (request *StopInvocationRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "StopInvocation", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_action_on_maintenance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_action_on_maintenance.go new file mode 100644 index 000000000..ded64a8be --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_action_on_maintenance.go @@ -0,0 +1,23 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ActionOnMaintenance is a nested struct in ecs response +type ActionOnMaintenance struct { + Value string `json:"Value" xml:"Value"` + DefaultValue string `json:"DefaultValue" xml:"DefaultValue"` + SupportedValues SupportedValues `json:"SupportedValues" xml:"SupportedValues"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activation.go new file mode 100644 index 000000000..983f85501 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activation.go @@ -0,0 +1,30 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Activation is a nested struct in ecs response +type Activation struct { + DeregisteredCount int `json:"DeregisteredCount" xml:"DeregisteredCount"` + InstanceCount int `json:"InstanceCount" xml:"InstanceCount"` + ActivationId string `json:"ActivationId" xml:"ActivationId"` + TimeToLiveInHours int64 `json:"TimeToLiveInHours" xml:"TimeToLiveInHours"` + RegisteredCount int `json:"RegisteredCount" xml:"RegisteredCount"` + Disabled bool `json:"Disabled" xml:"Disabled"` + InstanceName string `json:"InstanceName" xml:"InstanceName"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + Description string `json:"Description" xml:"Description"` + IpAddressRange string `json:"IpAddressRange" xml:"IpAddressRange"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activation_list.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activation_list.go new file mode 100644 index 000000000..393278eb6 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activation_list.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ActivationList is a nested struct in ecs response +type ActivationList struct { + Activation []Activation `json:"Activation" xml:"Activation"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activity_detail.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activity_detail.go new file mode 100644 index 000000000..e7357ee9f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activity_detail.go @@ -0,0 +1,22 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ActivityDetail is a nested struct in ecs response +type ActivityDetail struct { + Detail string `json:"Detail" xml:"Detail"` + Status string `json:"Status" xml:"Status"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activity_details.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activity_details.go new file mode 100644 index 000000000..78888ade1 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_activity_details.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ActivityDetails is a nested struct in ecs response +type ActivityDetails struct { + ActivityDetail []ActivityDetail `json:"ActivityDetail" xml:"ActivityDetail"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_add_accounts.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_add_accounts.go new file mode 100644 index 000000000..95e5bb647 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_add_accounts.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AddAccounts is a nested struct in ecs response +type AddAccounts struct { + AddAccount []string `json:"AddAccount" xml:"AddAccount"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resource.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resource.go new file mode 100644 index 000000000..f7bca64d4 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resource.go @@ -0,0 +1,24 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AllocatedResource is a nested struct in ecs response +type AllocatedResource struct { + TotalAmount int `json:"TotalAmount" xml:"TotalAmount"` + InstanceType string `json:"InstanceType" xml:"InstanceType"` + UsedAmount int `json:"UsedAmount" xml:"UsedAmount"` + ZoneId string `json:"zoneId" xml:"zoneId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resources_in_describe_capacity_reservations.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resources_in_describe_capacity_reservations.go new file mode 100644 index 000000000..98dd768ab --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resources_in_describe_capacity_reservations.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AllocatedResourcesInDescribeCapacityReservations is a nested struct in ecs response +type AllocatedResourcesInDescribeCapacityReservations struct { + AllocatedResource []AllocatedResource `json:"AllocatedResource" xml:"AllocatedResource"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resources_in_describe_elasticity_assurances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resources_in_describe_elasticity_assurances.go new file mode 100644 index 000000000..f6198ae42 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_allocated_resources_in_describe_elasticity_assurances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AllocatedResourcesInDescribeElasticityAssurances is a nested struct in ecs response +type AllocatedResourcesInDescribeElasticityAssurances struct { + AllocatedResource []AllocatedResource `json:"AllocatedResource" xml:"AllocatedResource"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_assigned_private_ip_addresses_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_assigned_private_ip_addresses_set.go new file mode 100644 index 000000000..f9b503d8c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_assigned_private_ip_addresses_set.go @@ -0,0 +1,22 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AssignedPrivateIpAddressesSet is a nested struct in ecs response +type AssignedPrivateIpAddressesSet struct { + NetworkInterfaceId string `json:"NetworkInterfaceId" xml:"NetworkInterfaceId"` + PrivateIpSet PrivateIpSetInAssignPrivateIpAddresses `json:"PrivateIpSet" xml:"PrivateIpSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_attachment.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_attachment.go new file mode 100644 index 000000000..f2dbe0d27 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_attachment.go @@ -0,0 +1,24 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Attachment is a nested struct in ecs response +type Attachment struct { + InstanceId string `json:"InstanceId" xml:"InstanceId"` + DeviceIndex int `json:"DeviceIndex" xml:"DeviceIndex"` + TrunkNetworkInterfaceId string `json:"TrunkNetworkInterfaceId" xml:"TrunkNetworkInterfaceId"` + MemberNetworkInterfaceIds MemberNetworkInterfaceIds `json:"MemberNetworkInterfaceIds" xml:"MemberNetworkInterfaceIds"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group.go new file mode 100644 index 000000000..1054bdf16 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group.go @@ -0,0 +1,39 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AutoProvisioningGroup is a nested struct in ecs response +type AutoProvisioningGroup struct { + AutoProvisioningGroupId string `json:"AutoProvisioningGroupId" xml:"AutoProvisioningGroupId"` + AutoProvisioningGroupName string `json:"AutoProvisioningGroupName" xml:"AutoProvisioningGroupName"` + AutoProvisioningGroupType string `json:"AutoProvisioningGroupType" xml:"AutoProvisioningGroupType"` + Status string `json:"Status" xml:"Status"` + State string `json:"State" xml:"State"` + RegionId string `json:"RegionId" xml:"RegionId"` + ValidFrom string `json:"ValidFrom" xml:"ValidFrom"` + ValidUntil string `json:"ValidUntil" xml:"ValidUntil"` + ExcessCapacityTerminationPolicy string `json:"ExcessCapacityTerminationPolicy" xml:"ExcessCapacityTerminationPolicy"` + MaxSpotPrice float64 `json:"MaxSpotPrice" xml:"MaxSpotPrice"` + LaunchTemplateId string `json:"LaunchTemplateId" xml:"LaunchTemplateId"` + LaunchTemplateVersion string `json:"LaunchTemplateVersion" xml:"LaunchTemplateVersion"` + TerminateInstances bool `json:"TerminateInstances" xml:"TerminateInstances"` + TerminateInstancesWithExpiration bool `json:"TerminateInstancesWithExpiration" xml:"TerminateInstancesWithExpiration"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + SpotOptions SpotOptions `json:"SpotOptions" xml:"SpotOptions"` + PayAsYouGoOptions PayAsYouGoOptions `json:"PayAsYouGoOptions" xml:"PayAsYouGoOptions"` + TargetCapacitySpecification TargetCapacitySpecification `json:"TargetCapacitySpecification" xml:"TargetCapacitySpecification"` + LaunchTemplateConfigs LaunchTemplateConfigs `json:"LaunchTemplateConfigs" xml:"LaunchTemplateConfigs"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group_histories.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group_histories.go new file mode 100644 index 000000000..8965b9aa7 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group_histories.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AutoProvisioningGroupHistories is a nested struct in ecs response +type AutoProvisioningGroupHistories struct { + AutoProvisioningGroupHistory []AutoProvisioningGroupHistory `json:"AutoProvisioningGroupHistory" xml:"AutoProvisioningGroupHistory"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group_history.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group_history.go new file mode 100644 index 000000000..f8f752409 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_group_history.go @@ -0,0 +1,25 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AutoProvisioningGroupHistory is a nested struct in ecs response +type AutoProvisioningGroupHistory struct { + TaskId string `json:"TaskId" xml:"TaskId"` + Status string `json:"Status" xml:"Status"` + LastEventTime string `json:"LastEventTime" xml:"LastEventTime"` + StartTime string `json:"StartTime" xml:"StartTime"` + ActivityDetails ActivityDetails `json:"ActivityDetails" xml:"ActivityDetails"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_groups.go new file mode 100644 index 000000000..9504128d0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_provisioning_groups.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AutoProvisioningGroups is a nested struct in ecs response +type AutoProvisioningGroups struct { + AutoProvisioningGroup []AutoProvisioningGroup `json:"AutoProvisioningGroup" xml:"AutoProvisioningGroup"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_snapshot_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_snapshot_policy.go index 1b3e85e6e..c2e8e41e8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_snapshot_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_auto_snapshot_policy.go @@ -17,14 +17,18 @@ package ecs // AutoSnapshotPolicy is a nested struct in ecs response type AutoSnapshotPolicy struct { - AutoSnapshotPolicyId string `json:"AutoSnapshotPolicyId" xml:"AutoSnapshotPolicyId"` - RegionId string `json:"RegionId" xml:"RegionId"` - AutoSnapshotPolicyName string `json:"AutoSnapshotPolicyName" xml:"AutoSnapshotPolicyName"` - TimePoints string `json:"TimePoints" xml:"TimePoints"` - RepeatWeekdays string `json:"RepeatWeekdays" xml:"RepeatWeekdays"` - RetentionDays int `json:"RetentionDays" xml:"RetentionDays"` - DiskNums int `json:"DiskNums" xml:"DiskNums"` - VolumeNums int `json:"VolumeNums" xml:"VolumeNums"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - Status string `json:"Status" xml:"Status"` + AutoSnapshotPolicyId string `json:"AutoSnapshotPolicyId" xml:"AutoSnapshotPolicyId"` + RegionId string `json:"RegionId" xml:"RegionId"` + AutoSnapshotPolicyName string `json:"AutoSnapshotPolicyName" xml:"AutoSnapshotPolicyName"` + TimePoints string `json:"TimePoints" xml:"TimePoints"` + RepeatWeekdays string `json:"RepeatWeekdays" xml:"RepeatWeekdays"` + RetentionDays int `json:"RetentionDays" xml:"RetentionDays"` + DiskNums int `json:"DiskNums" xml:"DiskNums"` + VolumeNums int `json:"VolumeNums" xml:"VolumeNums"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + Status string `json:"Status" xml:"Status"` + EnableCrossRegionCopy bool `json:"EnableCrossRegionCopy" xml:"EnableCrossRegionCopy"` + TargetCopyRegions string `json:"TargetCopyRegions" xml:"TargetCopyRegions"` + CopiedSnapshotsRetentionDays int `json:"CopiedSnapshotsRetentionDays" xml:"CopiedSnapshotsRetentionDays"` + Tags TagsInDescribeAutoSnapshotPolicyEx `json:"Tags" xml:"Tags"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_type.go new file mode 100644 index 000000000..2e0a995fb --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_type.go @@ -0,0 +1,22 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AvailableInstanceType is a nested struct in ecs response +type AvailableInstanceType struct { + InstanceType string `json:"InstanceType" xml:"InstanceType"` + AvailableInstanceCapacity int `json:"AvailableInstanceCapacity" xml:"AvailableInstanceCapacity"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types_in_describe_dedicated_host_clusters.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types_in_describe_dedicated_host_clusters.go new file mode 100644 index 000000000..c1cff92af --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types_in_describe_dedicated_host_clusters.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AvailableInstanceTypesInDescribeDedicatedHostClusters is a nested struct in ecs response +type AvailableInstanceTypesInDescribeDedicatedHostClusters struct { + AvailableInstanceType []AvailableInstanceType `json:"AvailableInstanceType" xml:"AvailableInstanceType"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types_in_describe_zones.go similarity index 85% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types_in_describe_zones.go index 295337169..0dd5075d6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_instance_types_in_describe_zones.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// AvailableInstanceTypes is a nested struct in ecs response -type AvailableInstanceTypes struct { +// AvailableInstanceTypesInDescribeZones is a nested struct in ecs response +type AvailableInstanceTypesInDescribeZones struct { InstanceTypes []string `json:"InstanceTypes" xml:"InstanceTypes"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_resource.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_resource.go index 04d8e63ae..ea33755a0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_resource.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_resource.go @@ -17,6 +17,6 @@ package ecs // AvailableResource is a nested struct in ecs response type AvailableResource struct { - Type string `json:"Type" xml:"Type"` - SupportedResources SupportedResourcesInDescribeResourcesModification `json:"SupportedResources" xml:"SupportedResources"` + Type string `json:"Type" xml:"Type"` + SupportedResources SupportedResourcesInDescribeAvailableResource `json:"SupportedResources" xml:"SupportedResources"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_resource.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_resource.go new file mode 100644 index 000000000..5bd37e0ae --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_resource.go @@ -0,0 +1,24 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AvailableSpotResource is a nested struct in ecs response +type AvailableSpotResource struct { + InstanceType string `json:"InstanceType" xml:"InstanceType"` + InterruptionRate float64 `json:"InterruptionRate" xml:"InterruptionRate"` + InterruptRateDesc string `json:"InterruptRateDesc" xml:"InterruptRateDesc"` + AverageSpotDiscount int `json:"AverageSpotDiscount" xml:"AverageSpotDiscount"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_resources.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_resources.go new file mode 100644 index 000000000..7ac39a367 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_resources.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AvailableSpotResources is a nested struct in ecs response +type AvailableSpotResources struct { + AvailableSpotResource []AvailableSpotResource `json:"AvailableSpotResource" xml:"AvailableSpotResource"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_zone.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_zone.go new file mode 100644 index 000000000..35eaab04f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_zone.go @@ -0,0 +1,22 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AvailableSpotZone is a nested struct in ecs response +type AvailableSpotZone struct { + ZoneId string `json:"ZoneId" xml:"ZoneId"` + AvailableSpotResources AvailableSpotResources `json:"AvailableSpotResources" xml:"AvailableSpotResources"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_zones.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_zones.go new file mode 100644 index 000000000..aff52de43 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_spot_zones.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AvailableSpotZones is a nested struct in ecs response +type AvailableSpotZones struct { + AvailableSpotZone []AvailableSpotZone `json:"AvailableSpotZone" xml:"AvailableSpotZone"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_zone.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_zone.go index 8c9df9078..982e3392f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_zone.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_available_zone.go @@ -17,9 +17,9 @@ package ecs // AvailableZone is a nested struct in ecs response type AvailableZone struct { - RegionId string `json:"RegionId" xml:"RegionId"` - ZoneId string `json:"ZoneId" xml:"ZoneId"` - StatusCategory string `json:"StatusCategory" xml:"StatusCategory"` - Status string `json:"Status" xml:"Status"` - AvailableResources AvailableResourcesInDescribeResourcesModification `json:"AvailableResources" xml:"AvailableResources"` + RegionId string `json:"RegionId" xml:"RegionId"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + StatusCategory string `json:"StatusCategory" xml:"StatusCategory"` + Status string `json:"Status" xml:"Status"` + AvailableResources AvailableResourcesInDescribeAvailableResource `json:"AvailableResources" xml:"AvailableResources"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_item.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_item.go new file mode 100644 index 000000000..bbd563dca --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_item.go @@ -0,0 +1,35 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// CapacityReservationItem is a nested struct in ecs response +type CapacityReservationItem struct { + PrivatePoolOptionsName string `json:"PrivatePoolOptionsName" xml:"PrivatePoolOptionsName"` + EndTimeType string `json:"EndTimeType" xml:"EndTimeType"` + PrivatePoolOptionsMatchCriteria string `json:"PrivatePoolOptionsMatchCriteria" xml:"PrivatePoolOptionsMatchCriteria"` + TimeSlot string `json:"TimeSlot" xml:"TimeSlot"` + Platform string `json:"Platform" xml:"Platform"` + RegionId string `json:"RegionId" xml:"RegionId"` + StartTime string `json:"StartTime" xml:"StartTime"` + EndTime string `json:"EndTime" xml:"EndTime"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + Status string `json:"Status" xml:"Status"` + Description string `json:"Description" xml:"Description"` + InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"` + PrivatePoolOptionsId string `json:"PrivatePoolOptionsId" xml:"PrivatePoolOptionsId"` + Tags TagsInDescribeCapacityReservations `json:"Tags" xml:"Tags"` + AllocatedResources AllocatedResourcesInDescribeCapacityReservations `json:"AllocatedResources" xml:"AllocatedResources"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_item_in_describe_capacity_reservation_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_item_in_describe_capacity_reservation_instances.go new file mode 100644 index 000000000..2d0cafa60 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_item_in_describe_capacity_reservation_instances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// CapacityReservationItemInDescribeCapacityReservationInstances is a nested struct in ecs response +type CapacityReservationItemInDescribeCapacityReservationInstances struct { + InstanceIdSet []InstanceIdSet `json:"InstanceIdSet" xml:"InstanceIdSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_set.go new file mode 100644 index 000000000..ce79326b0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_capacity_reservation_set.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// CapacityReservationSet is a nested struct in ecs response +type CapacityReservationSet struct { + CapacityReservationItem []CapacityReservationItem `json:"CapacityReservationItem" xml:"CapacityReservationItem"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_command.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_command.go index 2217de564..707469dd1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_command.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_command.go @@ -17,12 +17,19 @@ package ecs // Command is a nested struct in ecs response type Command struct { - CommandId string `json:"CommandId" xml:"CommandId"` - Name string `json:"Name" xml:"Name"` - Type string `json:"Type" xml:"Type"` - Description string `json:"Description" xml:"Description"` - CommandContent string `json:"CommandContent" xml:"CommandContent"` - WorkingDir string `json:"WorkingDir" xml:"WorkingDir"` - Timeout int `json:"Timeout" xml:"Timeout"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` + CommandId string `json:"CommandId" xml:"CommandId"` + Name string `json:"Name" xml:"Name"` + Type string `json:"Type" xml:"Type"` + Version int `json:"Version" xml:"Version"` + Latest bool `json:"Latest" xml:"Latest"` + Provider string `json:"Provider" xml:"Provider"` + Category string `json:"Category" xml:"Category"` + Description string `json:"Description" xml:"Description"` + CommandContent string `json:"CommandContent" xml:"CommandContent"` + WorkingDir string `json:"WorkingDir" xml:"WorkingDir"` + Timeout int64 `json:"Timeout" xml:"Timeout"` + InvokeTimes int `json:"InvokeTimes" xml:"InvokeTimes"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + EnableParameter bool `json:"EnableParameter" xml:"EnableParameter"` + ParameterNames ParameterNames `json:"ParameterNames" xml:"ParameterNames"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_cpu_options.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_cpu_options.go new file mode 100644 index 000000000..7980b9932 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_cpu_options.go @@ -0,0 +1,23 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// CpuOptions is a nested struct in ecs response +type CpuOptions struct { + CoreCount int `json:"CoreCount" xml:"CoreCount"` + ThreadsPerCore int `json:"ThreadsPerCore" xml:"ThreadsPerCore"` + Numa string `json:"Numa" xml:"Numa"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_data_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_data_disk.go index 515b0f467..0f4269f5e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_data_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_data_disk.go @@ -25,4 +25,5 @@ type DataDisk struct { Description string `json:"Description" xml:"Description"` DeleteWithInstance bool `json:"DeleteWithInstance" xml:"DeleteWithInstance"` Device string `json:"Device" xml:"Device"` + PerformanceLevel string `json:"PerformanceLevel" xml:"PerformanceLevel"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_data_point.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_data_point.go index 550541b20..f7509b9b6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_data_point.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_data_point.go @@ -18,5 +18,5 @@ package ecs // DataPoint is a nested struct in ecs response type DataPoint struct { TimeStamp string `json:"TimeStamp" xml:"TimeStamp"` - Size int `json:"Size" xml:"Size"` + Size int64 `json:"Size" xml:"Size"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host.go index 75856705c..13489e2a5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host.go @@ -17,30 +17,35 @@ package ecs // DedicatedHost is a nested struct in ecs response type DedicatedHost struct { - DedicatedHostId string `json:"DedicatedHostId" xml:"DedicatedHostId"` - RegionId string `json:"RegionId" xml:"RegionId"` - ZoneId string `json:"ZoneId" xml:"ZoneId"` - DedicatedHostName string `json:"DedicatedHostName" xml:"DedicatedHostName"` - MachineId string `json:"MachineId" xml:"MachineId"` - Description string `json:"Description" xml:"Description"` - DedicatedHostType string `json:"DedicatedHostType" xml:"DedicatedHostType"` - Sockets int `json:"Sockets" xml:"Sockets"` - Cores int `json:"Cores" xml:"Cores"` - PhysicalGpus int `json:"PhysicalGpus" xml:"PhysicalGpus"` - GPUSpec string `json:"GPUSpec" xml:"GPUSpec"` - ActionOnMaintenance string `json:"ActionOnMaintenance" xml:"ActionOnMaintenance"` - Status string `json:"Status" xml:"Status"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - ChargeType string `json:"ChargeType" xml:"ChargeType"` - SaleCycle string `json:"SaleCycle" xml:"SaleCycle"` - ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` - AutoReleaseTime string `json:"AutoReleaseTime" xml:"AutoReleaseTime"` - ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - SupportedInstanceTypeFamilies SupportedInstanceTypeFamiliesInDescribeDedicatedHosts `json:"SupportedInstanceTypeFamilies" xml:"SupportedInstanceTypeFamilies"` - SupportedInstanceTypesList SupportedInstanceTypesListInDescribeDedicatedHosts `json:"SupportedInstanceTypesList" xml:"SupportedInstanceTypesList"` - Capacity Capacity `json:"Capacity" xml:"Capacity"` - NetworkAttributes NetworkAttributes `json:"NetworkAttributes" xml:"NetworkAttributes"` - Instances InstancesInDescribeDedicatedHosts `json:"Instances" xml:"Instances"` - OperationLocks OperationLocksInDescribeDedicatedHosts `json:"OperationLocks" xml:"OperationLocks"` - Tags TagsInDescribeDedicatedHosts `json:"Tags" xml:"Tags"` + DedicatedHostId string `json:"DedicatedHostId" xml:"DedicatedHostId"` + AutoPlacement string `json:"AutoPlacement" xml:"AutoPlacement"` + RegionId string `json:"RegionId" xml:"RegionId"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + DedicatedHostName string `json:"DedicatedHostName" xml:"DedicatedHostName"` + MachineId string `json:"MachineId" xml:"MachineId"` + Description string `json:"Description" xml:"Description"` + DedicatedHostType string `json:"DedicatedHostType" xml:"DedicatedHostType"` + Sockets int `json:"Sockets" xml:"Sockets"` + Cores int `json:"Cores" xml:"Cores"` + PhysicalGpus int `json:"PhysicalGpus" xml:"PhysicalGpus"` + GPUSpec string `json:"GPUSpec" xml:"GPUSpec"` + ActionOnMaintenance string `json:"ActionOnMaintenance" xml:"ActionOnMaintenance"` + Status string `json:"Status" xml:"Status"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ChargeType string `json:"ChargeType" xml:"ChargeType"` + SaleCycle string `json:"SaleCycle" xml:"SaleCycle"` + ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` + AutoReleaseTime string `json:"AutoReleaseTime" xml:"AutoReleaseTime"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + DedicatedHostClusterId string `json:"DedicatedHostClusterId" xml:"DedicatedHostClusterId"` + CpuOverCommitRatio float64 `json:"CpuOverCommitRatio" xml:"CpuOverCommitRatio"` + SupportedInstanceTypeFamilies SupportedInstanceTypeFamiliesInDescribeDedicatedHosts `json:"SupportedInstanceTypeFamilies" xml:"SupportedInstanceTypeFamilies"` + SupportedCustomInstanceTypeFamilies SupportedCustomInstanceTypeFamilies `json:"SupportedCustomInstanceTypeFamilies" xml:"SupportedCustomInstanceTypeFamilies"` + SupportedInstanceTypesList SupportedInstanceTypesListInDescribeDedicatedHosts `json:"SupportedInstanceTypesList" xml:"SupportedInstanceTypesList"` + Capacity Capacity `json:"Capacity" xml:"Capacity"` + NetworkAttributes NetworkAttributes `json:"NetworkAttributes" xml:"NetworkAttributes"` + HostDetailInfo HostDetailInfo `json:"HostDetailInfo" xml:"HostDetailInfo"` + Instances InstancesInDescribeDedicatedHosts `json:"Instances" xml:"Instances"` + OperationLocks OperationLocksInDescribeDedicatedHosts `json:"OperationLocks" xml:"OperationLocks"` + Tags TagsInDescribeDedicatedHosts `json:"Tags" xml:"Tags"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_attribute.go index 98153a1b3..dfeca4061 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_attribute.go @@ -17,6 +17,7 @@ package ecs // DedicatedHostAttribute is a nested struct in ecs response type DedicatedHostAttribute struct { - DedicatedHostName string `json:"DedicatedHostName" xml:"DedicatedHostName"` - DedicatedHostId string `json:"DedicatedHostId" xml:"DedicatedHostId"` + DedicatedHostName string `json:"DedicatedHostName" xml:"DedicatedHostName"` + DedicatedHostClusterId string `json:"DedicatedHostClusterId" xml:"DedicatedHostClusterId"` + DedicatedHostId string `json:"DedicatedHostId" xml:"DedicatedHostId"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_cluster.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_cluster.go new file mode 100644 index 000000000..93f0f265a --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_cluster.go @@ -0,0 +1,29 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DedicatedHostCluster is a nested struct in ecs response +type DedicatedHostCluster struct { + DedicatedHostClusterId string `json:"DedicatedHostClusterId" xml:"DedicatedHostClusterId"` + RegionId string `json:"RegionId" xml:"RegionId"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + DedicatedHostClusterName string `json:"DedicatedHostClusterName" xml:"DedicatedHostClusterName"` + Description string `json:"Description" xml:"Description"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + DedicatedHostIds DedicatedHostIds `json:"DedicatedHostIds" xml:"DedicatedHostIds"` + DedicatedHostClusterCapacity DedicatedHostClusterCapacity `json:"DedicatedHostClusterCapacity" xml:"DedicatedHostClusterCapacity"` + Tags TagsInDescribeDedicatedHostClusters `json:"Tags" xml:"Tags"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_cluster_capacity.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_cluster_capacity.go new file mode 100644 index 000000000..509dbb3be --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_cluster_capacity.go @@ -0,0 +1,26 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DedicatedHostClusterCapacity is a nested struct in ecs response +type DedicatedHostClusterCapacity struct { + TotalVcpus int `json:"TotalVcpus" xml:"TotalVcpus"` + AvailableVcpus int `json:"AvailableVcpus" xml:"AvailableVcpus"` + TotalMemory int `json:"TotalMemory" xml:"TotalMemory"` + AvailableMemory int `json:"AvailableMemory" xml:"AvailableMemory"` + LocalStorageCapacities LocalStorageCapacities `json:"LocalStorageCapacities" xml:"LocalStorageCapacities"` + AvailableInstanceTypes AvailableInstanceTypesInDescribeDedicatedHostClusters `json:"AvailableInstanceTypes" xml:"AvailableInstanceTypes"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_clusters.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_clusters.go new file mode 100644 index 000000000..f2076d9b8 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_clusters.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DedicatedHostClusters is a nested struct in ecs response +type DedicatedHostClusters struct { + DedicatedHostCluster []DedicatedHostCluster `json:"DedicatedHostCluster" xml:"DedicatedHostCluster"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_ids.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_ids.go new file mode 100644 index 000000000..d14abb2f6 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_ids.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DedicatedHostIds is a nested struct in ecs response +type DedicatedHostIds struct { + DedicatedHostId []string `json:"DedicatedHostId" xml:"DedicatedHostId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_type.go index eb4f891eb..12120702f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_host_type.go @@ -24,10 +24,12 @@ type DedicatedHostType struct { Cores int `json:"Cores" xml:"Cores"` PhysicalGpus int `json:"PhysicalGpus" xml:"PhysicalGpus"` MemorySize float64 `json:"MemorySize" xml:"MemorySize"` - LocalStorageCapacity int `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"` + LocalStorageCapacity int64 `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"` LocalStorageAmount int `json:"LocalStorageAmount" xml:"LocalStorageAmount"` LocalStorageCategory string `json:"LocalStorageCategory" xml:"LocalStorageCategory"` GPUSpec string `json:"GPUSpec" xml:"GPUSpec"` + SupportCpuOverCommitRatio bool `json:"SupportCpuOverCommitRatio" xml:"SupportCpuOverCommitRatio"` + CpuOverCommitRatioRange string `json:"CpuOverCommitRatioRange" xml:"CpuOverCommitRatioRange"` SupportedInstanceTypeFamilies SupportedInstanceTypeFamiliesInDescribeDedicatedHostTypes `json:"SupportedInstanceTypeFamilies" xml:"SupportedInstanceTypeFamilies"` SupportedInstanceTypesList SupportedInstanceTypesListInDescribeDedicatedHostTypes `json:"SupportedInstanceTypesList" xml:"SupportedInstanceTypesList"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_instance_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_instance_attribute.go new file mode 100644 index 000000000..893926659 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_dedicated_instance_attribute.go @@ -0,0 +1,22 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DedicatedInstanceAttribute is a nested struct in ecs response +type DedicatedInstanceAttribute struct { + Tenancy string `json:"Tenancy" xml:"Tenancy"` + Affinity string `json:"Affinity" xml:"Affinity"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_demand.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_demand.go index a64888f45..6165df558 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_demand.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_demand.go @@ -20,6 +20,10 @@ type Demand struct { ZoneId string `json:"ZoneId" xml:"ZoneId"` DemandTime string `json:"DemandTime" xml:"DemandTime"` InstanceTypeFamily string `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"` + DemandId string `json:"DemandId" xml:"DemandId"` + DemandName string `json:"DemandName" xml:"DemandName"` + Comment string `json:"Comment" xml:"Comment"` + DemandDescription string `json:"DemandDescription" xml:"DemandDescription"` InstanceType string `json:"InstanceType" xml:"InstanceType"` InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"` Period int `json:"Period" xml:"Period"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_deployment_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_deployment_set.go index c1f0b4631..e028cf141 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_deployment_set.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_deployment_set.go @@ -17,14 +17,15 @@ package ecs // DeploymentSet is a nested struct in ecs response type DeploymentSet struct { - DeploymentSetId string `json:"DeploymentSetId" xml:"DeploymentSetId"` - DeploymentSetDescription string `json:"DeploymentSetDescription" xml:"DeploymentSetDescription"` - DeploymentSetName string `json:"DeploymentSetName" xml:"DeploymentSetName"` - Strategy string `json:"Strategy" xml:"Strategy"` - DeploymentStrategy string `json:"DeploymentStrategy" xml:"DeploymentStrategy"` - Domain string `json:"Domain" xml:"Domain"` - Granularity string `json:"Granularity" xml:"Granularity"` - InstanceAmount int `json:"InstanceAmount" xml:"InstanceAmount"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - InstanceIds InstanceIds `json:"InstanceIds" xml:"InstanceIds"` + DeploymentSetId string `json:"DeploymentSetId" xml:"DeploymentSetId"` + DeploymentSetDescription string `json:"DeploymentSetDescription" xml:"DeploymentSetDescription"` + DeploymentSetName string `json:"DeploymentSetName" xml:"DeploymentSetName"` + Strategy string `json:"Strategy" xml:"Strategy"` + DeploymentStrategy string `json:"DeploymentStrategy" xml:"DeploymentStrategy"` + Domain string `json:"Domain" xml:"Domain"` + Granularity string `json:"Granularity" xml:"Granularity"` + GroupCount int `json:"GroupCount" xml:"GroupCount"` + InstanceAmount int `json:"InstanceAmount" xml:"InstanceAmount"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + InstanceIds InstanceIdsInDescribeDeploymentSets `json:"InstanceIds" xml:"InstanceIds"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk.go index e1ca7d5e5..2734b7b29 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk.go @@ -17,39 +17,44 @@ package ecs // Disk is a nested struct in ecs response type Disk struct { + Category string `json:"Category" xml:"Category"` + BdfId string `json:"BdfId" xml:"BdfId"` + ImageId string `json:"ImageId" xml:"ImageId"` + AutoSnapshotPolicyId string `json:"AutoSnapshotPolicyId" xml:"AutoSnapshotPolicyId"` + DeleteAutoSnapshot bool `json:"DeleteAutoSnapshot" xml:"DeleteAutoSnapshot"` + EnableAutomatedSnapshotPolicy bool `json:"EnableAutomatedSnapshotPolicy" xml:"EnableAutomatedSnapshotPolicy"` DiskId string `json:"DiskId" xml:"DiskId"` + SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` + Size int `json:"Size" xml:"Size"` + IOPS int `json:"IOPS" xml:"IOPS"` RegionId string `json:"RegionId" xml:"RegionId"` - ZoneId string `json:"ZoneId" xml:"ZoneId"` - DiskName string `json:"DiskName" xml:"DiskName"` + MountInstanceNum int `json:"MountInstanceNum" xml:"MountInstanceNum"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + StorageSetId string `json:"StorageSetId" xml:"StorageSetId"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` Description string `json:"Description" xml:"Description"` Type string `json:"Type" xml:"Type"` - Category string `json:"Category" xml:"Category"` - Size int `json:"Size" xml:"Size"` - ImageId string `json:"ImageId" xml:"ImageId"` + ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` + Device string `json:"Device" xml:"Device"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + IOPSRead int `json:"IOPSRead" xml:"IOPSRead"` SourceSnapshotId string `json:"SourceSnapshotId" xml:"SourceSnapshotId"` - AutoSnapshotPolicyId string `json:"AutoSnapshotPolicyId" xml:"AutoSnapshotPolicyId"` + StorageSetPartitionNumber int `json:"StorageSetPartitionNumber" xml:"StorageSetPartitionNumber"` ProductCode string `json:"ProductCode" xml:"ProductCode"` Portable bool `json:"Portable" xml:"Portable"` - Status string `json:"Status" xml:"Status"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - Device string `json:"Device" xml:"Device"` - DeleteWithInstance bool `json:"DeleteWithInstance" xml:"DeleteWithInstance"` - DeleteAutoSnapshot bool `json:"DeleteAutoSnapshot" xml:"DeleteAutoSnapshot"` - EnableAutoSnapshot bool `json:"EnableAutoSnapshot" xml:"EnableAutoSnapshot"` - EnableAutomatedSnapshotPolicy bool `json:"EnableAutomatedSnapshotPolicy" xml:"EnableAutomatedSnapshotPolicy"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - AttachedTime string `json:"AttachedTime" xml:"AttachedTime"` - DetachedTime string `json:"DetachedTime" xml:"DetachedTime"` - DiskChargeType string `json:"DiskChargeType" xml:"DiskChargeType"` - ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` - ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - Encrypted bool `json:"Encrypted" xml:"Encrypted"` - MountInstanceNum int `json:"MountInstanceNum" xml:"MountInstanceNum"` - IOPS int `json:"IOPS" xml:"IOPS"` - IOPSRead int `json:"IOPSRead" xml:"IOPSRead"` - IOPSWrite int `json:"IOPSWrite" xml:"IOPSWrite"` KMSKeyId string `json:"KMSKeyId" xml:"KMSKeyId"` - OperationLocks OperationLocksInDescribeDisks `json:"OperationLocks" xml:"OperationLocks"` - MountInstances MountInstances `json:"MountInstances" xml:"MountInstances"` + Encrypted bool `json:"Encrypted" xml:"Encrypted"` + EnableAutoSnapshot bool `json:"EnableAutoSnapshot" xml:"EnableAutoSnapshot"` + DetachedTime string `json:"DetachedTime" xml:"DetachedTime"` + DeleteWithInstance bool `json:"DeleteWithInstance" xml:"DeleteWithInstance"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + DiskChargeType string `json:"DiskChargeType" xml:"DiskChargeType"` + PerformanceLevel string `json:"PerformanceLevel" xml:"PerformanceLevel"` + DiskName string `json:"DiskName" xml:"DiskName"` + Status string `json:"Status" xml:"Status"` + AttachedTime string `json:"AttachedTime" xml:"AttachedTime"` + IOPSWrite int `json:"IOPSWrite" xml:"IOPSWrite"` Tags TagsInDescribeDisks `json:"Tags" xml:"Tags"` + MountInstances MountInstances `json:"MountInstances" xml:"MountInstances"` + OperationLocks OperationLocksInDescribeDisks `json:"OperationLocks" xml:"OperationLocks"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mapping.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mapping.go index 68a97fd58..7fbb641a8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mapping.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mapping.go @@ -17,13 +17,13 @@ package ecs // DiskDeviceMapping is a nested struct in ecs response type DiskDeviceMapping struct { - SnapshotId string `json:"SnapshotId" xml:"SnapshotId"` - Size string `json:"Size" xml:"Size"` - Device string `json:"Device" xml:"Device"` - Type string `json:"Type" xml:"Type"` - Format string `json:"Format" xml:"Format"` - ImportOSSBucket string `json:"ImportOSSBucket" xml:"ImportOSSBucket"` - ImportOSSObject string `json:"ImportOSSObject" xml:"ImportOSSObject"` Progress string `json:"Progress" xml:"Progress"` + Format string `json:"Format" xml:"Format"` + Device string `json:"Device" xml:"Device"` + Size string `json:"Size" xml:"Size"` RemainTime int `json:"RemainTime" xml:"RemainTime"` + SnapshotId string `json:"SnapshotId" xml:"SnapshotId"` + ImportOSSObject string `json:"ImportOSSObject" xml:"ImportOSSObject"` + ImportOSSBucket string `json:"ImportOSSBucket" xml:"ImportOSSBucket"` + Type string `json:"Type" xml:"Type"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings_in_describe_image_from_family.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings_in_describe_image_from_family.go new file mode 100644 index 000000000..2f30fbf5c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings_in_describe_image_from_family.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DiskDeviceMappingsInDescribeImageFromFamily is a nested struct in ecs response +type DiskDeviceMappingsInDescribeImageFromFamily struct { + DiskDeviceMapping []DiskDeviceMapping `json:"DiskDeviceMapping" xml:"DiskDeviceMapping"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings_in_describe_images.go similarity index 86% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings_in_describe_images.go index 9585dcfb5..39d99d15a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_device_mappings_in_describe_images.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DiskDeviceMappings is a nested struct in ecs response -type DiskDeviceMappings struct { +// DiskDeviceMappingsInDescribeImages is a nested struct in ecs response +type DiskDeviceMappingsInDescribeImages struct { DiskDeviceMapping []DiskDeviceMapping `json:"DiskDeviceMapping" xml:"DiskDeviceMapping"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_event_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_event_type.go index 56f1324d8..4f46091d3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_event_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disk_event_type.go @@ -20,5 +20,6 @@ type DiskEventType struct { EventId string `json:"EventId" xml:"EventId"` EventTime string `json:"EventTime" xml:"EventTime"` EventEndTime string `json:"EventEndTime" xml:"EventEndTime"` + ImpactLevel string `json:"ImpactLevel" xml:"ImpactLevel"` EventType EventType `json:"EventType" xml:"EventType"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks_in_describe_disks.go similarity index 88% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks_in_describe_disks.go index 789dd5772..7b4b95107 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks_in_describe_disks.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Disks is a nested struct in ecs response -type Disks struct { +// DisksInDescribeDisks is a nested struct in ecs response +type DisksInDescribeDisks struct { Disk []Disk `json:"Disk" xml:"Disk"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks_in_describe_storage_set_details.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks_in_describe_storage_set_details.go new file mode 100644 index 000000000..2187bfb61 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_disks_in_describe_storage_set_details.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// DisksInDescribeStorageSetDetails is a nested struct in ecs response +type DisksInDescribeStorageSetDetails struct { + Disk []Disk `json:"Disk" xml:"Disk"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address.go index 52906ff01..c9b68d52e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address.go @@ -17,9 +17,17 @@ package ecs // EipAddress is a nested struct in ecs response type EipAddress struct { - Bandwidth int `json:"Bandwidth" xml:"Bandwidth"` - IsSupportUnassociate bool `json:"IsSupportUnassociate" xml:"IsSupportUnassociate"` - IpAddress string `json:"IpAddress" xml:"IpAddress"` - InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` - AllocationId string `json:"AllocationId" xml:"AllocationId"` + ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` + IpAddress string `json:"IpAddress" xml:"IpAddress"` + EipBandwidth string `json:"EipBandwidth" xml:"EipBandwidth"` + ChargeType string `json:"ChargeType" xml:"ChargeType"` + AllocationTime string `json:"AllocationTime" xml:"AllocationTime"` + InstanceType string `json:"InstanceType" xml:"InstanceType"` + AllocationId string `json:"AllocationId" xml:"AllocationId"` + RegionId string `json:"RegionId" xml:"RegionId"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + Bandwidth string `json:"Bandwidth" xml:"Bandwidth"` + InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` + Status string `json:"Status" xml:"Status"` + OperationLocks OperationLocksInDescribeEipAddresses `json:"OperationLocks" xml:"OperationLocks"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_eip_addresses.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_eip_addresses.go deleted file mode 100644 index 6315d2b11..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_eip_addresses.go +++ /dev/null @@ -1,33 +0,0 @@ -package ecs - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// EipAddressInDescribeEipAddresses is a nested struct in ecs response -type EipAddressInDescribeEipAddresses struct { - RegionId string `json:"RegionId" xml:"RegionId"` - IpAddress string `json:"IpAddress" xml:"IpAddress"` - AllocationId string `json:"AllocationId" xml:"AllocationId"` - Status string `json:"Status" xml:"Status"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - Bandwidth string `json:"Bandwidth" xml:"Bandwidth"` - EipBandwidth string `json:"EipBandwidth" xml:"EipBandwidth"` - InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` - AllocationTime string `json:"AllocationTime" xml:"AllocationTime"` - InstanceType string `json:"InstanceType" xml:"InstanceType"` - ChargeType string `json:"ChargeType" xml:"ChargeType"` - ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` - OperationLocks OperationLocksInDescribeEipAddresses `json:"OperationLocks" xml:"OperationLocks"` -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_instance_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_instance_attribute.go new file mode 100644 index 000000000..f6d37a68c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_instance_attribute.go @@ -0,0 +1,24 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// EipAddressInDescribeInstanceAttribute is a nested struct in ecs response +type EipAddressInDescribeInstanceAttribute struct { + AllocationId string `json:"AllocationId" xml:"AllocationId"` + IpAddress string `json:"IpAddress" xml:"IpAddress"` + Bandwidth int `json:"Bandwidth" xml:"Bandwidth"` + InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_instances.go new file mode 100644 index 000000000..85d0d2469 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_address_in_describe_instances.go @@ -0,0 +1,25 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// EipAddressInDescribeInstances is a nested struct in ecs response +type EipAddressInDescribeInstances struct { + AllocationId string `json:"AllocationId" xml:"AllocationId"` + IpAddress string `json:"IpAddress" xml:"IpAddress"` + Bandwidth int `json:"Bandwidth" xml:"Bandwidth"` + InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` + IsSupportUnassociate bool `json:"IsSupportUnassociate" xml:"IsSupportUnassociate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_addresses.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_addresses.go index bef9830ed..55b351bfe 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_addresses.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_eip_addresses.go @@ -17,5 +17,5 @@ package ecs // EipAddresses is a nested struct in ecs response type EipAddresses struct { - EipAddress []EipAddressInDescribeEipAddresses `json:"EipAddress" xml:"EipAddress"` + EipAddress []EipAddress `json:"EipAddress" xml:"EipAddress"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_item.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_item.go new file mode 100644 index 000000000..ae334e085 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_item.go @@ -0,0 +1,34 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ElasticityAssuranceItem is a nested struct in ecs response +type ElasticityAssuranceItem struct { + PrivatePoolOptionsName string `json:"PrivatePoolOptionsName" xml:"PrivatePoolOptionsName"` + PrivatePoolOptionsMatchCriteria string `json:"PrivatePoolOptionsMatchCriteria" xml:"PrivatePoolOptionsMatchCriteria"` + LatestStartTime string `json:"LatestStartTime" xml:"LatestStartTime"` + RegionId string `json:"RegionId" xml:"RegionId"` + UsedAssuranceTimes int `json:"UsedAssuranceTimes" xml:"UsedAssuranceTimes"` + StartTime string `json:"StartTime" xml:"StartTime"` + EndTime string `json:"EndTime" xml:"EndTime"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + TotalAssuranceTimes string `json:"TotalAssuranceTimes" xml:"TotalAssuranceTimes"` + Status string `json:"Status" xml:"Status"` + Description string `json:"Description" xml:"Description"` + PrivatePoolOptionsId string `json:"PrivatePoolOptionsId" xml:"PrivatePoolOptionsId"` + Tags TagsInDescribeElasticityAssurances `json:"Tags" xml:"Tags"` + AllocatedResources AllocatedResourcesInDescribeElasticityAssurances `json:"AllocatedResources" xml:"AllocatedResources"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_item_in_describe_elasticity_assurance_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_item_in_describe_elasticity_assurance_instances.go new file mode 100644 index 000000000..c8ab8c03f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_item_in_describe_elasticity_assurance_instances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ElasticityAssuranceItemInDescribeElasticityAssuranceInstances is a nested struct in ecs response +type ElasticityAssuranceItemInDescribeElasticityAssuranceInstances struct { + InstanceIdSet []InstanceIdSet `json:"InstanceIdSet" xml:"InstanceIdSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_set.go new file mode 100644 index 000000000..489e0ca64 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_elasticity_assurance_set.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ElasticityAssuranceSet is a nested struct in ecs response +type ElasticityAssuranceSet struct { + ElasticityAssuranceItem []ElasticityAssuranceItem `json:"ElasticityAssuranceItem" xml:"ElasticityAssuranceItem"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_extended_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_extended_attribute.go index cfa146cd4..fafb9173f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_extended_attribute.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_extended_attribute.go @@ -17,6 +17,7 @@ package ecs // ExtendedAttribute is a nested struct in ecs response type ExtendedAttribute struct { - Device string `json:"Device" xml:"Device"` - DiskId string `json:"DiskId" xml:"DiskId"` + Device string `json:"Device" xml:"Device"` + DiskId string `json:"DiskId" xml:"DiskId"` + InactiveDisks InactiveDisksInDescribeInstanceHistoryEvents `json:"InactiveDisks" xml:"InactiveDisks"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instance.go new file mode 100644 index 000000000..12f475b3c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instance.go @@ -0,0 +1,23 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// FeeOfInstance is a nested struct in ecs response +type FeeOfInstance struct { + InstanceId string `json:"InstanceId" xml:"InstanceId"` + Fee string `json:"Fee" xml:"Fee"` + Currency string `json:"Currency" xml:"Currency"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instances_in_modify_dedicated_hosts_charge_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instances_in_modify_dedicated_hosts_charge_type.go new file mode 100644 index 000000000..5efa26f6f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instances_in_modify_dedicated_hosts_charge_type.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// FeeOfInstancesInModifyDedicatedHostsChargeType is a nested struct in ecs response +type FeeOfInstancesInModifyDedicatedHostsChargeType struct { + FeeOfInstance []FeeOfInstance `json:"FeeOfInstance" xml:"FeeOfInstance"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instances_in_modify_instance_charge_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instances_in_modify_instance_charge_type.go new file mode 100644 index 000000000..fa641f4ec --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_fee_of_instances_in_modify_instance_charge_type.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// FeeOfInstancesInModifyInstanceChargeType is a nested struct in ecs response +type FeeOfInstancesInModifyInstanceChargeType struct { + FeeOfInstance []FeeOfInstance `json:"FeeOfInstance" xml:"FeeOfInstance"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_hibernation_options.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_hibernation_options.go new file mode 100644 index 000000000..52dde74b7 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_hibernation_options.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// HibernationOptions is a nested struct in ecs response +type HibernationOptions struct { + Configured bool `json:"Configured" xml:"Configured"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_host_detail_info.go similarity index 88% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_host_detail_info.go index eea8969c9..f83bb518c 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_host_detail_info.go @@ -1,4 +1,4 @@ -package ram +package ecs //Licensed under the Apache License, Version 2.0 (the "License"); //you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// MFADevice is a nested struct in ram response -type MFADevice struct { +// HostDetailInfo is a nested struct in ecs response +type HostDetailInfo struct { SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image.go index 17aab85de..428315e67 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image.go @@ -17,28 +17,29 @@ package ecs // Image is a nested struct in ecs response type Image struct { - Progress string `json:"Progress" xml:"Progress"` - ImageId string `json:"ImageId" xml:"ImageId"` - ImageName string `json:"ImageName" xml:"ImageName"` - ImageVersion string `json:"ImageVersion" xml:"ImageVersion"` - Description string `json:"Description" xml:"Description"` - Size int `json:"Size" xml:"Size"` - ImageOwnerAlias string `json:"ImageOwnerAlias" xml:"ImageOwnerAlias"` - IsSupportIoOptimized bool `json:"IsSupportIoOptimized" xml:"IsSupportIoOptimized"` - IsSupportCloudinit bool `json:"IsSupportCloudinit" xml:"IsSupportCloudinit"` - OSName string `json:"OSName" xml:"OSName"` - OSNameEn string `json:"OSNameEn" xml:"OSNameEn"` - Architecture string `json:"Architecture" xml:"Architecture"` - Status string `json:"Status" xml:"Status"` - ProductCode string `json:"ProductCode" xml:"ProductCode"` - IsSubscribed bool `json:"IsSubscribed" xml:"IsSubscribed"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - IsSelfShared string `json:"IsSelfShared" xml:"IsSelfShared"` - OSType string `json:"OSType" xml:"OSType"` - Platform string `json:"Platform" xml:"Platform"` - Usage string `json:"Usage" xml:"Usage"` - IsCopied bool `json:"IsCopied" xml:"IsCopied"` - ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - DiskDeviceMappings DiskDeviceMappings `json:"DiskDeviceMappings" xml:"DiskDeviceMappings"` - Tags TagsInDescribeImages `json:"Tags" xml:"Tags"` + ImageId string `json:"ImageId" xml:"ImageId"` + ImageOwnerAlias string `json:"ImageOwnerAlias" xml:"ImageOwnerAlias"` + OSName string `json:"OSName" xml:"OSName"` + OSNameEn string `json:"OSNameEn" xml:"OSNameEn"` + ImageFamily string `json:"ImageFamily" xml:"ImageFamily"` + Architecture string `json:"Architecture" xml:"Architecture"` + Size int `json:"Size" xml:"Size"` + IsSupportIoOptimized bool `json:"IsSupportIoOptimized" xml:"IsSupportIoOptimized"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + Description string `json:"Description" xml:"Description"` + Usage string `json:"Usage" xml:"Usage"` + IsCopied bool `json:"IsCopied" xml:"IsCopied"` + ImageVersion string `json:"ImageVersion" xml:"ImageVersion"` + OSType string `json:"OSType" xml:"OSType"` + IsSubscribed bool `json:"IsSubscribed" xml:"IsSubscribed"` + IsSupportCloudinit bool `json:"IsSupportCloudinit" xml:"IsSupportCloudinit"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + Progress string `json:"Progress" xml:"Progress"` + Platform string `json:"Platform" xml:"Platform"` + IsSelfShared string `json:"IsSelfShared" xml:"IsSelfShared"` + ImageName string `json:"ImageName" xml:"ImageName"` + Status string `json:"Status" xml:"Status"` + Tags TagsInDescribeImageFromFamily `json:"Tags" xml:"Tags"` + DiskDeviceMappings DiskDeviceMappingsInDescribeImages `json:"DiskDeviceMappings" xml:"DiskDeviceMappings"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_component.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_component.go new file mode 100644 index 000000000..4f17be757 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_component.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ImageComponent is a nested struct in ecs response +type ImageComponent struct { + ImageComponentSet []ImageComponentSet `json:"ImageComponentSet" xml:"ImageComponentSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_component_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_component_set.go new file mode 100644 index 000000000..756f79351 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_component_set.go @@ -0,0 +1,29 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ImageComponentSet is a nested struct in ecs response +type ImageComponentSet struct { + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ImageComponentId string `json:"ImageComponentId" xml:"ImageComponentId"` + Name string `json:"Name" xml:"Name"` + Description string `json:"Description" xml:"Description"` + SystemType string `json:"SystemType" xml:"SystemType"` + ComponentType string `json:"ComponentType" xml:"ComponentType"` + Content string `json:"Content" xml:"Content"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + Tags TagsInDescribeImageComponents `json:"Tags" xml:"Tags"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline.go new file mode 100644 index 000000000..6b460b7ce --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ImagePipeline is a nested struct in ecs response +type ImagePipeline struct { + ImagePipelineSet []ImagePipelineSet `json:"ImagePipelineSet" xml:"ImagePipelineSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_execution.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_execution.go new file mode 100644 index 000000000..51c8bb075 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_execution.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ImagePipelineExecution is a nested struct in ecs response +type ImagePipelineExecution struct { + ImagePipelineExecutionSet []ImagePipelineExecutionSet `json:"ImagePipelineExecutionSet" xml:"ImagePipelineExecutionSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_execution_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_execution_set.go new file mode 100644 index 000000000..bc3e171f0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_execution_set.go @@ -0,0 +1,29 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ImagePipelineExecutionSet is a nested struct in ecs response +type ImagePipelineExecutionSet struct { + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ModifiedTime string `json:"ModifiedTime" xml:"ModifiedTime"` + ImageId string `json:"ImageId" xml:"ImageId"` + ImagePipelineId string `json:"ImagePipelineId" xml:"ImagePipelineId"` + ExecutionId string `json:"ExecutionId" xml:"ExecutionId"` + Status string `json:"Status" xml:"Status"` + Message string `json:"Message" xml:"Message"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + Tags TagsInDescribeImagePipelineExecutions `json:"Tags" xml:"Tags"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_set.go new file mode 100644 index 000000000..8ec40c897 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_image_pipeline_set.go @@ -0,0 +1,37 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ImagePipelineSet is a nested struct in ecs response +type ImagePipelineSet struct { + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ImagePipelineId string `json:"ImagePipelineId" xml:"ImagePipelineId"` + Name string `json:"Name" xml:"Name"` + Description string `json:"Description" xml:"Description"` + BaseImageType string `json:"BaseImageType" xml:"BaseImageType"` + BaseImage string `json:"BaseImage" xml:"BaseImage"` + ImageName string `json:"ImageName" xml:"ImageName"` + VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` + InstanceType string `json:"InstanceType" xml:"InstanceType"` + InternetMaxBandwidthOut int `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"` + SystemDiskSize int `json:"SystemDiskSize" xml:"SystemDiskSize"` + DeleteInstanceOnFailure bool `json:"DeleteInstanceOnFailure" xml:"DeleteInstanceOnFailure"` + BuildContent string `json:"BuildContent" xml:"BuildContent"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + AddAccounts AddAccounts `json:"AddAccounts" xml:"AddAccounts"` + ToRegionIds ToRegionIds `json:"ToRegionIds" xml:"ToRegionIds"` + Tags TagsInDescribeImagePipelines `json:"Tags" xml:"Tags"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disk.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disk.go new file mode 100644 index 000000000..231355e5c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disk.go @@ -0,0 +1,25 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InactiveDisk is a nested struct in ecs response +type InactiveDisk struct { + DeviceCategory string `json:"DeviceCategory" xml:"DeviceCategory"` + ReleaseTime string `json:"ReleaseTime" xml:"ReleaseTime"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + DeviceType string `json:"DeviceType" xml:"DeviceType"` + DeviceSize string `json:"DeviceSize" xml:"DeviceSize"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disks_in_describe_instance_history_events.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disks_in_describe_instance_history_events.go new file mode 100644 index 000000000..4d343ff4a --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disks_in_describe_instance_history_events.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InactiveDisksInDescribeInstanceHistoryEvents is a nested struct in ecs response +type InactiveDisksInDescribeInstanceHistoryEvents struct { + InactiveDisk []InactiveDisk `json:"InactiveDisk" xml:"InactiveDisk"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disks_in_describe_instances_full_status.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disks_in_describe_instances_full_status.go new file mode 100644 index 000000000..a65e4e156 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_inactive_disks_in_describe_instances_full_status.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InactiveDisksInDescribeInstancesFullStatus is a nested struct in ecs response +type InactiveDisksInDescribeInstancesFullStatus struct { + InactiveDisk []InactiveDisk `json:"InactiveDisk" xml:"InactiveDisk"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance.go index d76584e07..766bb6ad0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance.go @@ -17,59 +17,83 @@ package ecs // Instance is a nested struct in ecs response type Instance struct { - ImageId string `json:"ImageId" xml:"ImageId"` - InstanceType string `json:"InstanceType" xml:"InstanceType"` - AutoReleaseTime string `json:"AutoReleaseTime" xml:"AutoReleaseTime"` - DeviceAvailable bool `json:"DeviceAvailable" xml:"DeviceAvailable"` - InstanceNetworkType string `json:"InstanceNetworkType" xml:"InstanceNetworkType"` - LocalStorageAmount int `json:"LocalStorageAmount" xml:"LocalStorageAmount"` - InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"` - ClusterId string `json:"ClusterId" xml:"ClusterId"` - InstanceName string `json:"InstanceName" xml:"InstanceName"` - CreditSpecification string `json:"CreditSpecification" xml:"CreditSpecification"` - GPUAmount int `json:"GPUAmount" xml:"GPUAmount"` - StartTime string `json:"StartTime" xml:"StartTime"` - ZoneId string `json:"ZoneId" xml:"ZoneId"` - InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` - InternetMaxBandwidthIn int `json:"InternetMaxBandwidthIn" xml:"InternetMaxBandwidthIn"` - HostName string `json:"HostName" xml:"HostName"` - Cpu int `json:"Cpu" xml:"Cpu"` - Status string `json:"Status" xml:"Status"` - SpotPriceLimit float64 `json:"SpotPriceLimit" xml:"SpotPriceLimit"` - OSName string `json:"OSName" xml:"OSName"` - OSNameEn string `json:"OSNameEn" xml:"OSNameEn"` - SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` - RegionId string `json:"RegionId" xml:"RegionId"` - InternetMaxBandwidthOut int `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"` - IoOptimized bool `json:"IoOptimized" xml:"IoOptimized"` - ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - InstanceTypeFamily string `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"` - InstanceId string `json:"InstanceId" xml:"InstanceId"` - DeploymentSetId string `json:"DeploymentSetId" xml:"DeploymentSetId"` - GPUSpec string `json:"GPUSpec" xml:"GPUSpec"` - Description string `json:"Description" xml:"Description"` - Recyclable bool `json:"Recyclable" xml:"Recyclable"` - SaleCycle string `json:"SaleCycle" xml:"SaleCycle"` - ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` - OSType string `json:"OSType" xml:"OSType"` - Memory int `json:"Memory" xml:"Memory"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - KeyPairName string `json:"KeyPairName" xml:"KeyPairName"` - HpcClusterId string `json:"HpcClusterId" xml:"HpcClusterId"` - LocalStorageCapacity int `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"` - VlanId string `json:"VlanId" xml:"VlanId"` - StoppedMode string `json:"StoppedMode" xml:"StoppedMode"` - SpotStrategy string `json:"SpotStrategy" xml:"SpotStrategy"` - DeletionProtection bool `json:"DeletionProtection" xml:"DeletionProtection"` - SecurityGroupIds SecurityGroupIdsInDescribeInstances `json:"SecurityGroupIds" xml:"SecurityGroupIds"` - InnerIpAddress InnerIpAddressInDescribeInstances `json:"InnerIpAddress" xml:"InnerIpAddress"` - PublicIpAddress PublicIpAddressInDescribeInstances `json:"PublicIpAddress" xml:"PublicIpAddress"` - RdmaIpAddress RdmaIpAddress `json:"RdmaIpAddress" xml:"RdmaIpAddress"` - EipAddress EipAddress `json:"EipAddress" xml:"EipAddress"` - EcsCapacityReservationAttr EcsCapacityReservationAttr `json:"EcsCapacityReservationAttr" xml:"EcsCapacityReservationAttr"` - DedicatedHostAttribute DedicatedHostAttribute `json:"DedicatedHostAttribute" xml:"DedicatedHostAttribute"` - VpcAttributes VpcAttributes `json:"VpcAttributes" xml:"VpcAttributes"` - NetworkInterfaces NetworkInterfacesInDescribeInstances `json:"NetworkInterfaces" xml:"NetworkInterfaces"` - OperationLocks OperationLocksInDescribeInstances `json:"OperationLocks" xml:"OperationLocks"` - Tags TagsInDescribeInstances `json:"Tags" xml:"Tags"` + Hostname string `json:"Hostname" xml:"Hostname"` + ImageId string `json:"ImageId" xml:"ImageId"` + InstanceType string `json:"InstanceType" xml:"InstanceType"` + AutoReleaseTime string `json:"AutoReleaseTime" xml:"AutoReleaseTime"` + LastInvokedTime string `json:"LastInvokedTime" xml:"LastInvokedTime"` + OsType string `json:"OsType" xml:"OsType"` + DeviceAvailable bool `json:"DeviceAvailable" xml:"DeviceAvailable"` + InstanceNetworkType string `json:"InstanceNetworkType" xml:"InstanceNetworkType"` + RegistrationTime string `json:"RegistrationTime" xml:"RegistrationTime"` + LocalStorageAmount int `json:"LocalStorageAmount" xml:"LocalStorageAmount"` + NetworkType string `json:"NetworkType" xml:"NetworkType"` + IntranetIp string `json:"IntranetIp" xml:"IntranetIp"` + IsSpot bool `json:"IsSpot" xml:"IsSpot"` + InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"` + MachineId string `json:"MachineId" xml:"MachineId"` + PrivatePoolOptionsId string `json:"PrivatePoolOptionsId" xml:"PrivatePoolOptionsId"` + ClusterId string `json:"ClusterId" xml:"ClusterId"` + InstanceName string `json:"InstanceName" xml:"InstanceName"` + PrivatePoolOptionsMatchCriteria string `json:"PrivatePoolOptionsMatchCriteria" xml:"PrivatePoolOptionsMatchCriteria"` + DeploymentSetGroupNo int `json:"DeploymentSetGroupNo" xml:"DeploymentSetGroupNo"` + CreditSpecification string `json:"CreditSpecification" xml:"CreditSpecification"` + GPUAmount int `json:"GPUAmount" xml:"GPUAmount"` + Connected bool `json:"Connected" xml:"Connected"` + InvocationCount int64 `json:"InvocationCount" xml:"InvocationCount"` + StartTime string `json:"StartTime" xml:"StartTime"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` + InternetMaxBandwidthIn int `json:"InternetMaxBandwidthIn" xml:"InternetMaxBandwidthIn"` + HostName string `json:"HostName" xml:"HostName"` + Status string `json:"Status" xml:"Status"` + CPU int `json:"CPU" xml:"CPU"` + Cpu int `json:"Cpu" xml:"Cpu"` + ISP string `json:"ISP" xml:"ISP"` + OsVersion string `json:"OsVersion" xml:"OsVersion"` + SpotPriceLimit float64 `json:"SpotPriceLimit" xml:"SpotPriceLimit"` + OSName string `json:"OSName" xml:"OSName"` + OSNameEn string `json:"OSNameEn" xml:"OSNameEn"` + SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` + RegionId string `json:"RegionId" xml:"RegionId"` + IoOptimized bool `json:"IoOptimized" xml:"IoOptimized"` + InternetMaxBandwidthOut int `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + ActivationId string `json:"ActivationId" xml:"ActivationId"` + InstanceTypeFamily string `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + DeploymentSetId string `json:"DeploymentSetId" xml:"DeploymentSetId"` + GPUSpec string `json:"GPUSpec" xml:"GPUSpec"` + Description string `json:"Description" xml:"Description"` + Recyclable bool `json:"Recyclable" xml:"Recyclable"` + SaleCycle string `json:"SaleCycle" xml:"SaleCycle"` + ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` + OSType string `json:"OSType" xml:"OSType"` + InternetIp string `json:"InternetIp" xml:"InternetIp"` + Memory int `json:"Memory" xml:"Memory"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + AgentVersion string `json:"AgentVersion" xml:"AgentVersion"` + KeyPairName string `json:"KeyPairName" xml:"KeyPairName"` + HpcClusterId string `json:"HpcClusterId" xml:"HpcClusterId"` + LocalStorageCapacity int64 `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"` + VlanId string `json:"VlanId" xml:"VlanId"` + StoppedMode string `json:"StoppedMode" xml:"StoppedMode"` + SpotStrategy string `json:"SpotStrategy" xml:"SpotStrategy"` + SpotDuration int `json:"SpotDuration" xml:"SpotDuration"` + DeletionProtection bool `json:"DeletionProtection" xml:"DeletionProtection"` + SecurityGroupIds SecurityGroupIdsInDescribeInstances `json:"SecurityGroupIds" xml:"SecurityGroupIds"` + InnerIpAddress InnerIpAddressInDescribeInstances `json:"InnerIpAddress" xml:"InnerIpAddress"` + PublicIpAddress PublicIpAddressInDescribeInstances `json:"PublicIpAddress" xml:"PublicIpAddress"` + RdmaIpAddress RdmaIpAddress `json:"RdmaIpAddress" xml:"RdmaIpAddress"` + MetadataOptions MetadataOptions `json:"MetadataOptions" xml:"MetadataOptions"` + DedicatedHostAttribute DedicatedHostAttribute `json:"DedicatedHostAttribute" xml:"DedicatedHostAttribute"` + EipAddress EipAddressInDescribeInstances `json:"EipAddress" xml:"EipAddress"` + HibernationOptions HibernationOptions `json:"HibernationOptions" xml:"HibernationOptions"` + CpuOptions CpuOptions `json:"CpuOptions" xml:"CpuOptions"` + EcsCapacityReservationAttr EcsCapacityReservationAttr `json:"EcsCapacityReservationAttr" xml:"EcsCapacityReservationAttr"` + DedicatedInstanceAttribute DedicatedInstanceAttribute `json:"DedicatedInstanceAttribute" xml:"DedicatedInstanceAttribute"` + VpcAttributes VpcAttributes `json:"VpcAttributes" xml:"VpcAttributes"` + OperationLocks OperationLocksInDescribeInstances `json:"OperationLocks" xml:"OperationLocks"` + Tags TagsInDescribeInstances `json:"Tags" xml:"Tags"` + NetworkInterfaces NetworkInterfacesInDescribeInstances `json:"NetworkInterfaces" xml:"NetworkInterfaces"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_cloud_assistant_status.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_cloud_assistant_status.go index 50d1aed24..577cdb57e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_cloud_assistant_status.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_cloud_assistant_status.go @@ -17,6 +17,11 @@ package ecs // InstanceCloudAssistantStatus is a nested struct in ecs response type InstanceCloudAssistantStatus struct { - InstanceId string `json:"InstanceId" xml:"InstanceId"` - CloudAssistantStatus string `json:"CloudAssistantStatus" xml:"CloudAssistantStatus"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + OSType string `json:"OSType" xml:"OSType"` + CloudAssistantStatus string `json:"CloudAssistantStatus" xml:"CloudAssistantStatus"` + CloudAssistantVersion string `json:"CloudAssistantVersion" xml:"CloudAssistantVersion"` + InvocationCount int64 `json:"InvocationCount" xml:"InvocationCount"` + ActiveTaskCount int64 `json:"ActiveTaskCount" xml:"ActiveTaskCount"` + LastInvokedTime string `json:"LastInvokedTime" xml:"LastInvokedTime"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_id_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_id_set.go new file mode 100644 index 000000000..c34e6524b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_id_set.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstanceIdSet is a nested struct in ecs response +type InstanceIdSet struct { + InstanceId string `json:"InstanceId" xml:"InstanceId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids_in_create_auto_provisioning_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids_in_create_auto_provisioning_group.go new file mode 100644 index 000000000..d6f05b545 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids_in_create_auto_provisioning_group.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstanceIdsInCreateAutoProvisioningGroup is a nested struct in ecs response +type InstanceIdsInCreateAutoProvisioningGroup struct { + InstanceId []string `json:"InstanceId" xml:"InstanceId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids_in_describe_deployment_sets.go similarity index 85% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids_in_describe_deployment_sets.go index c5ec56c0e..e7896c18a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_ids_in_describe_deployment_sets.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// InstanceIds is a nested struct in ecs response -type InstanceIds struct { +// InstanceIdsInDescribeDeploymentSets is a nested struct in ecs response +type InstanceIdsInDescribeDeploymentSets struct { InstanceId []string `json:"InstanceId" xml:"InstanceId"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_response.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_response.go new file mode 100644 index 000000000..d2953a696 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_response.go @@ -0,0 +1,25 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstanceResponse is a nested struct in ecs response +type InstanceResponse struct { + Message string `json:"Message" xml:"Message"` + Code string `json:"Code" xml:"Code"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + CurrentStatus string `json:"CurrentStatus" xml:"CurrentStatus"` + PreviousStatus string `json:"PreviousStatus" xml:"PreviousStatus"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_reboot_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_reboot_instances.go new file mode 100644 index 000000000..1d76e0aa7 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_reboot_instances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstanceResponsesInRebootInstances is a nested struct in ecs response +type InstanceResponsesInRebootInstances struct { + InstanceResponse []InstanceResponse `json:"InstanceResponse" xml:"InstanceResponse"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_start_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_start_instances.go new file mode 100644 index 000000000..91e11da07 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_start_instances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstanceResponsesInStartInstances is a nested struct in ecs response +type InstanceResponsesInStartInstances struct { + InstanceResponse []InstanceResponse `json:"InstanceResponse" xml:"InstanceResponse"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_stop_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_stop_instances.go new file mode 100644 index 000000000..06aca717d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_responses_in_stop_instances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstanceResponsesInStopInstances is a nested struct in ecs response +type InstanceResponsesInStopInstances struct { + InstanceResponse []InstanceResponse `json:"InstanceResponse" xml:"InstanceResponse"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_system_event_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_system_event_type.go index 8ee7015c3..0428ada99 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_system_event_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_system_event_type.go @@ -22,6 +22,8 @@ type InstanceSystemEventType struct { EventPublishTime string `json:"EventPublishTime" xml:"EventPublishTime"` NotBefore string `json:"NotBefore" xml:"NotBefore"` EventFinishTime string `json:"EventFinishTime" xml:"EventFinishTime"` + Reason string `json:"Reason" xml:"Reason"` + ImpactLevel string `json:"ImpactLevel" xml:"ImpactLevel"` EventType EventType `json:"EventType" xml:"EventType"` EventCycleStatus EventCycleStatus `json:"EventCycleStatus" xml:"EventCycleStatus"` ExtendedAttribute ExtendedAttribute `json:"ExtendedAttribute" xml:"ExtendedAttribute"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_type.go index 713c4f589..699853dd9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instance_type.go @@ -19,25 +19,33 @@ package ecs type InstanceType struct { MemorySize float64 `json:"MemorySize" xml:"MemorySize"` EniPrivateIpAddressQuantity int `json:"EniPrivateIpAddressQuantity" xml:"EniPrivateIpAddressQuantity"` - InstancePpsRx int `json:"InstancePpsRx" xml:"InstancePpsRx"` + InstancePpsRx int64 `json:"InstancePpsRx" xml:"InstancePpsRx"` CpuCoreCount int `json:"CpuCoreCount" xml:"CpuCoreCount"` + EniTotalQuantity int `json:"EniTotalQuantity" xml:"EniTotalQuantity"` Cores int `json:"Cores" xml:"Cores"` - Memory int `json:"Memory" xml:"Memory"` InstanceTypeId string `json:"InstanceTypeId" xml:"InstanceTypeId"` InstanceBandwidthRx int `json:"InstanceBandwidthRx" xml:"InstanceBandwidthRx"` InstanceType string `json:"InstanceType" xml:"InstanceType"` - BaselineCredit int `json:"BaselineCredit" xml:"BaselineCredit"` EniQuantity int `json:"EniQuantity" xml:"EniQuantity"` Generation string `json:"Generation" xml:"Generation"` - GPUAmount int `json:"GPUAmount" xml:"GPUAmount"` SupportIoOptimized string `json:"SupportIoOptimized" xml:"SupportIoOptimized"` InstanceTypeFamily string `json:"InstanceTypeFamily" xml:"InstanceTypeFamily"` InitialCredit int `json:"InitialCredit" xml:"InitialCredit"` - InstancePpsTx int `json:"InstancePpsTx" xml:"InstancePpsTx"` + InstancePpsTx int64 `json:"InstancePpsTx" xml:"InstancePpsTx"` LocalStorageAmount int `json:"LocalStorageAmount" xml:"LocalStorageAmount"` InstanceFamilyLevel string `json:"InstanceFamilyLevel" xml:"InstanceFamilyLevel"` - LocalStorageCapacity int `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"` + TotalEniQueueQuantity int `json:"TotalEniQueueQuantity" xml:"TotalEniQueueQuantity"` GPUSpec string `json:"GPUSpec" xml:"GPUSpec"` - LocalStorageCategory string `json:"LocalStorageCategory" xml:"LocalStorageCategory"` + SecondaryEniQueueNumber int `json:"SecondaryEniQueueNumber" xml:"SecondaryEniQueueNumber"` InstanceBandwidthTx int `json:"InstanceBandwidthTx" xml:"InstanceBandwidthTx"` + MaximumQueueNumberPerEni int `json:"MaximumQueueNumberPerEni" xml:"MaximumQueueNumberPerEni"` + DiskQuantity int `json:"DiskQuantity" xml:"DiskQuantity"` + PrimaryEniQueueNumber int `json:"PrimaryEniQueueNumber" xml:"PrimaryEniQueueNumber"` + Memory int `json:"Memory" xml:"Memory"` + BaselineCredit int `json:"BaselineCredit" xml:"BaselineCredit"` + EniTrunkSupported bool `json:"EniTrunkSupported" xml:"EniTrunkSupported"` + GPUAmount int `json:"GPUAmount" xml:"GPUAmount"` + EniIpv6AddressQuantity int `json:"EniIpv6AddressQuantity" xml:"EniIpv6AddressQuantity"` + LocalStorageCapacity int64 `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"` + LocalStorageCategory string `json:"LocalStorageCategory" xml:"LocalStorageCategory"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_auto_provisioning_group_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_auto_provisioning_group_instances.go new file mode 100644 index 000000000..312cbb68b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_auto_provisioning_group_instances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstancesInDescribeAutoProvisioningGroupInstances is a nested struct in ecs response +type InstancesInDescribeAutoProvisioningGroupInstances struct { + Instance []Instance `json:"Instance" xml:"Instance"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_instance_attachment_attributes.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_instance_attachment_attributes.go new file mode 100644 index 000000000..1ac4f2705 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_instance_attachment_attributes.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstancesInDescribeInstanceAttachmentAttributes is a nested struct in ecs response +type InstancesInDescribeInstanceAttachmentAttributes struct { + Instance []Instance `json:"Instance" xml:"Instance"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_managed_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_managed_instances.go new file mode 100644 index 000000000..a4e3ffb54 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_instances_in_describe_managed_instances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InstancesInDescribeManagedInstances is a nested struct in ecs response +type InstancesInDescribeManagedInstances struct { + Instance []Instance `json:"Instance" xml:"Instance"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocation.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocation.go index 2eb884289..375a84553 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocation.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocation.go @@ -17,16 +17,31 @@ package ecs // Invocation is a nested struct in ecs response type Invocation struct { - CommandId string `json:"CommandId" xml:"CommandId"` - PageNumber int `json:"PageNumber" xml:"PageNumber"` - CommandName string `json:"CommandName" xml:"CommandName"` - TotalCount int `json:"TotalCount" xml:"TotalCount"` - PageSize int `json:"PageSize" xml:"PageSize"` - InvokeId string `json:"InvokeId" xml:"InvokeId"` - InvokeStatus string `json:"InvokeStatus" xml:"InvokeStatus"` - Timed bool `json:"Timed" xml:"Timed"` - Frequency string `json:"Frequency" xml:"Frequency"` - CommandType string `json:"CommandType" xml:"CommandType"` - InvocationResults InvocationResults `json:"InvocationResults" xml:"InvocationResults"` - InvokeInstances InvokeInstances `json:"InvokeInstances" xml:"InvokeInstances"` + Name string `json:"Name" xml:"Name"` + PageSize int64 `json:"PageSize" xml:"PageSize"` + Timed bool `json:"Timed" xml:"Timed"` + Frequency string `json:"Frequency" xml:"Frequency"` + Content string `json:"Content" xml:"Content"` + CommandContent string `json:"CommandContent" xml:"CommandContent"` + InvocationStatus string `json:"InvocationStatus" xml:"InvocationStatus"` + FileGroup string `json:"FileGroup" xml:"FileGroup"` + Description string `json:"Description" xml:"Description"` + Overwrite string `json:"Overwrite" xml:"Overwrite"` + PageNumber int64 `json:"PageNumber" xml:"PageNumber"` + CommandId string `json:"CommandId" xml:"CommandId"` + TargetDir string `json:"TargetDir" xml:"TargetDir"` + FileMode string `json:"FileMode" xml:"FileMode"` + TotalCount int64 `json:"TotalCount" xml:"TotalCount"` + Username string `json:"Username" xml:"Username"` + ContentType string `json:"ContentType" xml:"ContentType"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + CommandName string `json:"CommandName" xml:"CommandName"` + Parameters string `json:"Parameters" xml:"Parameters"` + VmCount int `json:"VmCount" xml:"VmCount"` + InvokeId string `json:"InvokeId" xml:"InvokeId"` + InvokeStatus string `json:"InvokeStatus" xml:"InvokeStatus"` + FileOwner string `json:"FileOwner" xml:"FileOwner"` + CommandType string `json:"CommandType" xml:"CommandType"` + InvokeInstances InvokeInstancesInDescribeInvocations `json:"InvokeInstances" xml:"InvokeInstances"` + InvocationResults InvocationResults `json:"InvocationResults" xml:"InvocationResults"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocation_result.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocation_result.go index 86dc37cbe..51d5b3268 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocation_result.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocation_result.go @@ -20,8 +20,16 @@ type InvocationResult struct { CommandId string `json:"CommandId" xml:"CommandId"` InvokeId string `json:"InvokeId" xml:"InvokeId"` InstanceId string `json:"InstanceId" xml:"InstanceId"` + StartTime string `json:"StartTime" xml:"StartTime"` + StopTime string `json:"StopTime" xml:"StopTime"` FinishedTime string `json:"FinishedTime" xml:"FinishedTime"` + Repeats int `json:"Repeats" xml:"Repeats"` Output string `json:"Output" xml:"Output"` + Dropped int `json:"Dropped" xml:"Dropped"` InvokeRecordStatus string `json:"InvokeRecordStatus" xml:"InvokeRecordStatus"` - ExitCode int `json:"ExitCode" xml:"ExitCode"` + InvocationStatus string `json:"InvocationStatus" xml:"InvocationStatus"` + ExitCode int64 `json:"ExitCode" xml:"ExitCode"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorInfo string `json:"ErrorInfo" xml:"ErrorInfo"` + Username string `json:"Username" xml:"Username"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations_in_describe_invocations.go similarity index 86% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations_in_describe_invocations.go index f7e100066..51ec5e065 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations_in_describe_invocations.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Invocations is a nested struct in ecs response -type Invocations struct { +// InvocationsInDescribeInvocations is a nested struct in ecs response +type InvocationsInDescribeInvocations struct { Invocation []Invocation `json:"Invocation" xml:"Invocation"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations_in_describe_send_file_results.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations_in_describe_send_file_results.go new file mode 100644 index 000000000..edaabcbe0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invocations_in_describe_send_file_results.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InvocationsInDescribeSendFileResults is a nested struct in ecs response +type InvocationsInDescribeSendFileResults struct { + Invocation []Invocation `json:"Invocation" xml:"Invocation"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instance.go index 9c0b08ee5..d7952be51 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instance.go @@ -17,6 +17,18 @@ package ecs // InvokeInstance is a nested struct in ecs response type InvokeInstance struct { - InstanceId string `json:"InstanceId" xml:"InstanceId"` + UpdateTime string `json:"UpdateTime" xml:"UpdateTime"` InstanceInvokeStatus string `json:"InstanceInvokeStatus" xml:"InstanceInvokeStatus"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ErrorInfo string `json:"ErrorInfo" xml:"ErrorInfo"` + FinishTime string `json:"FinishTime" xml:"FinishTime"` + ExitCode int64 `json:"ExitCode" xml:"ExitCode"` + Repeats int `json:"Repeats" xml:"Repeats"` + StartTime string `json:"StartTime" xml:"StartTime"` + Dropped int `json:"Dropped" xml:"Dropped"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + Output string `json:"Output" xml:"Output"` + InvocationStatus string `json:"InvocationStatus" xml:"InvocationStatus"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + StopTime string `json:"StopTime" xml:"StopTime"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances_in_describe_invocations.go similarity index 86% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances_in_describe_invocations.go index 2eb179075..a6dfd1b7b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances_in_describe_invocations.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// InvokeInstances is a nested struct in ecs response -type InvokeInstances struct { +// InvokeInstancesInDescribeInvocations is a nested struct in ecs response +type InvokeInstancesInDescribeInvocations struct { InvokeInstance []InvokeInstance `json:"InvokeInstance" xml:"InvokeInstance"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances_in_describe_send_file_results.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances_in_describe_send_file_results.go new file mode 100644 index 000000000..2e13a1762 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_invoke_instances_in_describe_send_file_results.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// InvokeInstancesInDescribeSendFileResults is a nested struct in ecs response +type InvokeInstancesInDescribeSendFileResults struct { + InvokeInstance []InvokeInstance `json:"InvokeInstance" xml:"InvokeInstance"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_instances.go similarity index 87% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_instances.go index 53df57e76..9d6085d5b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_instances.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Ipv6Sets is a nested struct in ecs response -type Ipv6Sets struct { +// Ipv6SetsInDescribeInstances is a nested struct in ecs response +type Ipv6SetsInDescribeInstances struct { Ipv6Set []Ipv6Set `json:"Ipv6Set" xml:"Ipv6Set"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_network_interface_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_network_interface_attribute.go new file mode 100644 index 000000000..93c135556 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_network_interface_attribute.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Ipv6SetsInDescribeNetworkInterfaceAttribute is a nested struct in ecs response +type Ipv6SetsInDescribeNetworkInterfaceAttribute struct { + Ipv6Set []Ipv6Set `json:"Ipv6Set" xml:"Ipv6Set"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_network_interfaces.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_network_interfaces.go new file mode 100644 index 000000000..dc1c585f8 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_ipv6_sets_in_describe_network_interfaces.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// Ipv6SetsInDescribeNetworkInterfaces is a nested struct in ecs response +type Ipv6SetsInDescribeNetworkInterfaces struct { + Ipv6Set []Ipv6Set `json:"Ipv6Set" xml:"Ipv6Set"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_key_pair.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_key_pair.go index cacee8fef..593e7c65c 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_key_pair.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_key_pair.go @@ -19,6 +19,7 @@ package ecs type KeyPair struct { KeyPairName string `json:"KeyPairName" xml:"KeyPairName"` KeyPairFingerPrint string `json:"KeyPairFingerPrint" xml:"KeyPairFingerPrint"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` Tags TagsInDescribeKeyPairs `json:"Tags" xml:"Tags"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_result.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_result.go new file mode 100644 index 000000000..cfbfd2baa --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_result.go @@ -0,0 +1,26 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// LaunchResult is a nested struct in ecs response +type LaunchResult struct { + SpotStrategy string `json:"SpotStrategy" xml:"SpotStrategy"` + InstanceType string `json:"InstanceType" xml:"InstanceType"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + ErrorMsg string `json:"ErrorMsg" xml:"ErrorMsg"` + InstanceIds InstanceIdsInCreateAutoProvisioningGroup `json:"InstanceIds" xml:"InstanceIds"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_results.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_results.go new file mode 100644 index 000000000..f4caf72e4 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_results.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// LaunchResults is a nested struct in ecs response +type LaunchResults struct { + LaunchResult []LaunchResult `json:"LaunchResult" xml:"LaunchResult"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_config.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_config.go new file mode 100644 index 000000000..599dddad9 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_config.go @@ -0,0 +1,25 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// LaunchTemplateConfig is a nested struct in ecs response +type LaunchTemplateConfig struct { + InstanceType string `json:"InstanceType" xml:"InstanceType"` + MaxPrice float64 `json:"MaxPrice" xml:"MaxPrice"` + VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` + WeightedCapacity float64 `json:"WeightedCapacity" xml:"WeightedCapacity"` + Priority float64 `json:"Priority" xml:"Priority"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_configs.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_configs.go new file mode 100644 index 000000000..68ac80e02 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_configs.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// LaunchTemplateConfigs is a nested struct in ecs response +type LaunchTemplateConfigs struct { + LaunchTemplateConfig []LaunchTemplateConfig `json:"LaunchTemplateConfig" xml:"LaunchTemplateConfig"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_data.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_data.go index df5099abd..66c83b901 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_data.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_data.go @@ -17,40 +17,45 @@ package ecs // LaunchTemplateData is a nested struct in ecs response type LaunchTemplateData struct { - ImageId string `json:"ImageId" xml:"ImageId"` - ImageOwnerAlias string `json:"ImageOwnerAlias" xml:"ImageOwnerAlias"` - PasswordInherit bool `json:"PasswordInherit" xml:"PasswordInherit"` - InstanceType string `json:"InstanceType" xml:"InstanceType"` - SecurityGroupId string `json:"SecurityGroupId" xml:"SecurityGroupId"` - VpcId string `json:"VpcId" xml:"VpcId"` - VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` - InstanceName string `json:"InstanceName" xml:"InstanceName"` - Description string `json:"Description" xml:"Description"` - InternetMaxBandwidthIn int `json:"InternetMaxBandwidthIn" xml:"InternetMaxBandwidthIn"` - InternetMaxBandwidthOut int `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"` - HostName string `json:"HostName" xml:"HostName"` - ZoneId string `json:"ZoneId" xml:"ZoneId"` - SystemDiskSize int `json:"SystemDisk.Size" xml:"SystemDisk.Size"` - SystemDiskCategory string `json:"SystemDisk.Category" xml:"SystemDisk.Category"` - SystemDiskDiskName string `json:"SystemDisk.DiskName" xml:"SystemDisk.DiskName"` - SystemDiskDescription string `json:"SystemDisk.Description" xml:"SystemDisk.Description"` - SystemDiskIops int `json:"SystemDisk.Iops" xml:"SystemDisk.Iops"` - IoOptimized string `json:"IoOptimized" xml:"IoOptimized"` - InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"` - Period int `json:"Period" xml:"Period"` - InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` - EnableVmOsConfig bool `json:"EnableVmOsConfig" xml:"EnableVmOsConfig"` - NetworkType string `json:"NetworkType" xml:"NetworkType"` - UserData string `json:"UserData" xml:"UserData"` - KeyPairName string `json:"KeyPairName" xml:"KeyPairName"` - RamRoleName string `json:"RamRoleName" xml:"RamRoleName"` - AutoReleaseTime string `json:"AutoReleaseTime" xml:"AutoReleaseTime"` - SpotStrategy string `json:"SpotStrategy" xml:"SpotStrategy"` - SpotPriceLimit float64 `json:"SpotPriceLimit" xml:"SpotPriceLimit"` - SpotDuration int `json:"SpotDuration" xml:"SpotDuration"` - ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - SecurityEnhancementStrategy string `json:"SecurityEnhancementStrategy" xml:"SecurityEnhancementStrategy"` - DataDisks DataDisks `json:"DataDisks" xml:"DataDisks"` - NetworkInterfaces NetworkInterfacesInDescribeLaunchTemplateVersions `json:"NetworkInterfaces" xml:"NetworkInterfaces"` - Tags TagsInDescribeLaunchTemplateVersions `json:"Tags" xml:"Tags"` + ImageId string `json:"ImageId" xml:"ImageId"` + ImageOwnerAlias string `json:"ImageOwnerAlias" xml:"ImageOwnerAlias"` + PasswordInherit bool `json:"PasswordInherit" xml:"PasswordInherit"` + InstanceType string `json:"InstanceType" xml:"InstanceType"` + SecurityGroupId string `json:"SecurityGroupId" xml:"SecurityGroupId"` + VpcId string `json:"VpcId" xml:"VpcId"` + VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` + InstanceName string `json:"InstanceName" xml:"InstanceName"` + Description string `json:"Description" xml:"Description"` + InternetMaxBandwidthIn int `json:"InternetMaxBandwidthIn" xml:"InternetMaxBandwidthIn"` + InternetMaxBandwidthOut int `json:"InternetMaxBandwidthOut" xml:"InternetMaxBandwidthOut"` + HostName string `json:"HostName" xml:"HostName"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + SystemDiskSize int `json:"SystemDisk.Size" xml:"SystemDisk.Size"` + SystemDiskCategory string `json:"SystemDisk.Category" xml:"SystemDisk.Category"` + SystemDiskDiskName string `json:"SystemDisk.DiskName" xml:"SystemDisk.DiskName"` + SystemDiskDescription string `json:"SystemDisk.Description" xml:"SystemDisk.Description"` + SystemDiskIops int `json:"SystemDisk.Iops" xml:"SystemDisk.Iops"` + SystemDiskPerformanceLevel string `json:"SystemDisk.PerformanceLevel" xml:"SystemDisk.PerformanceLevel"` + SystemDiskDeleteWithInstance bool `json:"SystemDisk.DeleteWithInstance" xml:"SystemDisk.DeleteWithInstance"` + IoOptimized string `json:"IoOptimized" xml:"IoOptimized"` + InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"` + Period int `json:"Period" xml:"Period"` + InternetChargeType string `json:"InternetChargeType" xml:"InternetChargeType"` + EnableVmOsConfig bool `json:"EnableVmOsConfig" xml:"EnableVmOsConfig"` + NetworkType string `json:"NetworkType" xml:"NetworkType"` + UserData string `json:"UserData" xml:"UserData"` + KeyPairName string `json:"KeyPairName" xml:"KeyPairName"` + RamRoleName string `json:"RamRoleName" xml:"RamRoleName"` + AutoReleaseTime string `json:"AutoReleaseTime" xml:"AutoReleaseTime"` + SpotStrategy string `json:"SpotStrategy" xml:"SpotStrategy"` + SpotPriceLimit float64 `json:"SpotPriceLimit" xml:"SpotPriceLimit"` + SpotDuration int `json:"SpotDuration" xml:"SpotDuration"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + SecurityEnhancementStrategy string `json:"SecurityEnhancementStrategy" xml:"SecurityEnhancementStrategy"` + PrivateIpAddress string `json:"PrivateIpAddress" xml:"PrivateIpAddress"` + DeploymentSetId string `json:"DeploymentSetId" xml:"DeploymentSetId"` + SecurityGroupIds SecurityGroupIdsInDescribeLaunchTemplateVersions `json:"SecurityGroupIds" xml:"SecurityGroupIds"` + DataDisks DataDisks `json:"DataDisks" xml:"DataDisks"` + NetworkInterfaces NetworkInterfacesInDescribeLaunchTemplateVersions `json:"NetworkInterfaces" xml:"NetworkInterfaces"` + Tags TagsInDescribeLaunchTemplateVersions `json:"Tags" xml:"Tags"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_set.go index 5419465f2..6c05c7543 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_set.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_set.go @@ -21,8 +21,8 @@ type LaunchTemplateSet struct { ModifiedTime string `json:"ModifiedTime" xml:"ModifiedTime"` LaunchTemplateId string `json:"LaunchTemplateId" xml:"LaunchTemplateId"` LaunchTemplateName string `json:"LaunchTemplateName" xml:"LaunchTemplateName"` - DefaultVersionNumber int `json:"DefaultVersionNumber" xml:"DefaultVersionNumber"` - LatestVersionNumber int `json:"LatestVersionNumber" xml:"LatestVersionNumber"` + DefaultVersionNumber int64 `json:"DefaultVersionNumber" xml:"DefaultVersionNumber"` + LatestVersionNumber int64 `json:"LatestVersionNumber" xml:"LatestVersionNumber"` CreatedBy string `json:"CreatedBy" xml:"CreatedBy"` ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` Tags TagsInDescribeLaunchTemplates `json:"Tags" xml:"Tags"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_version_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_version_set.go index 46f53bebe..053900afa 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_version_set.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_launch_template_version_set.go @@ -22,7 +22,7 @@ type LaunchTemplateVersionSet struct { LaunchTemplateId string `json:"LaunchTemplateId" xml:"LaunchTemplateId"` LaunchTemplateName string `json:"LaunchTemplateName" xml:"LaunchTemplateName"` DefaultVersion bool `json:"DefaultVersion" xml:"DefaultVersion"` - VersionNumber int `json:"VersionNumber" xml:"VersionNumber"` + VersionNumber int64 `json:"VersionNumber" xml:"VersionNumber"` VersionDescription string `json:"VersionDescription" xml:"VersionDescription"` CreatedBy string `json:"CreatedBy" xml:"CreatedBy"` LaunchTemplateData LaunchTemplateData `json:"LaunchTemplateData" xml:"LaunchTemplateData"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_local_storage_capacities.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_local_storage_capacities.go new file mode 100644 index 000000000..d38350ab9 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_local_storage_capacities.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// LocalStorageCapacities is a nested struct in ecs response +type LocalStorageCapacities struct { + LocalStorageCapacity []LocalStorageCapacity `json:"LocalStorageCapacity" xml:"LocalStorageCapacity"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_local_storage_capacity.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_local_storage_capacity.go new file mode 100644 index 000000000..f038b6321 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_local_storage_capacity.go @@ -0,0 +1,23 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// LocalStorageCapacity is a nested struct in ecs response +type LocalStorageCapacity struct { + TotalDisk int `json:"TotalDisk" xml:"TotalDisk"` + AvailableDisk int `json:"AvailableDisk" xml:"AvailableDisk"` + DataDiskCategory string `json:"DataDiskCategory" xml:"DataDiskCategory"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_attribute.go new file mode 100644 index 000000000..320f3ca5d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_attribute.go @@ -0,0 +1,24 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MaintenanceAttribute is a nested struct in ecs response +type MaintenanceAttribute struct { + InstanceId string `json:"InstanceId" xml:"InstanceId"` + NotifyOnMaintenance bool `json:"NotifyOnMaintenance" xml:"NotifyOnMaintenance"` + ActionOnMaintenance ActionOnMaintenance `json:"ActionOnMaintenance" xml:"ActionOnMaintenance"` + MaintenanceWindows MaintenanceWindows `json:"MaintenanceWindows" xml:"MaintenanceWindows"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_attributes.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_attributes.go new file mode 100644 index 000000000..d50c2b855 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_attributes.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MaintenanceAttributes is a nested struct in ecs response +type MaintenanceAttributes struct { + MaintenanceAttribute []MaintenanceAttribute `json:"MaintenanceAttribute" xml:"MaintenanceAttribute"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_window.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_window.go new file mode 100644 index 000000000..0c831b049 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_window.go @@ -0,0 +1,22 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MaintenanceWindow is a nested struct in ecs response +type MaintenanceWindow struct { + StartTime string `json:"StartTime" xml:"StartTime"` + EndTime string `json:"EndTime" xml:"EndTime"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_windows_.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_windows_.go new file mode 100644 index 000000000..c19cd9e51 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_maintenance_windows_.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MaintenanceWindows is a nested struct in ecs response +type MaintenanceWindows struct { + MaintenanceWindow []MaintenanceWindow `json:"MaintenanceWindow" xml:"MaintenanceWindow"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_member_network_interface_ids.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_member_network_interface_ids.go new file mode 100644 index 000000000..7ab200a23 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_member_network_interface_ids.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MemberNetworkInterfaceIds is a nested struct in ecs response +type MemberNetworkInterfaceIds struct { + MemberNetworkInterfaceId []string `json:"MemberNetworkInterfaceId" xml:"MemberNetworkInterfaceId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_metadata_options.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_metadata_options.go new file mode 100644 index 000000000..0e956d02b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_metadata_options.go @@ -0,0 +1,23 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MetadataOptions is a nested struct in ecs response +type MetadataOptions struct { + HttpEndpoint string `json:"HttpEndpoint" xml:"HttpEndpoint"` + HttpTokens string `json:"HttpTokens" xml:"HttpTokens"` + HttpPutResponseHopLimit int `json:"HttpPutResponseHopLimit" xml:"HttpPutResponseHopLimit"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface.go index 908e72310..ecb2a073d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface.go @@ -17,11 +17,15 @@ package ecs // NetworkInterface is a nested struct in ecs response type NetworkInterface struct { - SecurityGroupId string `json:"SecurityGroupId" xml:"SecurityGroupId"` - VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` - NetworkInterfaceId string `json:"NetworkInterfaceId" xml:"NetworkInterfaceId"` - PrimaryIpAddress string `json:"PrimaryIpAddress" xml:"PrimaryIpAddress"` - MacAddress string `json:"MacAddress" xml:"MacAddress"` - Description string `json:"Description" xml:"Description"` - NetworkInterfaceName string `json:"NetworkInterfaceName" xml:"NetworkInterfaceName"` + SecurityGroupId string `json:"SecurityGroupId" xml:"SecurityGroupId"` + VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` + NetworkInterfaceId string `json:"NetworkInterfaceId" xml:"NetworkInterfaceId"` + PrimaryIpAddress string `json:"PrimaryIpAddress" xml:"PrimaryIpAddress"` + MacAddress string `json:"MacAddress" xml:"MacAddress"` + Description string `json:"Description" xml:"Description"` + Type string `json:"Type" xml:"Type"` + NetworkInterfaceName string `json:"NetworkInterfaceName" xml:"NetworkInterfaceName"` + SecurityGroupIds SecurityGroupIdsInDescribeLaunchTemplateVersions `json:"SecurityGroupIds" xml:"SecurityGroupIds"` + PrivateIpSets PrivateIpSetsInDescribeInstances `json:"PrivateIpSets" xml:"PrivateIpSets"` + Ipv6Sets Ipv6SetsInDescribeInstances `json:"Ipv6Sets" xml:"Ipv6Sets"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface_permission.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface_permission.go index 4c2ac06f8..d72780d3a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface_permission.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface_permission.go @@ -18,7 +18,7 @@ package ecs // NetworkInterfacePermission is a nested struct in ecs response type NetworkInterfacePermission struct { Permission string `json:"Permission" xml:"Permission"` - AccountId int `json:"AccountId" xml:"AccountId"` + AccountId int64 `json:"AccountId" xml:"AccountId"` NetworkInterfaceId string `json:"NetworkInterfaceId" xml:"NetworkInterfaceId"` ServiceName string `json:"ServiceName" xml:"ServiceName"` NetworkInterfacePermissionId string `json:"NetworkInterfacePermissionId" xml:"NetworkInterfacePermissionId"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface_set.go index 08b10badf..4ffbdcba4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface_set.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_network_interface_set.go @@ -30,11 +30,14 @@ type NetworkInterfaceSet struct { InstanceId string `json:"InstanceId" xml:"InstanceId"` CreationTime string `json:"CreationTime" xml:"CreationTime"` ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - ServiceID int `json:"ServiceID" xml:"ServiceID"` + ServiceID int64 `json:"ServiceID" xml:"ServiceID"` ServiceManaged bool `json:"ServiceManaged" xml:"ServiceManaged"` + QueueNumber int `json:"QueueNumber" xml:"QueueNumber"` + OwnerId string `json:"OwnerId" xml:"OwnerId"` SecurityGroupIds SecurityGroupIdsInDescribeNetworkInterfaces `json:"SecurityGroupIds" xml:"SecurityGroupIds"` AssociatedPublicIp AssociatedPublicIp `json:"AssociatedPublicIp" xml:"AssociatedPublicIp"` - PrivateIpSets PrivateIpSets `json:"PrivateIpSets" xml:"PrivateIpSets"` - Ipv6Sets Ipv6Sets `json:"Ipv6Sets" xml:"Ipv6Sets"` + Attachment Attachment `json:"Attachment" xml:"Attachment"` + PrivateIpSets PrivateIpSetsInDescribeNetworkInterfaces `json:"PrivateIpSets" xml:"PrivateIpSets"` + Ipv6Sets Ipv6SetsInDescribeNetworkInterfaces `json:"Ipv6Sets" xml:"Ipv6Sets"` Tags TagsInDescribeNetworkInterfaces `json:"Tags" xml:"Tags"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress.go index 61bb990ed..cdcacf49c 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress.go @@ -17,8 +17,8 @@ package ecs // OperationProgress is a nested struct in ecs response type OperationProgress struct { - OperationStatus string `json:"OperationStatus" xml:"OperationStatus"` - ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` - ErrorMsg string `json:"ErrorMsg" xml:"ErrorMsg"` - RelatedItemSet RelatedItemSet `json:"RelatedItemSet" xml:"RelatedItemSet"` + ErrorMsg string `json:"ErrorMsg" xml:"ErrorMsg"` + OperationStatus string `json:"OperationStatus" xml:"OperationStatus"` + ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` + RelatedItemSet RelatedItemSetInDeleteSnapshotGroup `json:"RelatedItemSet" xml:"RelatedItemSet"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_delete_snapshot_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_delete_snapshot_group.go new file mode 100644 index 000000000..2e932f94c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_delete_snapshot_group.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// OperationProgressSetInDeleteSnapshotGroup is a nested struct in ecs response +type OperationProgressSetInDeleteSnapshotGroup struct { + OperationProgress []OperationProgress `json:"OperationProgress" xml:"OperationProgress"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_describe_task_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_describe_task_attribute.go new file mode 100644 index 000000000..9edcc6c3d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_describe_task_attribute.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// OperationProgressSetInDescribeTaskAttribute is a nested struct in ecs response +type OperationProgressSetInDescribeTaskAttribute struct { + OperationProgress []OperationProgress `json:"OperationProgress" xml:"OperationProgress"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_reset_disks.go similarity index 87% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_reset_disks.go index 142ea4fff..e2e34523f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_operation_progress_set_in_reset_disks.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// OperationProgressSet is a nested struct in ecs response -type OperationProgressSet struct { +// OperationProgressSetInResetDisks is a nested struct in ecs response +type OperationProgressSetInResetDisks struct { OperationProgress []OperationProgress `json:"OperationProgress" xml:"OperationProgress"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_parameter_names.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_parameter_names.go new file mode 100644 index 000000000..dd2e30aa8 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_parameter_names.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ParameterNames is a nested struct in ecs response +type ParameterNames struct { + ParameterName []string `json:"ParameterName" xml:"ParameterName"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_pay_as_you_go_options.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_pay_as_you_go_options.go new file mode 100644 index 000000000..64bf589b2 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_pay_as_you_go_options.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PayAsYouGoOptions is a nested struct in ecs response +type PayAsYouGoOptions struct { + AllocationStrategy string `json:"AllocationStrategy" xml:"AllocationStrategy"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_physical_connection_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_physical_connection_type.go index 5b79b0d8d..39ce1118a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_physical_connection_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_physical_connection_type.go @@ -34,5 +34,5 @@ type PhysicalConnectionType struct { AdLocation string `json:"AdLocation" xml:"AdLocation"` PortNumber string `json:"PortNumber" xml:"PortNumber"` CircuitCode string `json:"CircuitCode" xml:"CircuitCode"` - Bandwidth int `json:"Bandwidth" xml:"Bandwidth"` + Bandwidth int64 `json:"Bandwidth" xml:"Bandwidth"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_price.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_price.go index bd142488a..b63bb657b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_price.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_price.go @@ -17,9 +17,10 @@ package ecs // Price is a nested struct in ecs response type Price struct { - DiscountPrice float64 `json:"DiscountPrice" xml:"DiscountPrice"` - TradePrice float64 `json:"TradePrice" xml:"TradePrice"` - OriginalPrice float64 `json:"OriginalPrice" xml:"OriginalPrice"` - Currency string `json:"Currency" xml:"Currency"` - DetailInfos DetailInfosInDescribeRenewalPrice `json:"DetailInfos" xml:"DetailInfos"` + DiscountPrice float64 `json:"DiscountPrice" xml:"DiscountPrice"` + TradePrice float64 `json:"TradePrice" xml:"TradePrice"` + OriginalPrice float64 `json:"OriginalPrice" xml:"OriginalPrice"` + Currency string `json:"Currency" xml:"Currency"` + ReservedInstanceHourPrice float64 `json:"ReservedInstanceHourPrice" xml:"ReservedInstanceHourPrice"` + DetailInfos DetailInfosInDescribePrice `json:"DetailInfos" xml:"DetailInfos"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_price_info.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_price_info.go index 3e02bfcbe..fb7ae9eda 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_price_info.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_price_info.go @@ -17,6 +17,6 @@ package ecs // PriceInfo is a nested struct in ecs response type PriceInfo struct { - Price Price `json:"Price" xml:"Price"` - Rules RulesInDescribeRenewalPrice `json:"Rules" xml:"Rules"` + Price Price `json:"Price" xml:"Price"` + Rules RulesInDescribeInstanceModificationPrice `json:"Rules" xml:"Rules"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_set_in_assign_private_ip_addresses.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_set_in_assign_private_ip_addresses.go new file mode 100644 index 000000000..f012cd3f0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_set_in_assign_private_ip_addresses.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PrivateIpSetInAssignPrivateIpAddresses is a nested struct in ecs response +type PrivateIpSetInAssignPrivateIpAddresses struct { + PrivateIpAddress []string `json:"PrivateIpAddress" xml:"PrivateIpAddress"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_create_network_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_create_network_interface.go new file mode 100644 index 000000000..65ae60d1e --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_create_network_interface.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PrivateIpSetsInCreateNetworkInterface is a nested struct in ecs response +type PrivateIpSetsInCreateNetworkInterface struct { + PrivateIpSet []PrivateIpSet `json:"PrivateIpSet" xml:"PrivateIpSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_instances.go similarity index 86% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_instances.go index 412ab9672..59403d027 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_instances.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// PrivateIpSets is a nested struct in ecs response -type PrivateIpSets struct { +// PrivateIpSetsInDescribeInstances is a nested struct in ecs response +type PrivateIpSetsInDescribeInstances struct { PrivateIpSet []PrivateIpSet `json:"PrivateIpSet" xml:"PrivateIpSet"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_network_interface_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_network_interface_attribute.go new file mode 100644 index 000000000..a557a7560 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_network_interface_attribute.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PrivateIpSetsInDescribeNetworkInterfaceAttribute is a nested struct in ecs response +type PrivateIpSetsInDescribeNetworkInterfaceAttribute struct { + PrivateIpSet []PrivateIpSet `json:"PrivateIpSet" xml:"PrivateIpSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_network_interfaces.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_network_interfaces.go new file mode 100644 index 000000000..82c5572cf --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_private_ip_sets_in_describe_network_interfaces.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PrivateIpSetsInDescribeNetworkInterfaces is a nested struct in ecs response +type PrivateIpSetsInDescribeNetworkInterfaces struct { + PrivateIpSet []PrivateIpSet `json:"PrivateIpSet" xml:"PrivateIpSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_recommend_instance_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_recommend_instance_type.go index d7f7c3184..624969330 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_recommend_instance_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_recommend_instance_type.go @@ -17,9 +17,14 @@ package ecs // RecommendInstanceType is a nested struct in ecs response type RecommendInstanceType struct { - RegionNo string `json:"RegionNo" xml:"RegionNo"` - CommodityCode string `json:"CommodityCode" xml:"CommodityCode"` - Scene string `json:"Scene" xml:"Scene"` - InstanceType InstanceType `json:"InstanceType" xml:"InstanceType"` - Zones ZonesInDescribeRecommendInstanceType `json:"Zones" xml:"Zones"` + RegionId string `json:"RegionId" xml:"RegionId"` + CommodityCode string `json:"CommodityCode" xml:"CommodityCode"` + Scene string `json:"Scene" xml:"Scene"` + InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"` + SpotStrategy string `json:"SpotStrategy" xml:"SpotStrategy"` + Priority int `json:"Priority" xml:"Priority"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` + NetworkType string `json:"NetworkType" xml:"NetworkType"` + InstanceType InstanceType `json:"InstanceType" xml:"InstanceType"` + Zones ZonesInDescribeRecommendInstanceType `json:"Zones" xml:"Zones"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_delete_snapshot_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_delete_snapshot_group.go new file mode 100644 index 000000000..f7a2d3d94 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_delete_snapshot_group.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RelatedItemSetInDeleteSnapshotGroup is a nested struct in ecs response +type RelatedItemSetInDeleteSnapshotGroup struct { + RelatedItem []RelatedItem `json:"RelatedItem" xml:"RelatedItem"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_describe_task_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_describe_task_attribute.go new file mode 100644 index 000000000..106276bba --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_describe_task_attribute.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RelatedItemSetInDescribeTaskAttribute is a nested struct in ecs response +type RelatedItemSetInDescribeTaskAttribute struct { + RelatedItem []RelatedItem `json:"RelatedItem" xml:"RelatedItem"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_reset_disks.go similarity index 87% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_reset_disks.go index 10018fd99..40abb8665 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_related_item_set_in_reset_disks.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// RelatedItemSet is a nested struct in ecs response -type RelatedItemSet struct { +// RelatedItemSetInResetDisks is a nested struct in ecs response +type RelatedItemSetInResetDisks struct { RelatedItem []RelatedItem `json:"RelatedItem" xml:"RelatedItem"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_reserved_instance.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_reserved_instance.go index 042fd1983..c44b78ef8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_reserved_instance.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_reserved_instance.go @@ -25,11 +25,14 @@ type ReservedInstance struct { InstanceType string `json:"InstanceType" xml:"InstanceType"` Scope string `json:"Scope" xml:"Scope"` OfferingType string `json:"OfferingType" xml:"OfferingType"` + Platform string `json:"Platform" xml:"Platform"` InstanceAmount int `json:"InstanceAmount" xml:"InstanceAmount"` Status string `json:"Status" xml:"Status"` CreationTime string `json:"CreationTime" xml:"CreationTime"` ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` StartTime string `json:"StartTime" xml:"StartTime"` ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + AllocationStatus string `json:"AllocationStatus" xml:"AllocationStatus"` OperationLocks OperationLocksInDescribeReservedInstances `json:"OperationLocks" xml:"OperationLocks"` + Tags TagsInDescribeReservedInstances `json:"Tags" xml:"Tags"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_resource_price_model.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_resource_price_model.go index 4a86dcb37..7b612d0b5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_resource_price_model.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_resource_price_model.go @@ -17,9 +17,9 @@ package ecs // ResourcePriceModel is a nested struct in ecs response type ResourcePriceModel struct { - DiscountPrice float64 `json:"DiscountPrice" xml:"DiscountPrice"` - TradePrice float64 `json:"TradePrice" xml:"TradePrice"` - OriginalPrice float64 `json:"OriginalPrice" xml:"OriginalPrice"` - Resource string `json:"Resource" xml:"Resource"` - SubRules SubRulesInDescribeRenewalPrice `json:"SubRules" xml:"SubRules"` + DiscountPrice float64 `json:"DiscountPrice" xml:"DiscountPrice"` + TradePrice float64 `json:"TradePrice" xml:"TradePrice"` + OriginalPrice float64 `json:"OriginalPrice" xml:"OriginalPrice"` + Resource string `json:"Resource" xml:"Resource"` + SubRules SubRulesInDescribePrice `json:"SubRules" xml:"SubRules"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_resource_type_count.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_resource_type_count.go index 46b4032af..9191933e1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_resource_type_count.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_resource_type_count.go @@ -17,14 +17,16 @@ package ecs // ResourceTypeCount is a nested struct in ecs response type ResourceTypeCount struct { - Instance int `json:"Instance" xml:"Instance"` - Disk int `json:"Disk" xml:"Disk"` - Volume int `json:"Volume" xml:"Volume"` - Image int `json:"Image" xml:"Image"` - Snapshot int `json:"Snapshot" xml:"Snapshot"` - Securitygroup int `json:"Securitygroup" xml:"Securitygroup"` - LaunchTemplate int `json:"LaunchTemplate" xml:"LaunchTemplate"` - Eni int `json:"Eni" xml:"Eni"` - Ddh int `json:"Ddh" xml:"Ddh"` - KeyPair int `json:"KeyPair" xml:"KeyPair"` + Instance int `json:"Instance" xml:"Instance"` + Disk int `json:"Disk" xml:"Disk"` + Volume int `json:"Volume" xml:"Volume"` + Image int `json:"Image" xml:"Image"` + Snapshot int `json:"Snapshot" xml:"Snapshot"` + Securitygroup int `json:"Securitygroup" xml:"Securitygroup"` + LaunchTemplate int `json:"LaunchTemplate" xml:"LaunchTemplate"` + Eni int `json:"Eni" xml:"Eni"` + Ddh int `json:"Ddh" xml:"Ddh"` + KeyPair int `json:"KeyPair" xml:"KeyPair"` + SnapshotPolicy int `json:"SnapshotPolicy" xml:"SnapshotPolicy"` + ReservedInstance int `json:"ReservedInstance" xml:"ReservedInstance"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_rule.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_rule.go index 7e373b4e6..da75a9e16 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_rule.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_rule.go @@ -17,6 +17,6 @@ package ecs // Rule is a nested struct in ecs response type Rule struct { - RuleId int `json:"RuleId" xml:"RuleId"` + RuleId int64 `json:"RuleId" xml:"RuleId"` Description string `json:"Description" xml:"Description"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_rules_in_describe_instance_modification_price.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_rules_in_describe_instance_modification_price.go new file mode 100644 index 000000000..da7166176 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_rules_in_describe_instance_modification_price.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RulesInDescribeInstanceModificationPrice is a nested struct in ecs response +type RulesInDescribeInstanceModificationPrice struct { + Rule []Rule `json:"Rule" xml:"Rule"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_scheduled_system_event_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_scheduled_system_event_type.go index da79d82e8..13ca76fd3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_scheduled_system_event_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_scheduled_system_event_type.go @@ -20,6 +20,8 @@ type ScheduledSystemEventType struct { EventId string `json:"EventId" xml:"EventId"` EventPublishTime string `json:"EventPublishTime" xml:"EventPublishTime"` NotBefore string `json:"NotBefore" xml:"NotBefore"` + Reason string `json:"Reason" xml:"Reason"` + ImpactLevel string `json:"ImpactLevel" xml:"ImpactLevel"` EventCycleStatus EventCycleStatus `json:"EventCycleStatus" xml:"EventCycleStatus"` EventType EventType `json:"EventType" xml:"EventType"` ExtendedAttribute ExtendedAttribute `json:"ExtendedAttribute" xml:"ExtendedAttribute"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group.go index 02f9e46ad..7255d22e9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group.go @@ -22,8 +22,11 @@ type SecurityGroup struct { SecurityGroupName string `json:"SecurityGroupName" xml:"SecurityGroupName"` VpcId string `json:"VpcId" xml:"VpcId"` CreationTime string `json:"CreationTime" xml:"CreationTime"` + SecurityGroupType string `json:"SecurityGroupType" xml:"SecurityGroupType"` AvailableInstanceAmount int `json:"AvailableInstanceAmount" xml:"AvailableInstanceAmount"` EcsCount int `json:"EcsCount" xml:"EcsCount"` ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + ServiceID int64 `json:"ServiceID" xml:"ServiceID"` + ServiceManaged bool `json:"ServiceManaged" xml:"ServiceManaged"` Tags TagsInDescribeSecurityGroups `json:"Tags" xml:"Tags"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_create_network_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_create_network_interface.go new file mode 100644 index 000000000..1fe4f4e06 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_create_network_interface.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SecurityGroupIdsInCreateNetworkInterface is a nested struct in ecs response +type SecurityGroupIdsInCreateNetworkInterface struct { + SecurityGroupId []string `json:"SecurityGroupId" xml:"SecurityGroupId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_describe_launch_template_versions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_describe_launch_template_versions.go new file mode 100644 index 000000000..faa7dce57 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_describe_launch_template_versions.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SecurityGroupIdsInDescribeLaunchTemplateVersions is a nested struct in ecs response +type SecurityGroupIdsInDescribeLaunchTemplateVersions struct { + SecurityGroupId []string `json:"SecurityGroupId" xml:"SecurityGroupId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_describe_network_interface_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_describe_network_interface_attribute.go new file mode 100644 index 000000000..caacd927c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_security_group_ids_in_describe_network_interface_attribute.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SecurityGroupIdsInDescribeNetworkInterfaceAttribute is a nested struct in ecs response +type SecurityGroupIdsInDescribeNetworkInterfaceAttribute struct { + SecurityGroupId []string `json:"SecurityGroupId" xml:"SecurityGroupId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot.go index 76eb0cad3..66220f0d8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot.go @@ -17,22 +17,28 @@ package ecs // Snapshot is a nested struct in ecs response type Snapshot struct { - SnapshotId string `json:"SnapshotId" xml:"SnapshotId"` - SnapshotName string `json:"SnapshotName" xml:"SnapshotName"` - Progress string `json:"Progress" xml:"Progress"` - ProductCode string `json:"ProductCode" xml:"ProductCode"` - SourceDiskId string `json:"SourceDiskId" xml:"SourceDiskId"` - SourceDiskType string `json:"SourceDiskType" xml:"SourceDiskType"` - RetentionDays int `json:"RetentionDays" xml:"RetentionDays"` - Encrypted bool `json:"Encrypted" xml:"Encrypted"` - SourceDiskSize string `json:"SourceDiskSize" xml:"SourceDiskSize"` - Description string `json:"Description" xml:"Description"` - CreationTime string `json:"CreationTime" xml:"CreationTime"` - Status string `json:"Status" xml:"Status"` - Usage string `json:"Usage" xml:"Usage"` - SourceStorageType string `json:"SourceStorageType" xml:"SourceStorageType"` - RemainTime int `json:"RemainTime" xml:"RemainTime"` - ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` - KMSKeyId string `json:"KMSKeyId" xml:"KMSKeyId"` - Tags TagsInDescribeSnapshots `json:"Tags" xml:"Tags"` + Category string `json:"Category" xml:"Category"` + Usage string `json:"Usage" xml:"Usage"` + SourceDiskSize string `json:"SourceDiskSize" xml:"SourceDiskSize"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + SourceStorageType string `json:"SourceStorageType" xml:"SourceStorageType"` + ProductCode string `json:"ProductCode" xml:"ProductCode"` + KMSKeyId string `json:"KMSKeyId" xml:"KMSKeyId"` + Encrypted bool `json:"Encrypted" xml:"Encrypted"` + Progress string `json:"Progress" xml:"Progress"` + LastModifiedTime string `json:"LastModifiedTime" xml:"LastModifiedTime"` + RetentionDays int `json:"RetentionDays" xml:"RetentionDays"` + SourceDiskId string `json:"SourceDiskId" xml:"SourceDiskId"` + ResourceGroupId string `json:"ResourceGroupId" xml:"ResourceGroupId"` + RemainTime int `json:"RemainTime" xml:"RemainTime"` + SnapshotId string `json:"SnapshotId" xml:"SnapshotId"` + SnapshotSN string `json:"SnapshotSN" xml:"SnapshotSN"` + InstantAccess bool `json:"InstantAccess" xml:"InstantAccess"` + InstantAccessRetentionDays int `json:"InstantAccessRetentionDays" xml:"InstantAccessRetentionDays"` + Status string `json:"Status" xml:"Status"` + SnapshotType string `json:"SnapshotType" xml:"SnapshotType"` + Description string `json:"Description" xml:"Description"` + SourceDiskType string `json:"SourceDiskType" xml:"SourceDiskType"` + SnapshotName string `json:"SnapshotName" xml:"SnapshotName"` + Tags TagsInDescribeSnapshots `json:"Tags" xml:"Tags"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_group.go new file mode 100644 index 000000000..c50fcb2fc --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_group.go @@ -0,0 +1,28 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SnapshotGroup is a nested struct in ecs response +type SnapshotGroup struct { + InstanceId string `json:"InstanceId" xml:"InstanceId"` + SnapshotGroupId string `json:"SnapshotGroupId" xml:"SnapshotGroupId"` + Status string `json:"Status" xml:"Status"` + Name string `json:"Name" xml:"Name"` + Description string `json:"Description" xml:"Description"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ProgressStatus string `json:"ProgressStatus" xml:"ProgressStatus"` + Snapshots SnapshotsInDescribeSnapshotGroups `json:"Snapshots" xml:"Snapshots"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_groups.go new file mode 100644 index 000000000..9969be33d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_groups.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SnapshotGroups is a nested struct in ecs response +type SnapshotGroups struct { + SnapshotGroup []SnapshotGroup `json:"SnapshotGroup" xml:"SnapshotGroup"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_link.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_link.go index 5ab4ea0aa..566eb43b5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_link.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_link.go @@ -25,6 +25,8 @@ type SnapshotLink struct { SourceDiskName string `json:"SourceDiskName" xml:"SourceDiskName"` SourceDiskSize int `json:"SourceDiskSize" xml:"SourceDiskSize"` SourceDiskType string `json:"SourceDiskType" xml:"SourceDiskType"` - TotalSize int `json:"TotalSize" xml:"TotalSize"` + Category string `json:"Category" xml:"Category"` + InstantAccess bool `json:"InstantAccess" xml:"InstantAccess"` + TotalSize int64 `json:"TotalSize" xml:"TotalSize"` TotalCount int `json:"TotalCount" xml:"TotalCount"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_package.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_package.go index dfd78eb09..e8eddca07 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_package.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshot_package.go @@ -19,6 +19,6 @@ package ecs type SnapshotPackage struct { StartTime string `json:"StartTime" xml:"StartTime"` EndTime string `json:"EndTime" xml:"EndTime"` - InitCapacity int `json:"InitCapacity" xml:"InitCapacity"` + InitCapacity int64 `json:"InitCapacity" xml:"InitCapacity"` DisplayName string `json:"DisplayName" xml:"DisplayName"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots_in_describe_snapshot_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots_in_describe_snapshot_groups.go new file mode 100644 index 000000000..eecdb6823 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots_in_describe_snapshot_groups.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SnapshotsInDescribeSnapshotGroups is a nested struct in ecs response +type SnapshotsInDescribeSnapshotGroups struct { + Snapshot []Snapshot `json:"Snapshot" xml:"Snapshot"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots_in_describe_snapshots.go similarity index 87% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots_in_describe_snapshots.go index 9f6f40b3b..d0c9580fe 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_snapshots_in_describe_snapshots.go @@ -15,7 +15,7 @@ package ecs // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Snapshots is a nested struct in ecs response -type Snapshots struct { +// SnapshotsInDescribeSnapshots is a nested struct in ecs response +type SnapshotsInDescribeSnapshots struct { Snapshot []Snapshot `json:"Snapshot" xml:"Snapshot"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_spot_options.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_spot_options.go new file mode 100644 index 000000000..53864299a --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_spot_options.go @@ -0,0 +1,23 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SpotOptions is a nested struct in ecs response +type SpotOptions struct { + AllocationStrategy string `json:"AllocationStrategy" xml:"AllocationStrategy"` + InstanceInterruptionBehavior string `json:"InstanceInterruptionBehavior" xml:"InstanceInterruptionBehavior"` + InstancePoolsToUseCount int `json:"InstancePoolsToUseCount" xml:"InstancePoolsToUseCount"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_unit.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_unit.go new file mode 100644 index 000000000..fad3d309c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_unit.go @@ -0,0 +1,30 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// StorageCapacityUnit is a nested struct in ecs response +type StorageCapacityUnit struct { + RegionId string `json:"RegionId" xml:"RegionId"` + StorageCapacityUnitId string `json:"StorageCapacityUnitId" xml:"StorageCapacityUnitId"` + Name string `json:"Name" xml:"Name"` + Capacity int `json:"Capacity" xml:"Capacity"` + Status string `json:"Status" xml:"Status"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + ExpiredTime string `json:"ExpiredTime" xml:"ExpiredTime"` + StartTime string `json:"StartTime" xml:"StartTime"` + Description string `json:"Description" xml:"Description"` + AllocationStatus string `json:"AllocationStatus" xml:"AllocationStatus"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_unit_ids.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_unit_ids.go new file mode 100644 index 000000000..c66bf236c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_unit_ids.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// StorageCapacityUnitIds is a nested struct in ecs response +type StorageCapacityUnitIds struct { + StorageCapacityUnitId []string `json:"StorageCapacityUnitId" xml:"StorageCapacityUnitId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_units.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_units.go new file mode 100644 index 000000000..3edb9ad12 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_capacity_units.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// StorageCapacityUnits is a nested struct in ecs response +type StorageCapacityUnits struct { + StorageCapacityUnit []StorageCapacityUnit `json:"StorageCapacityUnit" xml:"StorageCapacityUnit"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_set.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_set.go new file mode 100644 index 000000000..812b0a595 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_set.go @@ -0,0 +1,27 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// StorageSet is a nested struct in ecs response +type StorageSet struct { + StorageSetId string `json:"StorageSetId" xml:"StorageSetId"` + CreationTime string `json:"CreationTime" xml:"CreationTime"` + StorageSetName string `json:"StorageSetName" xml:"StorageSetName"` + Description string `json:"Description" xml:"Description"` + StorageSetPartitionNumber int `json:"StorageSetPartitionNumber" xml:"StorageSetPartitionNumber"` + RegionId string `json:"RegionId" xml:"RegionId"` + ZoneId string `json:"ZoneId" xml:"ZoneId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_sets.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_sets.go new file mode 100644 index 000000000..f1e077cf6 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_storage_sets.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// StorageSets is a nested struct in ecs response +type StorageSets struct { + StorageSet []StorageSet `json:"StorageSet" xml:"StorageSet"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_supported_custom_instance_type_families.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_supported_custom_instance_type_families.go new file mode 100644 index 000000000..b38d81e18 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_supported_custom_instance_type_families.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SupportedCustomInstanceTypeFamilies is a nested struct in ecs response +type SupportedCustomInstanceTypeFamilies struct { + SupportedCustomInstanceTypeFamily []string `json:"SupportedCustomInstanceTypeFamily" xml:"SupportedCustomInstanceTypeFamily"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_supported_values.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_supported_values.go new file mode 100644 index 000000000..2ccebf1af --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_supported_values.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SupportedValues is a nested struct in ecs response +type SupportedValues struct { + SupportedValue []string `json:"SupportedValue" xml:"SupportedValue"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_create_network_interface.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_create_network_interface.go new file mode 100644 index 000000000..8b71a6c06 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_create_network_interface.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInCreateNetworkInterface is a nested struct in ecs response +type TagsInCreateNetworkInterface struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_auto_snapshot_policy_ex.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_auto_snapshot_policy_ex.go new file mode 100644 index 000000000..d60da9682 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_auto_snapshot_policy_ex.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeAutoSnapshotPolicyEx is a nested struct in ecs response +type TagsInDescribeAutoSnapshotPolicyEx struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_capacity_reservations.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_capacity_reservations.go new file mode 100644 index 000000000..88f3499b3 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_capacity_reservations.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeCapacityReservations is a nested struct in ecs response +type TagsInDescribeCapacityReservations struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_dedicated_host_clusters.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_dedicated_host_clusters.go new file mode 100644 index 000000000..0f330464f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_dedicated_host_clusters.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeDedicatedHostClusters is a nested struct in ecs response +type TagsInDescribeDedicatedHostClusters struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_elasticity_assurances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_elasticity_assurances.go new file mode 100644 index 000000000..2694130aa --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_elasticity_assurances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeElasticityAssurances is a nested struct in ecs response +type TagsInDescribeElasticityAssurances struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_components.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_components.go new file mode 100644 index 000000000..bb9026802 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_components.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeImageComponents is a nested struct in ecs response +type TagsInDescribeImageComponents struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_from_family.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_from_family.go new file mode 100644 index 000000000..72a270ed4 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_from_family.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeImageFromFamily is a nested struct in ecs response +type TagsInDescribeImageFromFamily struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_pipeline_executions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_pipeline_executions.go new file mode 100644 index 000000000..b47d72b13 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_pipeline_executions.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeImagePipelineExecutions is a nested struct in ecs response +type TagsInDescribeImagePipelineExecutions struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_pipelines.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_pipelines.go new file mode 100644 index 000000000..57a94dae4 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_image_pipelines.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeImagePipelines is a nested struct in ecs response +type TagsInDescribeImagePipelines struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_network_interface_attribute.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_network_interface_attribute.go new file mode 100644 index 000000000..694710d00 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_network_interface_attribute.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeNetworkInterfaceAttribute is a nested struct in ecs response +type TagsInDescribeNetworkInterfaceAttribute struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_reserved_instances.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_reserved_instances.go new file mode 100644 index 000000000..4cff19746 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_tags_in_describe_reserved_instances.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TagsInDescribeReservedInstances is a nested struct in ecs response +type TagsInDescribeReservedInstances struct { + Tag []Tag `json:"Tag" xml:"Tag"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_target_capacity_specification.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_target_capacity_specification.go new file mode 100644 index 000000000..06c9f2e7b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_target_capacity_specification.go @@ -0,0 +1,24 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// TargetCapacitySpecification is a nested struct in ecs response +type TargetCapacitySpecification struct { + TotalTargetCapacity float64 `json:"TotalTargetCapacity" xml:"TotalTargetCapacity"` + PayAsYouGoTargetCapacity float64 `json:"PayAsYouGoTargetCapacity" xml:"PayAsYouGoTargetCapacity"` + SpotTargetCapacity float64 `json:"SpotTargetCapacity" xml:"SpotTargetCapacity"` + DefaultTargetCapacityType string `json:"DefaultTargetCapacityType" xml:"DefaultTargetCapacityType"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_to_region_ids.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_to_region_ids.go new file mode 100644 index 000000000..77816ed9c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_to_region_ids.go @@ -0,0 +1,21 @@ +package ecs + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ToRegionIds is a nested struct in ecs response +type ToRegionIds struct { + ToRegionId []string `json:"ToRegionId" xml:"ToRegionId"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_v_switch.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_v_switch.go index f360e42d1..e5375d3af 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_v_switch.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_v_switch.go @@ -22,7 +22,7 @@ type VSwitch struct { Status string `json:"Status" xml:"Status"` CidrBlock string `json:"CidrBlock" xml:"CidrBlock"` ZoneId string `json:"ZoneId" xml:"ZoneId"` - AvailableIpAddressCount int `json:"AvailableIpAddressCount" xml:"AvailableIpAddressCount"` + AvailableIpAddressCount int64 `json:"AvailableIpAddressCount" xml:"AvailableIpAddressCount"` Description string `json:"Description" xml:"Description"` VSwitchName string `json:"VSwitchName" xml:"VSwitchName"` CreationTime string `json:"CreationTime" xml:"CreationTime"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_value_item.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_value_item.go index 4653ef03c..fdc3742fc 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_value_item.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_value_item.go @@ -23,4 +23,5 @@ type ValueItem struct { InstanceChargeType string `json:"InstanceChargeType" xml:"InstanceChargeType"` InstanceType string `json:"InstanceType" xml:"InstanceType"` Count int `json:"Count" xml:"Count"` + DiskCategory string `json:"DiskCategory" xml:"DiskCategory"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_virtual_border_router_for_physical_connection_type.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_virtual_border_router_for_physical_connection_type.go index d516e65c7..054d2b060 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_virtual_border_router_for_physical_connection_type.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_virtual_border_router_for_physical_connection_type.go @@ -18,7 +18,7 @@ package ecs // VirtualBorderRouterForPhysicalConnectionType is a nested struct in ecs response type VirtualBorderRouterForPhysicalConnectionType struct { VbrId string `json:"VbrId" xml:"VbrId"` - VbrOwnerUid int `json:"VbrOwnerUid" xml:"VbrOwnerUid"` + VbrOwnerUid int64 `json:"VbrOwnerUid" xml:"VbrOwnerUid"` CreationTime string `json:"CreationTime" xml:"CreationTime"` ActivationTime string `json:"ActivationTime" xml:"ActivationTime"` TerminationTime string `json:"TerminationTime" xml:"TerminationTime"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_vpc_attributes.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_vpc_attributes.go index 73f611c99..84cb87563 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_vpc_attributes.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_vpc_attributes.go @@ -17,8 +17,8 @@ package ecs // VpcAttributes is a nested struct in ecs response type VpcAttributes struct { - VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` - VpcId string `json:"VpcId" xml:"VpcId"` - NatIpAddress string `json:"NatIpAddress" xml:"NatIpAddress"` - PrivateIpAddress PrivateIpAddressInDescribeInstances `json:"PrivateIpAddress" xml:"PrivateIpAddress"` + VSwitchId string `json:"VSwitchId" xml:"VSwitchId"` + VpcId string `json:"VpcId" xml:"VpcId"` + NatIpAddress string `json:"NatIpAddress" xml:"NatIpAddress"` + PrivateIpAddress PrivateIpAddressInDescribeInstanceAttribute `json:"PrivateIpAddress" xml:"PrivateIpAddress"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_zone.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_zone.go index 932afe4db..122868b85 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_zone.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/struct_zone.go @@ -22,7 +22,7 @@ type Zone struct { LocalName string `json:"LocalName" xml:"LocalName"` AvailableResourceCreation AvailableResourceCreation `json:"AvailableResourceCreation" xml:"AvailableResourceCreation"` AvailableVolumeCategories AvailableVolumeCategories `json:"AvailableVolumeCategories" xml:"AvailableVolumeCategories"` - AvailableInstanceTypes AvailableInstanceTypes `json:"AvailableInstanceTypes" xml:"AvailableInstanceTypes"` + AvailableInstanceTypes AvailableInstanceTypesInDescribeZones `json:"AvailableInstanceTypes" xml:"AvailableInstanceTypes"` AvailableDedicatedHostTypes AvailableDedicatedHostTypes `json:"AvailableDedicatedHostTypes" xml:"AvailableDedicatedHostTypes"` NetworkTypes NetworkTypesInDescribeRecommendInstanceType `json:"NetworkTypes" xml:"NetworkTypes"` AvailableDiskCategories AvailableDiskCategories `json:"AvailableDiskCategories" xml:"AvailableDiskCategories"` diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/tag_resources.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/tag_resources.go index a14087cb6..49fb8851b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/tag_resources.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/tag_resources.go @@ -21,7 +21,6 @@ import ( ) // TagResources invokes the ecs.TagResources API synchronously -// api document: https://help.aliyun.com/api/ecs/tagresources.html func (client *Client) TagResources(request *TagResourcesRequest) (response *TagResourcesResponse, err error) { response = CreateTagResourcesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) TagResources(request *TagResourcesRequest) (response *TagR } // TagResourcesWithChan invokes the ecs.TagResources API asynchronously -// api document: https://help.aliyun.com/api/ecs/tagresources.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) TagResourcesWithChan(request *TagResourcesRequest) (<-chan *TagResourcesResponse, <-chan error) { responseChan := make(chan *TagResourcesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) TagResourcesWithChan(request *TagResourcesRequest) (<-chan } // TagResourcesWithCallback invokes the ecs.TagResources API asynchronously -// api document: https://help.aliyun.com/api/ecs/tagresources.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) TagResourcesWithCallback(request *TagResourcesRequest, callback func(response *TagResourcesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -102,6 +97,7 @@ func CreateTagResourcesRequest() (request *TagResourcesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "TagResources", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/terminate_physical_connection.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/terminate_physical_connection.go index f9ea06fc1..31cdc918e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/terminate_physical_connection.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/terminate_physical_connection.go @@ -21,7 +21,6 @@ import ( ) // TerminatePhysicalConnection invokes the ecs.TerminatePhysicalConnection API synchronously -// api document: https://help.aliyun.com/api/ecs/terminatephysicalconnection.html func (client *Client) TerminatePhysicalConnection(request *TerminatePhysicalConnectionRequest) (response *TerminatePhysicalConnectionResponse, err error) { response = CreateTerminatePhysicalConnectionResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) TerminatePhysicalConnection(request *TerminatePhysicalConn } // TerminatePhysicalConnectionWithChan invokes the ecs.TerminatePhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/terminatephysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) TerminatePhysicalConnectionWithChan(request *TerminatePhysicalConnectionRequest) (<-chan *TerminatePhysicalConnectionResponse, <-chan error) { responseChan := make(chan *TerminatePhysicalConnectionResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) TerminatePhysicalConnectionWithChan(request *TerminatePhys } // TerminatePhysicalConnectionWithCallback invokes the ecs.TerminatePhysicalConnection API asynchronously -// api document: https://help.aliyun.com/api/ecs/terminatephysicalconnection.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) TerminatePhysicalConnectionWithCallback(request *TerminatePhysicalConnectionRequest, callback func(response *TerminatePhysicalConnectionResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) TerminatePhysicalConnectionWithCallback(request *Terminate type TerminatePhysicalConnectionRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + PhysicalConnectionId string `position:"Query" name:"PhysicalConnectionId"` } // TerminatePhysicalConnectionResponse is the response struct for api TerminatePhysicalConnection @@ -97,6 +92,7 @@ func CreateTerminatePhysicalConnectionRequest() (request *TerminatePhysicalConne RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "TerminatePhysicalConnection", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/terminate_virtual_border_router.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/terminate_virtual_border_router.go index 51dd360b3..c3dcbea2d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/terminate_virtual_border_router.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/terminate_virtual_border_router.go @@ -21,7 +21,6 @@ import ( ) // TerminateVirtualBorderRouter invokes the ecs.TerminateVirtualBorderRouter API synchronously -// api document: https://help.aliyun.com/api/ecs/terminatevirtualborderrouter.html func (client *Client) TerminateVirtualBorderRouter(request *TerminateVirtualBorderRouterRequest) (response *TerminateVirtualBorderRouterResponse, err error) { response = CreateTerminateVirtualBorderRouterResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) TerminateVirtualBorderRouter(request *TerminateVirtualBord } // TerminateVirtualBorderRouterWithChan invokes the ecs.TerminateVirtualBorderRouter API asynchronously -// api document: https://help.aliyun.com/api/ecs/terminatevirtualborderrouter.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) TerminateVirtualBorderRouterWithChan(request *TerminateVirtualBorderRouterRequest) (<-chan *TerminateVirtualBorderRouterResponse, <-chan error) { responseChan := make(chan *TerminateVirtualBorderRouterResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) TerminateVirtualBorderRouterWithChan(request *TerminateVir } // TerminateVirtualBorderRouterWithCallback invokes the ecs.TerminateVirtualBorderRouter API asynchronously -// api document: https://help.aliyun.com/api/ecs/terminatevirtualborderrouter.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) TerminateVirtualBorderRouterWithCallback(request *TerminateVirtualBorderRouterRequest, callback func(response *TerminateVirtualBorderRouterResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,11 +72,11 @@ func (client *Client) TerminateVirtualBorderRouterWithCallback(request *Terminat type TerminateVirtualBorderRouterRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` - OwnerAccount string `position:"Query" name:"OwnerAccount"` - UserCidr string `position:"Query" name:"UserCidr"` VbrId string `position:"Query" name:"VbrId"` + UserCidr string `position:"Query" name:"UserCidr"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` + OwnerAccount string `position:"Query" name:"OwnerAccount"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` } @@ -97,6 +92,7 @@ func CreateTerminateVirtualBorderRouterRequest() (request *TerminateVirtualBorde RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "TerminateVirtualBorderRouter", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassign_ipv6_addresses.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassign_ipv6_addresses.go index 7f3cdcc36..3b9985c64 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassign_ipv6_addresses.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassign_ipv6_addresses.go @@ -21,7 +21,6 @@ import ( ) // UnassignIpv6Addresses invokes the ecs.UnassignIpv6Addresses API synchronously -// api document: https://help.aliyun.com/api/ecs/unassignipv6addresses.html func (client *Client) UnassignIpv6Addresses(request *UnassignIpv6AddressesRequest) (response *UnassignIpv6AddressesResponse, err error) { response = CreateUnassignIpv6AddressesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) UnassignIpv6Addresses(request *UnassignIpv6AddressesReques } // UnassignIpv6AddressesWithChan invokes the ecs.UnassignIpv6Addresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/unassignipv6addresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnassignIpv6AddressesWithChan(request *UnassignIpv6AddressesRequest) (<-chan *UnassignIpv6AddressesResponse, <-chan error) { responseChan := make(chan *UnassignIpv6AddressesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) UnassignIpv6AddressesWithChan(request *UnassignIpv6Address } // UnassignIpv6AddressesWithCallback invokes the ecs.UnassignIpv6Addresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/unassignipv6addresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnassignIpv6AddressesWithCallback(request *UnassignIpv6AddressesRequest, callback func(response *UnassignIpv6AddressesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateUnassignIpv6AddressesRequest() (request *UnassignIpv6AddressesRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "UnassignIpv6Addresses", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassign_private_ip_addresses.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassign_private_ip_addresses.go index 91f8a10d8..c48e5e538 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassign_private_ip_addresses.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassign_private_ip_addresses.go @@ -21,7 +21,6 @@ import ( ) // UnassignPrivateIpAddresses invokes the ecs.UnassignPrivateIpAddresses API synchronously -// api document: https://help.aliyun.com/api/ecs/unassignprivateipaddresses.html func (client *Client) UnassignPrivateIpAddresses(request *UnassignPrivateIpAddressesRequest) (response *UnassignPrivateIpAddressesResponse, err error) { response = CreateUnassignPrivateIpAddressesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) UnassignPrivateIpAddresses(request *UnassignPrivateIpAddre } // UnassignPrivateIpAddressesWithChan invokes the ecs.UnassignPrivateIpAddresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/unassignprivateipaddresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnassignPrivateIpAddressesWithChan(request *UnassignPrivateIpAddressesRequest) (<-chan *UnassignPrivateIpAddressesResponse, <-chan error) { responseChan := make(chan *UnassignPrivateIpAddressesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) UnassignPrivateIpAddressesWithChan(request *UnassignPrivat } // UnassignPrivateIpAddressesWithCallback invokes the ecs.UnassignPrivateIpAddresses API asynchronously -// api document: https://help.aliyun.com/api/ecs/unassignprivateipaddresses.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnassignPrivateIpAddressesWithCallback(request *UnassignPrivateIpAddressesRequest, callback func(response *UnassignPrivateIpAddressesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -96,6 +91,7 @@ func CreateUnassignPrivateIpAddressesRequest() (request *UnassignPrivateIpAddres RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "UnassignPrivateIpAddresses", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassociate_eip_address.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassociate_eip_address.go index f44a49679..87392c99d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassociate_eip_address.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassociate_eip_address.go @@ -21,7 +21,6 @@ import ( ) // UnassociateEipAddress invokes the ecs.UnassociateEipAddress API synchronously -// api document: https://help.aliyun.com/api/ecs/unassociateeipaddress.html func (client *Client) UnassociateEipAddress(request *UnassociateEipAddressRequest) (response *UnassociateEipAddressResponse, err error) { response = CreateUnassociateEipAddressResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) UnassociateEipAddress(request *UnassociateEipAddressReques } // UnassociateEipAddressWithChan invokes the ecs.UnassociateEipAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/unassociateeipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnassociateEipAddressWithChan(request *UnassociateEipAddressRequest) (<-chan *UnassociateEipAddressResponse, <-chan error) { responseChan := make(chan *UnassociateEipAddressResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) UnassociateEipAddressWithChan(request *UnassociateEipAddre } // UnassociateEipAddressWithCallback invokes the ecs.UnassociateEipAddress API asynchronously -// api document: https://help.aliyun.com/api/ecs/unassociateeipaddress.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnassociateEipAddressWithCallback(request *UnassociateEipAddressRequest, callback func(response *UnassociateEipAddressResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -77,12 +72,12 @@ func (client *Client) UnassociateEipAddressWithCallback(request *UnassociateEipA type UnassociateEipAddressRequest struct { *requests.RpcRequest ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` + AllocationId string `position:"Query" name:"AllocationId"` + InstanceType string `position:"Query" name:"InstanceType"` ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - InstanceType string `position:"Query" name:"InstanceType"` - AllocationId string `position:"Query" name:"AllocationId"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` } // UnassociateEipAddressResponse is the response struct for api UnassociateEipAddress @@ -97,6 +92,7 @@ func CreateUnassociateEipAddressRequest() (request *UnassociateEipAddressRequest RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "UnassociateEipAddress", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassociate_ha_vip.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassociate_ha_vip.go index cffa25abd..7f8216488 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassociate_ha_vip.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/unassociate_ha_vip.go @@ -21,7 +21,6 @@ import ( ) // UnassociateHaVip invokes the ecs.UnassociateHaVip API synchronously -// api document: https://help.aliyun.com/api/ecs/unassociatehavip.html func (client *Client) UnassociateHaVip(request *UnassociateHaVipRequest) (response *UnassociateHaVipResponse, err error) { response = CreateUnassociateHaVipResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) UnassociateHaVip(request *UnassociateHaVipRequest) (respon } // UnassociateHaVipWithChan invokes the ecs.UnassociateHaVip API asynchronously -// api document: https://help.aliyun.com/api/ecs/unassociatehavip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnassociateHaVipWithChan(request *UnassociateHaVipRequest) (<-chan *UnassociateHaVipResponse, <-chan error) { responseChan := make(chan *UnassociateHaVipResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) UnassociateHaVipWithChan(request *UnassociateHaVipRequest) } // UnassociateHaVipWithCallback invokes the ecs.UnassociateHaVip API asynchronously -// api document: https://help.aliyun.com/api/ecs/unassociatehavip.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UnassociateHaVipWithCallback(request *UnassociateHaVipRequest, callback func(response *UnassociateHaVipResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -76,14 +71,14 @@ func (client *Client) UnassociateHaVipWithCallback(request *UnassociateHaVipRequ // UnassociateHaVipRequest is the request struct for api UnassociateHaVip type UnassociateHaVipRequest struct { *requests.RpcRequest - HaVipId string `position:"Query" name:"HaVipId"` ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"` - InstanceId string `position:"Query" name:"InstanceId"` - ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` ClientToken string `position:"Query" name:"ClientToken"` + HaVipId string `position:"Query" name:"HaVipId"` + ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"` OwnerAccount string `position:"Query" name:"OwnerAccount"` - Force string `position:"Query" name:"Force"` OwnerId requests.Integer `position:"Query" name:"OwnerId"` + InstanceId string `position:"Query" name:"InstanceId"` + Force string `position:"Query" name:"Force"` } // UnassociateHaVipResponse is the response struct for api UnassociateHaVip @@ -98,6 +93,7 @@ func CreateUnassociateHaVipRequest() (request *UnassociateHaVipRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "UnassociateHaVip", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/untag_resources.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/untag_resources.go index 3c83f26b7..7daf4c3b1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/untag_resources.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ecs/untag_resources.go @@ -21,7 +21,6 @@ import ( ) // UntagResources invokes the ecs.UntagResources API synchronously -// api document: https://help.aliyun.com/api/ecs/untagresources.html func (client *Client) UntagResources(request *UntagResourcesRequest) (response *UntagResourcesResponse, err error) { response = CreateUntagResourcesResponse() err = client.DoAction(request, response) @@ -29,8 +28,6 @@ func (client *Client) UntagResources(request *UntagResourcesRequest) (response * } // UntagResourcesWithChan invokes the ecs.UntagResources API asynchronously -// api document: https://help.aliyun.com/api/ecs/untagresources.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UntagResourcesWithChan(request *UntagResourcesRequest) (<-chan *UntagResourcesResponse, <-chan error) { responseChan := make(chan *UntagResourcesResponse, 1) errChan := make(chan error, 1) @@ -53,8 +50,6 @@ func (client *Client) UntagResourcesWithChan(request *UntagResourcesRequest) (<- } // UntagResourcesWithCallback invokes the ecs.UntagResources API asynchronously -// api document: https://help.aliyun.com/api/ecs/untagresources.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html func (client *Client) UntagResourcesWithCallback(request *UntagResourcesRequest, callback func(response *UntagResourcesResponse, err error)) <-chan int { result := make(chan int, 1) err := client.AddAsyncTask(func() { @@ -98,6 +93,7 @@ func CreateUntagResourcesRequest() (request *UntagResourcesRequest) { RpcRequest: &requests.RpcRequest{}, } request.InitWithApiInfo("Ecs", "2014-05-26", "UntagResources", "ecs", "openAPI") + request.Method = requests.POST return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/add_user_to_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/add_user_to_group.go index a678e28ad..1cde5e58c 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/add_user_to_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/add_user_to_group.go @@ -91,7 +91,7 @@ func CreateAddUserToGroupRequest() (request *AddUserToGroupRequest) { request = &AddUserToGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "AddUserToGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "AddUserToGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_group.go index 455b25ff3..e8cb8b3f1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_group.go @@ -77,8 +77,8 @@ func (client *Client) AttachPolicyToGroupWithCallback(request *AttachPolicyToGro type AttachPolicyToGroupRequest struct { *requests.RpcRequest PolicyType string `position:"Query" name:"PolicyType"` - PolicyName string `position:"Query" name:"PolicyName"` GroupName string `position:"Query" name:"GroupName"` + PolicyName string `position:"Query" name:"PolicyName"` } // AttachPolicyToGroupResponse is the response struct for api AttachPolicyToGroup @@ -92,7 +92,7 @@ func CreateAttachPolicyToGroupRequest() (request *AttachPolicyToGroupRequest) { request = &AttachPolicyToGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_role.go index 0fc99bafd..a682b9f09 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_role.go @@ -92,7 +92,7 @@ func CreateAttachPolicyToRoleRequest() (request *AttachPolicyToRoleRequest) { request = &AttachPolicyToRoleRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToRole", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToRole", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_user.go index eec42ad1a..e0af9a48f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/attach_policy_to_user.go @@ -92,7 +92,7 @@ func CreateAttachPolicyToUserRequest() (request *AttachPolicyToUserRequest) { request = &AttachPolicyToUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToUser", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToUser", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/bind_mfa_device.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/bind_mfa_device.go index 2256e087e..0ba294869 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/bind_mfa_device.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/bind_mfa_device.go @@ -93,7 +93,7 @@ func CreateBindMFADeviceRequest() (request *BindMFADeviceRequest) { request = &BindMFADeviceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "BindMFADevice", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "BindMFADevice", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/change_password.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/change_password.go index edda89480..72b755fc4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/change_password.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/change_password.go @@ -91,7 +91,7 @@ func CreateChangePasswordRequest() (request *ChangePasswordRequest) { request = &ChangePasswordRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ChangePassword", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ChangePassword", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/clear_account_alias.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/clear_account_alias.go index 92d9b594d..44455ec51 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/clear_account_alias.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/clear_account_alias.go @@ -89,7 +89,7 @@ func CreateClearAccountAliasRequest() (request *ClearAccountAliasRequest) { request = &ClearAccountAliasRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ClearAccountAlias", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ClearAccountAlias", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/client.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/client.go index a277007a4..4ae36a031 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/client.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/client.go @@ -16,8 +16,11 @@ package ram // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "reflect" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk" "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider" ) // Client is the sdk client struct, each func corresponds to an OpenAPI @@ -25,10 +28,40 @@ type Client struct { sdk.Client } +// SetClientProperty Set Property by Reflect +func SetClientProperty(client *Client, propertyName string, propertyValue interface{}) { + v := reflect.ValueOf(client).Elem() + if v.FieldByName(propertyName).IsValid() && v.FieldByName(propertyName).CanSet() { + v.FieldByName(propertyName).Set(reflect.ValueOf(propertyValue)) + } +} + +// SetEndpointDataToClient Set EndpointMap and ENdpointType +func SetEndpointDataToClient(client *Client) { + SetClientProperty(client, "EndpointMap", GetEndpointMap()) + SetClientProperty(client, "EndpointType", GetEndpointType()) +} + // NewClient creates a sdk client with environment variables func NewClient() (client *Client, err error) { client = &Client{} err = client.Init() + SetEndpointDataToClient(client) + return +} + +// NewClientWithProvider creates a sdk client with providers +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) { + client = &Client{} + var pc provider.Provider + if len(providers) == 0 { + pc = provider.DefaultChain + } else { + pc = provider.NewProviderChain(providers) + } + err = client.InitWithProviderChain(regionId, pc) + SetEndpointDataToClient(client) return } @@ -37,45 +70,60 @@ func NewClient() (client *Client, err error) { func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) { client = &Client{} err = client.InitWithOptions(regionId, config, credential) + SetEndpointDataToClient(client) return } // NewClientWithAccessKey is a shortcut to create sdk client with accesskey -// usage: https://help.aliyun.com/document_detail/66217.html +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) { client = &Client{} err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret) + SetEndpointDataToClient(client) return } // NewClientWithStsToken is a shortcut to create sdk client with sts token -// usage: https://help.aliyun.com/document_detail/66222.html +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) { client = &Client{} err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken) + SetEndpointDataToClient(client) return } // NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn -// usage: https://help.aliyun.com/document_detail/66222.html +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) { client = &Client{} err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName) + SetEndpointDataToClient(client) + return +} + +// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) { + client = &Client{} + err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy) + SetEndpointDataToClient(client) return } // NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role -// usage: https://help.aliyun.com/document_detail/66223.html +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) { client = &Client{} err = client.InitWithEcsRamRole(regionId, roleName) + SetEndpointDataToClient(client) return } // NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair -// attention: rsa key pair auth is only Japan regions available +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) { client = &Client{} err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration) + SetEndpointDataToClient(client) return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_access_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_access_key.go index bc93204d4..10619e37f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_access_key.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_access_key.go @@ -82,8 +82,8 @@ type CreateAccessKeyRequest struct { // CreateAccessKeyResponse is the response struct for api CreateAccessKey type CreateAccessKeyResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - AccessKey AccessKey `json:"AccessKey" xml:"AccessKey"` + RequestId string `json:"RequestId" xml:"RequestId"` + AccessKey AccessKeyInCreateAccessKey `json:"AccessKey" xml:"AccessKey"` } // CreateCreateAccessKeyRequest creates a request to invoke CreateAccessKey API @@ -91,7 +91,7 @@ func CreateCreateAccessKeyRequest() (request *CreateAccessKeyRequest) { request = &CreateAccessKeyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "CreateAccessKey", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "CreateAccessKey", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_group.go index b2c386fca..e7ad2eaa5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_group.go @@ -83,8 +83,8 @@ type CreateGroupRequest struct { // CreateGroupResponse is the response struct for api CreateGroup type CreateGroupResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Group Group `json:"Group" xml:"Group"` + RequestId string `json:"RequestId" xml:"RequestId"` + Group GroupInCreateGroup `json:"Group" xml:"Group"` } // CreateCreateGroupRequest creates a request to invoke CreateGroup API @@ -92,7 +92,7 @@ func CreateCreateGroupRequest() (request *CreateGroupRequest) { request = &CreateGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "CreateGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "CreateGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_login_profile.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_login_profile.go index 2c521b606..baff7bbce 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_login_profile.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_login_profile.go @@ -76,8 +76,8 @@ func (client *Client) CreateLoginProfileWithCallback(request *CreateLoginProfile // CreateLoginProfileRequest is the request struct for api CreateLoginProfile type CreateLoginProfileRequest struct { *requests.RpcRequest - Password string `position:"Query" name:"Password"` PasswordResetRequired requests.Boolean `position:"Query" name:"PasswordResetRequired"` + Password string `position:"Query" name:"Password"` MFABindRequired requests.Boolean `position:"Query" name:"MFABindRequired"` UserName string `position:"Query" name:"UserName"` } @@ -85,8 +85,8 @@ type CreateLoginProfileRequest struct { // CreateLoginProfileResponse is the response struct for api CreateLoginProfile type CreateLoginProfileResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - LoginProfile LoginProfile `json:"LoginProfile" xml:"LoginProfile"` + RequestId string `json:"RequestId" xml:"RequestId"` + LoginProfile LoginProfileInCreateLoginProfile `json:"LoginProfile" xml:"LoginProfile"` } // CreateCreateLoginProfileRequest creates a request to invoke CreateLoginProfile API @@ -94,7 +94,7 @@ func CreateCreateLoginProfileRequest() (request *CreateLoginProfileRequest) { request = &CreateLoginProfileRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "CreateLoginProfile", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "CreateLoginProfile", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_policy.go index c4d7de8a1..cbd479c7a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_policy.go @@ -84,8 +84,8 @@ type CreatePolicyRequest struct { // CreatePolicyResponse is the response struct for api CreatePolicy type CreatePolicyResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Policy Policy `json:"Policy" xml:"Policy"` + RequestId string `json:"RequestId" xml:"RequestId"` + Policy PolicyInCreatePolicy `json:"Policy" xml:"Policy"` } // CreateCreatePolicyRequest creates a request to invoke CreatePolicy API @@ -93,7 +93,7 @@ func CreateCreatePolicyRequest() (request *CreatePolicyRequest) { request = &CreatePolicyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "CreatePolicy", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "CreatePolicy", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_policy_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_policy_version.go index 80ea9f0be..1c630e235 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_policy_version.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_policy_version.go @@ -79,13 +79,14 @@ type CreatePolicyVersionRequest struct { SetAsDefault requests.Boolean `position:"Query" name:"SetAsDefault"` PolicyName string `position:"Query" name:"PolicyName"` PolicyDocument string `position:"Query" name:"PolicyDocument"` + RotateStrategy string `position:"Query" name:"RotateStrategy"` } // CreatePolicyVersionResponse is the response struct for api CreatePolicyVersion type CreatePolicyVersionResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - PolicyVersion PolicyVersion `json:"PolicyVersion" xml:"PolicyVersion"` + RequestId string `json:"RequestId" xml:"RequestId"` + PolicyVersion PolicyVersionInCreatePolicyVersion `json:"PolicyVersion" xml:"PolicyVersion"` } // CreateCreatePolicyVersionRequest creates a request to invoke CreatePolicyVersion API @@ -93,7 +94,7 @@ func CreateCreatePolicyVersionRequest() (request *CreatePolicyVersionRequest) { request = &CreatePolicyVersionRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "CreatePolicyVersion", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "CreatePolicyVersion", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_role.go index e00b3e222..d77b8f605 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_role.go @@ -76,16 +76,17 @@ func (client *Client) CreateRoleWithCallback(request *CreateRoleRequest, callbac // CreateRoleRequest is the request struct for api CreateRole type CreateRoleRequest struct { *requests.RpcRequest - RoleName string `position:"Query" name:"RoleName"` - Description string `position:"Query" name:"Description"` - AssumeRolePolicyDocument string `position:"Query" name:"AssumeRolePolicyDocument"` + MaxSessionDuration requests.Integer `position:"Query" name:"MaxSessionDuration"` + RoleName string `position:"Query" name:"RoleName"` + Description string `position:"Query" name:"Description"` + AssumeRolePolicyDocument string `position:"Query" name:"AssumeRolePolicyDocument"` } // CreateRoleResponse is the response struct for api CreateRole type CreateRoleResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Role Role `json:"Role" xml:"Role"` + RequestId string `json:"RequestId" xml:"RequestId"` + Role RoleInCreateRole `json:"Role" xml:"Role"` } // CreateCreateRoleRequest creates a request to invoke CreateRole API @@ -93,7 +94,7 @@ func CreateCreateRoleRequest() (request *CreateRoleRequest) { request = &CreateRoleRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "CreateRole", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "CreateRole", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_user.go index e020b3112..508e2a315 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_user.go @@ -76,18 +76,18 @@ func (client *Client) CreateUserWithCallback(request *CreateUserRequest, callbac // CreateUserRequest is the request struct for api CreateUser type CreateUserRequest struct { *requests.RpcRequest - Comments string `position:"Query" name:"Comments"` - DisplayName string `position:"Query" name:"DisplayName"` MobilePhone string `position:"Query" name:"MobilePhone"` Email string `position:"Query" name:"Email"` + Comments string `position:"Query" name:"Comments"` + DisplayName string `position:"Query" name:"DisplayName"` UserName string `position:"Query" name:"UserName"` } // CreateUserResponse is the response struct for api CreateUser type CreateUserResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - User User `json:"User" xml:"User"` + RequestId string `json:"RequestId" xml:"RequestId"` + User UserInCreateUser `json:"User" xml:"User"` } // CreateCreateUserRequest creates a request to invoke CreateUser API @@ -95,7 +95,7 @@ func CreateCreateUserRequest() (request *CreateUserRequest) { request = &CreateUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "CreateUser", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "CreateUser", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_virtual_mfa_device.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_virtual_mfa_device.go index 473d99c39..d57257d48 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_virtual_mfa_device.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/create_virtual_mfa_device.go @@ -82,8 +82,8 @@ type CreateVirtualMFADeviceRequest struct { // CreateVirtualMFADeviceResponse is the response struct for api CreateVirtualMFADevice type CreateVirtualMFADeviceResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - VirtualMFADevice VirtualMFADevice `json:"VirtualMFADevice" xml:"VirtualMFADevice"` + RequestId string `json:"RequestId" xml:"RequestId"` + VirtualMFADevice VirtualMFADeviceInCreateVirtualMFADevice `json:"VirtualMFADevice" xml:"VirtualMFADevice"` } // CreateCreateVirtualMFADeviceRequest creates a request to invoke CreateVirtualMFADevice API @@ -91,7 +91,7 @@ func CreateCreateVirtualMFADeviceRequest() (request *CreateVirtualMFADeviceReque request = &CreateVirtualMFADeviceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "CreateVirtualMFADevice", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "CreateVirtualMFADevice", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_access_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_access_key.go index 86aebc6aa..ec8039c27 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_access_key.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_access_key.go @@ -91,7 +91,7 @@ func CreateDeleteAccessKeyRequest() (request *DeleteAccessKeyRequest) { request = &DeleteAccessKeyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DeleteAccessKey", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DeleteAccessKey", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_group.go index 08d69c546..2b56c870d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_group.go @@ -90,7 +90,7 @@ func CreateDeleteGroupRequest() (request *DeleteGroupRequest) { request = &DeleteGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DeleteGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DeleteGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_login_profile.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_login_profile.go index abc516956..347858239 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_login_profile.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_login_profile.go @@ -90,7 +90,7 @@ func CreateDeleteLoginProfileRequest() (request *DeleteLoginProfileRequest) { request = &DeleteLoginProfileRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DeleteLoginProfile", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DeleteLoginProfile", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_policy.go index a5952d59c..508bc411c 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_policy.go @@ -90,7 +90,7 @@ func CreateDeletePolicyRequest() (request *DeletePolicyRequest) { request = &DeletePolicyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DeletePolicy", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DeletePolicy", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_policy_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_policy_version.go index 937073169..7c41a781f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_policy_version.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_policy_version.go @@ -91,7 +91,7 @@ func CreateDeletePolicyVersionRequest() (request *DeletePolicyVersionRequest) { request = &DeletePolicyVersionRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DeletePolicyVersion", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DeletePolicyVersion", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_public_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_public_key.go deleted file mode 100644 index d9948bd58..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_public_key.go +++ /dev/null @@ -1,104 +0,0 @@ -package ram - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" -) - -// DeletePublicKey invokes the ram.DeletePublicKey API synchronously -// api document: https://help.aliyun.com/api/ram/deletepublickey.html -func (client *Client) DeletePublicKey(request *DeletePublicKeyRequest) (response *DeletePublicKeyResponse, err error) { - response = CreateDeletePublicKeyResponse() - err = client.DoAction(request, response) - return -} - -// DeletePublicKeyWithChan invokes the ram.DeletePublicKey API asynchronously -// api document: https://help.aliyun.com/api/ram/deletepublickey.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DeletePublicKeyWithChan(request *DeletePublicKeyRequest) (<-chan *DeletePublicKeyResponse, <-chan error) { - responseChan := make(chan *DeletePublicKeyResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DeletePublicKey(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// DeletePublicKeyWithCallback invokes the ram.DeletePublicKey API asynchronously -// api document: https://help.aliyun.com/api/ram/deletepublickey.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) DeletePublicKeyWithCallback(request *DeletePublicKeyRequest, callback func(response *DeletePublicKeyResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DeletePublicKeyResponse - var err error - defer close(result) - response, err = client.DeletePublicKey(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// DeletePublicKeyRequest is the request struct for api DeletePublicKey -type DeletePublicKeyRequest struct { - *requests.RpcRequest - UserPublicKeyId string `position:"Query" name:"UserPublicKeyId"` - UserName string `position:"Query" name:"UserName"` -} - -// DeletePublicKeyResponse is the response struct for api DeletePublicKey -type DeletePublicKeyResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` -} - -// CreateDeletePublicKeyRequest creates a request to invoke DeletePublicKey API -func CreateDeletePublicKeyRequest() (request *DeletePublicKeyRequest) { - request = &DeletePublicKeyRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ram", "2015-05-01", "DeletePublicKey", "ram", "openAPI") - return -} - -// CreateDeletePublicKeyResponse creates a response to parse from DeletePublicKey response -func CreateDeletePublicKeyResponse() (response *DeletePublicKeyResponse) { - response = &DeletePublicKeyResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_role.go index b7bc98505..8882268ab 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_role.go @@ -90,7 +90,7 @@ func CreateDeleteRoleRequest() (request *DeleteRoleRequest) { request = &DeleteRoleRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DeleteRole", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DeleteRole", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_user.go index 218064326..57ea786f9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_user.go @@ -90,7 +90,7 @@ func CreateDeleteUserRequest() (request *DeleteUserRequest) { request = &DeleteUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DeleteUser", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DeleteUser", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_virtual_mfa_device.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_virtual_mfa_device.go index de292703c..16fdd22ba 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_virtual_mfa_device.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/delete_virtual_mfa_device.go @@ -90,7 +90,7 @@ func CreateDeleteVirtualMFADeviceRequest() (request *DeleteVirtualMFADeviceReque request = &DeleteVirtualMFADeviceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DeleteVirtualMFADevice", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DeleteVirtualMFADevice", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_group.go index 89f2fca74..56ec09c1a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_group.go @@ -77,8 +77,8 @@ func (client *Client) DetachPolicyFromGroupWithCallback(request *DetachPolicyFro type DetachPolicyFromGroupRequest struct { *requests.RpcRequest PolicyType string `position:"Query" name:"PolicyType"` - PolicyName string `position:"Query" name:"PolicyName"` GroupName string `position:"Query" name:"GroupName"` + PolicyName string `position:"Query" name:"PolicyName"` } // DetachPolicyFromGroupResponse is the response struct for api DetachPolicyFromGroup @@ -92,7 +92,7 @@ func CreateDetachPolicyFromGroupRequest() (request *DetachPolicyFromGroupRequest request = &DetachPolicyFromGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_role.go index d7041202b..798a5a69e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_role.go @@ -92,7 +92,7 @@ func CreateDetachPolicyFromRoleRequest() (request *DetachPolicyFromRoleRequest) request = &DetachPolicyFromRoleRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromRole", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromRole", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_user.go index 22388f34e..3b3fd7582 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/detach_policy_from_user.go @@ -92,7 +92,7 @@ func CreateDetachPolicyFromUserRequest() (request *DetachPolicyFromUserRequest) request = &DetachPolicyFromUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromUser", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromUser", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/endpoint.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/endpoint.go new file mode 100644 index 000000000..1cdf483ef --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/endpoint.go @@ -0,0 +1,20 @@ +package ram + +// EndpointMap Endpoint Data +var EndpointMap map[string]string + +// EndpointType regional or central +var EndpointType = "central" + +// GetEndpointMap Get Endpoint Data Map +func GetEndpointMap() map[string]string { + if EndpointMap == nil { + EndpointMap = map[string]string{} + } + return EndpointMap +} + +// GetEndpointType Get Endpoint Type Value +func GetEndpointType() string { + return EndpointType +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_access_key_last_used.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_access_key_last_used.go index 61f187fb7..54dc78a9b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_access_key_last_used.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_access_key_last_used.go @@ -92,7 +92,7 @@ func CreateGetAccessKeyLastUsedRequest() (request *GetAccessKeyLastUsedRequest) request = &GetAccessKeyLastUsedRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetAccessKeyLastUsed", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetAccessKeyLastUsed", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_account_alias.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_account_alias.go index 30c36847a..5f2ebeb13 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_account_alias.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_account_alias.go @@ -90,7 +90,7 @@ func CreateGetAccountAliasRequest() (request *GetAccountAliasRequest) { request = &GetAccountAliasRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetAccountAlias", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetAccountAlias", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_group.go index 9ba716042..b473a352b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_group.go @@ -82,8 +82,8 @@ type GetGroupRequest struct { // GetGroupResponse is the response struct for api GetGroup type GetGroupResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Group Group `json:"Group" xml:"Group"` + RequestId string `json:"RequestId" xml:"RequestId"` + Group GroupInGetGroup `json:"Group" xml:"Group"` } // CreateGetGroupRequest creates a request to invoke GetGroup API @@ -91,7 +91,7 @@ func CreateGetGroupRequest() (request *GetGroupRequest) { request = &GetGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_login_profile.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_login_profile.go index f258dd5be..223f667a4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_login_profile.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_login_profile.go @@ -82,8 +82,8 @@ type GetLoginProfileRequest struct { // GetLoginProfileResponse is the response struct for api GetLoginProfile type GetLoginProfileResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - LoginProfile LoginProfile `json:"LoginProfile" xml:"LoginProfile"` + RequestId string `json:"RequestId" xml:"RequestId"` + LoginProfile LoginProfileInGetLoginProfile `json:"LoginProfile" xml:"LoginProfile"` } // CreateGetLoginProfileRequest creates a request to invoke GetLoginProfile API @@ -91,7 +91,7 @@ func CreateGetLoginProfileRequest() (request *GetLoginProfileRequest) { request = &GetLoginProfileRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetLoginProfile", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetLoginProfile", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_password_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_password_policy.go index b7b0e0658..4574a3293 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_password_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_password_policy.go @@ -81,8 +81,8 @@ type GetPasswordPolicyRequest struct { // GetPasswordPolicyResponse is the response struct for api GetPasswordPolicy type GetPasswordPolicyResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - PasswordPolicy PasswordPolicy `json:"PasswordPolicy" xml:"PasswordPolicy"` + RequestId string `json:"RequestId" xml:"RequestId"` + PasswordPolicy PasswordPolicyInGetPasswordPolicy `json:"PasswordPolicy" xml:"PasswordPolicy"` } // CreateGetPasswordPolicyRequest creates a request to invoke GetPasswordPolicy API @@ -90,7 +90,7 @@ func CreateGetPasswordPolicyRequest() (request *GetPasswordPolicyRequest) { request = &GetPasswordPolicyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetPasswordPolicy", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetPasswordPolicy", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_policy.go index 7b193e6ad..fe343f9e1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_policy.go @@ -83,8 +83,9 @@ type GetPolicyRequest struct { // GetPolicyResponse is the response struct for api GetPolicy type GetPolicyResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Policy Policy `json:"Policy" xml:"Policy"` + RequestId string `json:"RequestId" xml:"RequestId"` + Policy PolicyInGetPolicy `json:"Policy" xml:"Policy"` + DefaultPolicyVersion DefaultPolicyVersion `json:"DefaultPolicyVersion" xml:"DefaultPolicyVersion"` } // CreateGetPolicyRequest creates a request to invoke GetPolicy API @@ -92,7 +93,7 @@ func CreateGetPolicyRequest() (request *GetPolicyRequest) { request = &GetPolicyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetPolicy", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetPolicy", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_policy_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_policy_version.go index 6cf49b0bd..cd3a9033e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_policy_version.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_policy_version.go @@ -76,16 +76,16 @@ func (client *Client) GetPolicyVersionWithCallback(request *GetPolicyVersionRequ // GetPolicyVersionRequest is the request struct for api GetPolicyVersion type GetPolicyVersionRequest struct { *requests.RpcRequest - VersionId string `position:"Query" name:"VersionId"` PolicyType string `position:"Query" name:"PolicyType"` + VersionId string `position:"Query" name:"VersionId"` PolicyName string `position:"Query" name:"PolicyName"` } // GetPolicyVersionResponse is the response struct for api GetPolicyVersion type GetPolicyVersionResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - PolicyVersion PolicyVersion `json:"PolicyVersion" xml:"PolicyVersion"` + RequestId string `json:"RequestId" xml:"RequestId"` + PolicyVersion PolicyVersionInGetPolicyVersion `json:"PolicyVersion" xml:"PolicyVersion"` } // CreateGetPolicyVersionRequest creates a request to invoke GetPolicyVersion API @@ -93,7 +93,7 @@ func CreateGetPolicyVersionRequest() (request *GetPolicyVersionRequest) { request = &GetPolicyVersionRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetPolicyVersion", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetPolicyVersion", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_public_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_public_key.go deleted file mode 100644 index dec0d692b..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_public_key.go +++ /dev/null @@ -1,105 +0,0 @@ -package ram - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" -) - -// GetPublicKey invokes the ram.GetPublicKey API synchronously -// api document: https://help.aliyun.com/api/ram/getpublickey.html -func (client *Client) GetPublicKey(request *GetPublicKeyRequest) (response *GetPublicKeyResponse, err error) { - response = CreateGetPublicKeyResponse() - err = client.DoAction(request, response) - return -} - -// GetPublicKeyWithChan invokes the ram.GetPublicKey API asynchronously -// api document: https://help.aliyun.com/api/ram/getpublickey.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) GetPublicKeyWithChan(request *GetPublicKeyRequest) (<-chan *GetPublicKeyResponse, <-chan error) { - responseChan := make(chan *GetPublicKeyResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.GetPublicKey(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// GetPublicKeyWithCallback invokes the ram.GetPublicKey API asynchronously -// api document: https://help.aliyun.com/api/ram/getpublickey.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) GetPublicKeyWithCallback(request *GetPublicKeyRequest, callback func(response *GetPublicKeyResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *GetPublicKeyResponse - var err error - defer close(result) - response, err = client.GetPublicKey(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// GetPublicKeyRequest is the request struct for api GetPublicKey -type GetPublicKeyRequest struct { - *requests.RpcRequest - UserPublicKeyId string `position:"Query" name:"UserPublicKeyId"` - UserName string `position:"Query" name:"UserName"` -} - -// GetPublicKeyResponse is the response struct for api GetPublicKey -type GetPublicKeyResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - PublicKey PublicKey `json:"PublicKey" xml:"PublicKey"` -} - -// CreateGetPublicKeyRequest creates a request to invoke GetPublicKey API -func CreateGetPublicKeyRequest() (request *GetPublicKeyRequest) { - request = &GetPublicKeyRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ram", "2015-05-01", "GetPublicKey", "ram", "openAPI") - return -} - -// CreateGetPublicKeyResponse creates a response to parse from GetPublicKey response -func CreateGetPublicKeyResponse() (response *GetPublicKeyResponse) { - response = &GetPublicKeyResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_role.go index 62f998abd..5014f6f18 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_role.go @@ -82,8 +82,8 @@ type GetRoleRequest struct { // GetRoleResponse is the response struct for api GetRole type GetRoleResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Role Role `json:"Role" xml:"Role"` + RequestId string `json:"RequestId" xml:"RequestId"` + Role RoleInGetRole `json:"Role" xml:"Role"` } // CreateGetRoleRequest creates a request to invoke GetRole API @@ -91,7 +91,7 @@ func CreateGetRoleRequest() (request *GetRoleRequest) { request = &GetRoleRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetRole", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetRole", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_security_preference.go index f3a3d18d1..48f591783 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_security_preference.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_security_preference.go @@ -81,8 +81,8 @@ type GetSecurityPreferenceRequest struct { // GetSecurityPreferenceResponse is the response struct for api GetSecurityPreference type GetSecurityPreferenceResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - SecurityPreference SecurityPreference `json:"SecurityPreference" xml:"SecurityPreference"` + RequestId string `json:"RequestId" xml:"RequestId"` + SecurityPreference SecurityPreferenceInGetSecurityPreference `json:"SecurityPreference" xml:"SecurityPreference"` } // CreateGetSecurityPreferenceRequest creates a request to invoke GetSecurityPreference API @@ -90,7 +90,7 @@ func CreateGetSecurityPreferenceRequest() (request *GetSecurityPreferenceRequest request = &GetSecurityPreferenceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetSecurityPreference", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetSecurityPreference", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_user.go index f38eb9e25..0bc34ae4d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_user.go @@ -82,8 +82,8 @@ type GetUserRequest struct { // GetUserResponse is the response struct for api GetUser type GetUserResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - User User `json:"User" xml:"User"` + RequestId string `json:"RequestId" xml:"RequestId"` + User UserInGetUser `json:"User" xml:"User"` } // CreateGetUserRequest creates a request to invoke GetUser API @@ -91,7 +91,7 @@ func CreateGetUserRequest() (request *GetUserRequest) { request = &GetUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetUser", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetUser", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_user_mfa_info.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_user_mfa_info.go index f09ab63f0..5fb5b7e6d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_user_mfa_info.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/get_user_mfa_info.go @@ -82,8 +82,8 @@ type GetUserMFAInfoRequest struct { // GetUserMFAInfoResponse is the response struct for api GetUserMFAInfo type GetUserMFAInfoResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - MFADevice MFADevice `json:"MFADevice" xml:"MFADevice"` + RequestId string `json:"RequestId" xml:"RequestId"` + MFADevice MFADeviceInGetUserMFAInfo `json:"MFADevice" xml:"MFADevice"` } // CreateGetUserMFAInfoRequest creates a request to invoke GetUserMFAInfo API @@ -91,7 +91,7 @@ func CreateGetUserMFAInfoRequest() (request *GetUserMFAInfoRequest) { request = &GetUserMFAInfoRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "GetUserMFAInfo", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "GetUserMFAInfo", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_access_keys.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_access_keys.go index 648d826ea..3bc971d7e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_access_keys.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_access_keys.go @@ -91,7 +91,7 @@ func CreateListAccessKeysRequest() (request *ListAccessKeysRequest) { request = &ListAccessKeysRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListAccessKeys", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListAccessKeys", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_entities_for_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_entities_for_policy.go index 8586884f8..6abf4cd9b 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_entities_for_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_entities_for_policy.go @@ -94,7 +94,7 @@ func CreateListEntitiesForPolicyRequest() (request *ListEntitiesForPolicyRequest request = &ListEntitiesForPolicyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListEntitiesForPolicy", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListEntitiesForPolicy", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_groups.go index 8719ce0e7..5b5a5f63f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_groups.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_groups.go @@ -94,7 +94,7 @@ func CreateListGroupsRequest() (request *ListGroupsRequest) { request = &ListGroupsRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListGroups", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListGroups", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_groups_for_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_groups_for_user.go index d529b60ab..50e640887 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_groups_for_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_groups_for_user.go @@ -91,7 +91,7 @@ func CreateListGroupsForUserRequest() (request *ListGroupsForUserRequest) { request = &ListGroupsForUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListGroupsForUser", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListGroupsForUser", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies.go index 2d567153e..cc4e12bd3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies.go @@ -95,7 +95,7 @@ func CreateListPoliciesRequest() (request *ListPoliciesRequest) { request = &ListPoliciesRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListPolicies", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListPolicies", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_group.go index b6903638a..0ea6cf69d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_group.go @@ -91,7 +91,7 @@ func CreateListPoliciesForGroupRequest() (request *ListPoliciesForGroupRequest) request = &ListPoliciesForGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_role.go index 689f7a944..7888bc74f 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_role.go @@ -91,7 +91,7 @@ func CreateListPoliciesForRoleRequest() (request *ListPoliciesForRoleRequest) { request = &ListPoliciesForRoleRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForRole", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForRole", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_user.go index 653a414c4..74ba7b244 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policies_for_user.go @@ -91,7 +91,7 @@ func CreateListPoliciesForUserRequest() (request *ListPoliciesForUserRequest) { request = &ListPoliciesForUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForUser", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForUser", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policy_versions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policy_versions.go index 7c4c5728c..626bf18d1 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policy_versions.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_policy_versions.go @@ -92,7 +92,7 @@ func CreateListPolicyVersionsRequest() (request *ListPolicyVersionsRequest) { request = &ListPolicyVersionsRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListPolicyVersions", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListPolicyVersions", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_public_keys.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_public_keys.go deleted file mode 100644 index e50be56a6..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_public_keys.go +++ /dev/null @@ -1,104 +0,0 @@ -package ram - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" -) - -// ListPublicKeys invokes the ram.ListPublicKeys API synchronously -// api document: https://help.aliyun.com/api/ram/listpublickeys.html -func (client *Client) ListPublicKeys(request *ListPublicKeysRequest) (response *ListPublicKeysResponse, err error) { - response = CreateListPublicKeysResponse() - err = client.DoAction(request, response) - return -} - -// ListPublicKeysWithChan invokes the ram.ListPublicKeys API asynchronously -// api document: https://help.aliyun.com/api/ram/listpublickeys.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) ListPublicKeysWithChan(request *ListPublicKeysRequest) (<-chan *ListPublicKeysResponse, <-chan error) { - responseChan := make(chan *ListPublicKeysResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.ListPublicKeys(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// ListPublicKeysWithCallback invokes the ram.ListPublicKeys API asynchronously -// api document: https://help.aliyun.com/api/ram/listpublickeys.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) ListPublicKeysWithCallback(request *ListPublicKeysRequest, callback func(response *ListPublicKeysResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *ListPublicKeysResponse - var err error - defer close(result) - response, err = client.ListPublicKeys(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// ListPublicKeysRequest is the request struct for api ListPublicKeys -type ListPublicKeysRequest struct { - *requests.RpcRequest - UserName string `position:"Query" name:"UserName"` -} - -// ListPublicKeysResponse is the response struct for api ListPublicKeys -type ListPublicKeysResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - PublicKeys PublicKeys `json:"PublicKeys" xml:"PublicKeys"` -} - -// CreateListPublicKeysRequest creates a request to invoke ListPublicKeys API -func CreateListPublicKeysRequest() (request *ListPublicKeysRequest) { - request = &ListPublicKeysRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ram", "2015-05-01", "ListPublicKeys", "ram", "openAPI") - return -} - -// CreateListPublicKeysResponse creates a response to parse from ListPublicKeys response -func CreateListPublicKeysResponse() (response *ListPublicKeysResponse) { - response = &ListPublicKeysResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_roles.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_roles.go index 15412ba2f..01f9652c0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_roles.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_roles.go @@ -94,7 +94,7 @@ func CreateListRolesRequest() (request *ListRolesRequest) { request = &ListRolesRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListRoles", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListRoles", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_users.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_users.go index 3b5e187d0..6ad3c67b4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_users.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_users.go @@ -94,7 +94,7 @@ func CreateListUsersRequest() (request *ListUsersRequest) { request = &ListUsersRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListUsers", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListUsers", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_users_for_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_users_for_group.go index 2caa5ac4d..a3c2969a9 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_users_for_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_users_for_group.go @@ -76,9 +76,9 @@ func (client *Client) ListUsersForGroupWithCallback(request *ListUsersForGroupRe // ListUsersForGroupRequest is the request struct for api ListUsersForGroup type ListUsersForGroupRequest struct { *requests.RpcRequest + GroupName string `position:"Query" name:"GroupName"` Marker string `position:"Query" name:"Marker"` MaxItems requests.Integer `position:"Query" name:"MaxItems"` - GroupName string `position:"Query" name:"GroupName"` } // ListUsersForGroupResponse is the response struct for api ListUsersForGroup @@ -95,7 +95,7 @@ func CreateListUsersForGroupRequest() (request *ListUsersForGroupRequest) { request = &ListUsersForGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListUsersForGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListUsersForGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_virtual_mfa_devices.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_virtual_mfa_devices.go index 7873023e5..aa9f74652 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_virtual_mfa_devices.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/list_virtual_mfa_devices.go @@ -90,7 +90,7 @@ func CreateListVirtualMFADevicesRequest() (request *ListVirtualMFADevicesRequest request = &ListVirtualMFADevicesRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "ListVirtualMFADevices", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "ListVirtualMFADevices", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/remove_user_from_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/remove_user_from_group.go index 794afc50a..945dfaf20 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/remove_user_from_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/remove_user_from_group.go @@ -91,7 +91,7 @@ func CreateRemoveUserFromGroupRequest() (request *RemoveUserFromGroupRequest) { request = &RemoveUserFromGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "RemoveUserFromGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "RemoveUserFromGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_account_alias.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_account_alias.go index 554d66147..537805d04 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_account_alias.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_account_alias.go @@ -90,7 +90,7 @@ func CreateSetAccountAliasRequest() (request *SetAccountAliasRequest) { request = &SetAccountAliasRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "SetAccountAlias", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "SetAccountAlias", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_default_policy_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_default_policy_version.go index a511b19b7..f1f8b0735 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_default_policy_version.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_default_policy_version.go @@ -91,7 +91,7 @@ func CreateSetDefaultPolicyVersionRequest() (request *SetDefaultPolicyVersionReq request = &SetDefaultPolicyVersionRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "SetDefaultPolicyVersion", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "SetDefaultPolicyVersion", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_password_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_password_policy.go index e89900862..de6889845 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_password_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_password_policy.go @@ -76,22 +76,22 @@ func (client *Client) SetPasswordPolicyWithCallback(request *SetPasswordPolicyRe // SetPasswordPolicyRequest is the request struct for api SetPasswordPolicy type SetPasswordPolicyRequest struct { *requests.RpcRequest - RequireNumbers requests.Boolean `position:"Query" name:"RequireNumbers"` PasswordReusePrevention requests.Integer `position:"Query" name:"PasswordReusePrevention"` RequireUppercaseCharacters requests.Boolean `position:"Query" name:"RequireUppercaseCharacters"` + MinimumPasswordLength requests.Integer `position:"Query" name:"MinimumPasswordLength"` + RequireNumbers requests.Boolean `position:"Query" name:"RequireNumbers"` + RequireLowercaseCharacters requests.Boolean `position:"Query" name:"RequireLowercaseCharacters"` MaxPasswordAge requests.Integer `position:"Query" name:"MaxPasswordAge"` MaxLoginAttemps requests.Integer `position:"Query" name:"MaxLoginAttemps"` HardExpiry requests.Boolean `position:"Query" name:"HardExpiry"` - MinimumPasswordLength requests.Integer `position:"Query" name:"MinimumPasswordLength"` - RequireLowercaseCharacters requests.Boolean `position:"Query" name:"RequireLowercaseCharacters"` RequireSymbols requests.Boolean `position:"Query" name:"RequireSymbols"` } // SetPasswordPolicyResponse is the response struct for api SetPasswordPolicy type SetPasswordPolicyResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - PasswordPolicy PasswordPolicy `json:"PasswordPolicy" xml:"PasswordPolicy"` + RequestId string `json:"RequestId" xml:"RequestId"` + PasswordPolicy PasswordPolicyInSetPasswordPolicy `json:"PasswordPolicy" xml:"PasswordPolicy"` } // CreateSetPasswordPolicyRequest creates a request to invoke SetPasswordPolicy API @@ -99,7 +99,7 @@ func CreateSetPasswordPolicyRequest() (request *SetPasswordPolicyRequest) { request = &SetPasswordPolicyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "SetPasswordPolicy", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "SetPasswordPolicy", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_security_preference.go index fbf4c7656..667554462 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_security_preference.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/set_security_preference.go @@ -76,20 +76,20 @@ func (client *Client) SetSecurityPreferenceWithCallback(request *SetSecurityPref // SetSecurityPreferenceRequest is the request struct for api SetSecurityPreference type SetSecurityPreferenceRequest struct { *requests.RpcRequest - AllowUserToManageAccessKeys requests.Boolean `position:"Query" name:"AllowUserToManageAccessKeys"` - AllowUserToManageMFADevices requests.Boolean `position:"Query" name:"AllowUserToManageMFADevices"` - AllowUserToManagePublicKeys requests.Boolean `position:"Query" name:"AllowUserToManagePublicKeys"` EnableSaveMFATicket requests.Boolean `position:"Query" name:"EnableSaveMFATicket"` LoginNetworkMasks string `position:"Query" name:"LoginNetworkMasks"` AllowUserToChangePassword requests.Boolean `position:"Query" name:"AllowUserToChangePassword"` + AllowUserToManagePublicKeys requests.Boolean `position:"Query" name:"AllowUserToManagePublicKeys"` LoginSessionDuration requests.Integer `position:"Query" name:"LoginSessionDuration"` + AllowUserToManageAccessKeys requests.Boolean `position:"Query" name:"AllowUserToManageAccessKeys"` + AllowUserToManageMFADevices requests.Boolean `position:"Query" name:"AllowUserToManageMFADevices"` } // SetSecurityPreferenceResponse is the response struct for api SetSecurityPreference type SetSecurityPreferenceResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - SecurityPreference SecurityPreference `json:"SecurityPreference" xml:"SecurityPreference"` + RequestId string `json:"RequestId" xml:"RequestId"` + SecurityPreference SecurityPreferenceInSetSecurityPreference `json:"SecurityPreference" xml:"SecurityPreference"` } // CreateSetSecurityPreferenceRequest creates a request to invoke SetSecurityPreference API @@ -97,7 +97,7 @@ func CreateSetSecurityPreferenceRequest() (request *SetSecurityPreferenceRequest request = &SetSecurityPreferenceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "SetSecurityPreference", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "SetSecurityPreference", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_in_create_access_key.go similarity index 89% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_in_create_access_key.go index df645195f..da027dc30 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_in_create_access_key.go @@ -15,10 +15,10 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// AccessKey is a nested struct in ram response -type AccessKey struct { - AccessKeySecret string `json:"AccessKeySecret" xml:"AccessKeySecret"` - CreateDate string `json:"CreateDate" xml:"CreateDate"` - Status string `json:"Status" xml:"Status"` +// AccessKeyInCreateAccessKey is a nested struct in ram response +type AccessKeyInCreateAccessKey struct { AccessKeyId string `json:"AccessKeyId" xml:"AccessKeyId"` + AccessKeySecret string `json:"AccessKeySecret" xml:"AccessKeySecret"` + Status string `json:"Status" xml:"Status"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_in_list_access_keys.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_in_list_access_keys.go new file mode 100644 index 000000000..64e52b98d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_in_list_access_keys.go @@ -0,0 +1,23 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AccessKeyInListAccessKeys is a nested struct in ram response +type AccessKeyInListAccessKeys struct { + AccessKeyId string `json:"AccessKeyId" xml:"AccessKeyId"` + Status string `json:"Status" xml:"Status"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference_in_get_security_preference.go similarity index 85% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference_in_get_security_preference.go index 379d041d7..66eaf3597 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference_in_get_security_preference.go @@ -15,7 +15,7 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// AccessKeyPreference is a nested struct in ram response -type AccessKeyPreference struct { +// AccessKeyPreferenceInGetSecurityPreference is a nested struct in ram response +type AccessKeyPreferenceInGetSecurityPreference struct { AllowUserToManageAccessKeys bool `json:"AllowUserToManageAccessKeys" xml:"AllowUserToManageAccessKeys"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference_in_set_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference_in_set_security_preference.go new file mode 100644 index 000000000..aff470b46 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_key_preference_in_set_security_preference.go @@ -0,0 +1,21 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// AccessKeyPreferenceInSetSecurityPreference is a nested struct in ram response +type AccessKeyPreferenceInSetSecurityPreference struct { + AllowUserToManageAccessKeys bool `json:"AllowUserToManageAccessKeys" xml:"AllowUserToManageAccessKeys"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_keys.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_keys.go index ecea1d7d3..416b07632 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_keys.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_access_keys.go @@ -17,5 +17,5 @@ package ram // AccessKeys is a nested struct in ram response type AccessKeys struct { - AccessKey []AccessKey `json:"AccessKey" xml:"AccessKey"` + AccessKey []AccessKeyInListAccessKeys `json:"AccessKey" xml:"AccessKey"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_default_policy_version.go similarity index 91% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_default_policy_version.go index d58fcbf3b..a38dddac0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_default_policy_version.go @@ -15,10 +15,10 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// PolicyVersion is a nested struct in ram response -type PolicyVersion struct { +// DefaultPolicyVersion is a nested struct in ram response +type DefaultPolicyVersion struct { VersionId string `json:"VersionId" xml:"VersionId"` + IsDefaultVersion bool `json:"IsDefaultVersion" xml:"IsDefaultVersion"` PolicyDocument string `json:"PolicyDocument" xml:"PolicyDocument"` CreateDate string `json:"CreateDate" xml:"CreateDate"` - IsDefaultVersion bool `json:"IsDefaultVersion" xml:"IsDefaultVersion"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_create_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_create_group.go new file mode 100644 index 000000000..a1e3a99ce --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_create_group.go @@ -0,0 +1,23 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// GroupInCreateGroup is a nested struct in ram response +type GroupInCreateGroup struct { + GroupName string `json:"GroupName" xml:"GroupName"` + Comments string `json:"Comments" xml:"Comments"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_get_group.go similarity index 84% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_get_group.go index 0d8941a23..7214a077d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_get_group.go @@ -15,12 +15,10 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Group is a nested struct in ram response -type Group struct { +// GroupInGetGroup is a nested struct in ram response +type GroupInGetGroup struct { + GroupName string `json:"GroupName" xml:"GroupName"` Comments string `json:"Comments" xml:"Comments"` - AttachDate string `json:"AttachDate" xml:"AttachDate"` CreateDate string `json:"CreateDate" xml:"CreateDate"` UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` - GroupName string `json:"GroupName" xml:"GroupName"` - JoinDate string `json:"JoinDate" xml:"JoinDate"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_entities_for_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_entities_for_policy.go new file mode 100644 index 000000000..73c25e380 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_entities_for_policy.go @@ -0,0 +1,23 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// GroupInListEntitiesForPolicy is a nested struct in ram response +type GroupInListEntitiesForPolicy struct { + GroupName string `json:"GroupName" xml:"GroupName"` + Comments string `json:"Comments" xml:"Comments"` + AttachDate string `json:"AttachDate" xml:"AttachDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_groups.go new file mode 100644 index 000000000..995d7bf91 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_groups.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// GroupInListGroups is a nested struct in ram response +type GroupInListGroups struct { + GroupName string `json:"GroupName" xml:"GroupName"` + Comments string `json:"Comments" xml:"Comments"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_groups_for_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_groups_for_user.go new file mode 100644 index 000000000..1aa93f71c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_list_groups_for_user.go @@ -0,0 +1,23 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// GroupInListGroupsForUser is a nested struct in ram response +type GroupInListGroupsForUser struct { + GroupName string `json:"GroupName" xml:"GroupName"` + Comments string `json:"Comments" xml:"Comments"` + JoinDate string `json:"JoinDate" xml:"JoinDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_update_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_update_group.go new file mode 100644 index 000000000..5a6364a2a --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_group_in_update_group.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// GroupInUpdateGroup is a nested struct in ram response +type GroupInUpdateGroup struct { + GroupName string `json:"GroupName" xml:"GroupName"` + Comments string `json:"Comments" xml:"Comments"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_entities_for_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_entities_for_policy.go index ab33a2964..fa341edef 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_entities_for_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_entities_for_policy.go @@ -17,5 +17,5 @@ package ram // GroupsInListEntitiesForPolicy is a nested struct in ram response type GroupsInListEntitiesForPolicy struct { - Group []Group `json:"Group" xml:"Group"` + Group []GroupInListEntitiesForPolicy `json:"Group" xml:"Group"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_groups.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_groups.go index 7765486ad..a5175f2a2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_groups.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_groups.go @@ -17,5 +17,5 @@ package ram // GroupsInListGroups is a nested struct in ram response type GroupsInListGroups struct { - Group []Group `json:"Group" xml:"Group"` + Group []GroupInListGroups `json:"Group" xml:"Group"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_groups_for_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_groups_for_user.go index c8596fb48..0404a97b0 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_groups_for_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_groups_in_list_groups_for_user.go @@ -17,5 +17,5 @@ package ram // GroupsInListGroupsForUser is a nested struct in ram response type GroupsInListGroupsForUser struct { - Group []Group `json:"Group" xml:"Group"` + Group []GroupInListGroupsForUser `json:"Group" xml:"Group"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_in_create_login_profile.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_in_create_login_profile.go new file mode 100644 index 000000000..f5c5e85c2 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_in_create_login_profile.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// LoginProfileInCreateLoginProfile is a nested struct in ram response +type LoginProfileInCreateLoginProfile struct { + UserName string `json:"UserName" xml:"UserName"` + PasswordResetRequired bool `json:"PasswordResetRequired" xml:"PasswordResetRequired"` + MFABindRequired bool `json:"MFABindRequired" xml:"MFABindRequired"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_in_get_login_profile.go similarity index 89% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_in_get_login_profile.go index 015f76ae0..c938d4f5e 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_in_get_login_profile.go @@ -15,10 +15,10 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// LoginProfile is a nested struct in ram response -type LoginProfile struct { - MFABindRequired bool `json:"MFABindRequired" xml:"MFABindRequired"` - CreateDate string `json:"CreateDate" xml:"CreateDate"` +// LoginProfileInGetLoginProfile is a nested struct in ram response +type LoginProfileInGetLoginProfile struct { UserName string `json:"UserName" xml:"UserName"` PasswordResetRequired bool `json:"PasswordResetRequired" xml:"PasswordResetRequired"` + MFABindRequired bool `json:"MFABindRequired" xml:"MFABindRequired"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference_in_get_security_preference.go similarity index 88% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference_in_get_security_preference.go index b9e759eef..306f93c97 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference_in_get_security_preference.go @@ -15,10 +15,10 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// LoginProfilePreference is a nested struct in ram response -type LoginProfilePreference struct { - LoginNetworkMasks string `json:"LoginNetworkMasks" xml:"LoginNetworkMasks"` - LoginSessionDuration int `json:"LoginSessionDuration" xml:"LoginSessionDuration"` +// LoginProfilePreferenceInGetSecurityPreference is a nested struct in ram response +type LoginProfilePreferenceInGetSecurityPreference struct { EnableSaveMFATicket bool `json:"EnableSaveMFATicket" xml:"EnableSaveMFATicket"` AllowUserToChangePassword bool `json:"AllowUserToChangePassword" xml:"AllowUserToChangePassword"` + LoginSessionDuration int `json:"LoginSessionDuration" xml:"LoginSessionDuration"` + LoginNetworkMasks string `json:"LoginNetworkMasks" xml:"LoginNetworkMasks"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference_in_set_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference_in_set_security_preference.go new file mode 100644 index 000000000..44c1e1cb0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_login_profile_preference_in_set_security_preference.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// LoginProfilePreferenceInSetSecurityPreference is a nested struct in ram response +type LoginProfilePreferenceInSetSecurityPreference struct { + EnableSaveMFATicket bool `json:"EnableSaveMFATicket" xml:"EnableSaveMFATicket"` + AllowUserToChangePassword bool `json:"AllowUserToChangePassword" xml:"AllowUserToChangePassword"` + LoginSessionDuration int `json:"LoginSessionDuration" xml:"LoginSessionDuration"` + LoginNetworkMasks string `json:"LoginNetworkMasks" xml:"LoginNetworkMasks"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_keys.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device_in_get_user_mfa_info.go similarity index 80% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_keys.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device_in_get_user_mfa_info.go index c80e4efc9..95f373857 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_keys.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device_in_get_user_mfa_info.go @@ -15,7 +15,7 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// PublicKeys is a nested struct in ram response -type PublicKeys struct { - PublicKey []PublicKey `json:"PublicKey" xml:"PublicKey"` +// MFADeviceInGetUserMFAInfo is a nested struct in ram response +type MFADeviceInGetUserMFAInfo struct { + SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device_in_unbind_mfa_device.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device_in_unbind_mfa_device.go new file mode 100644 index 000000000..5bcfc02ba --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_device_in_unbind_mfa_device.go @@ -0,0 +1,21 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MFADeviceInUnbindMFADevice is a nested struct in ram response +type MFADeviceInUnbindMFADevice struct { + SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference_in_get_security_preference.go similarity index 86% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference_in_get_security_preference.go index 8fc3783b8..fd08111d2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference_in_get_security_preference.go @@ -15,7 +15,7 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// MFAPreference is a nested struct in ram response -type MFAPreference struct { +// MFAPreferenceInGetSecurityPreference is a nested struct in ram response +type MFAPreferenceInGetSecurityPreference struct { AllowUserToManageMFADevices bool `json:"AllowUserToManageMFADevices" xml:"AllowUserToManageMFADevices"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference_in_set_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference_in_set_security_preference.go new file mode 100644 index 000000000..80f7e3566 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_mfa_preference_in_set_security_preference.go @@ -0,0 +1,21 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// MFAPreferenceInSetSecurityPreference is a nested struct in ram response +type MFAPreferenceInSetSecurityPreference struct { + AllowUserToManageMFADevices bool `json:"AllowUserToManageMFADevices" xml:"AllowUserToManageMFADevices"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy_in_get_password_policy.go similarity index 92% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy_in_get_password_policy.go index 66b89be98..8f1d825ea 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy_in_get_password_policy.go @@ -15,15 +15,15 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// PasswordPolicy is a nested struct in ram response -type PasswordPolicy struct { - RequireUppercaseCharacters bool `json:"RequireUppercaseCharacters" xml:"RequireUppercaseCharacters"` - MaxPasswordAge int `json:"MaxPasswordAge" xml:"MaxPasswordAge"` - RequireSymbols bool `json:"RequireSymbols" xml:"RequireSymbols"` - RequireLowercaseCharacters bool `json:"RequireLowercaseCharacters" xml:"RequireLowercaseCharacters"` - PasswordReusePrevention int `json:"PasswordReusePrevention" xml:"PasswordReusePrevention"` - HardExpiry bool `json:"HardExpiry" xml:"HardExpiry"` - MaxLoginAttemps int `json:"MaxLoginAttemps" xml:"MaxLoginAttemps"` +// PasswordPolicyInGetPasswordPolicy is a nested struct in ram response +type PasswordPolicyInGetPasswordPolicy struct { MinimumPasswordLength int `json:"MinimumPasswordLength" xml:"MinimumPasswordLength"` + RequireLowercaseCharacters bool `json:"RequireLowercaseCharacters" xml:"RequireLowercaseCharacters"` + RequireUppercaseCharacters bool `json:"RequireUppercaseCharacters" xml:"RequireUppercaseCharacters"` RequireNumbers bool `json:"RequireNumbers" xml:"RequireNumbers"` + RequireSymbols bool `json:"RequireSymbols" xml:"RequireSymbols"` + HardExpiry bool `json:"HardExpiry" xml:"HardExpiry"` + MaxPasswordAge int `json:"MaxPasswordAge" xml:"MaxPasswordAge"` + PasswordReusePrevention int `json:"PasswordReusePrevention" xml:"PasswordReusePrevention"` + MaxLoginAttemps int `json:"MaxLoginAttemps" xml:"MaxLoginAttemps"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy_in_set_password_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy_in_set_password_policy.go new file mode 100644 index 000000000..42ea19e5f --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_password_policy_in_set_password_policy.go @@ -0,0 +1,29 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PasswordPolicyInSetPasswordPolicy is a nested struct in ram response +type PasswordPolicyInSetPasswordPolicy struct { + MinimumPasswordLength int `json:"MinimumPasswordLength" xml:"MinimumPasswordLength"` + RequireLowercaseCharacters bool `json:"RequireLowercaseCharacters" xml:"RequireLowercaseCharacters"` + RequireUppercaseCharacters bool `json:"RequireUppercaseCharacters" xml:"RequireUppercaseCharacters"` + RequireNumbers bool `json:"RequireNumbers" xml:"RequireNumbers"` + RequireSymbols bool `json:"RequireSymbols" xml:"RequireSymbols"` + HardExpiry bool `json:"HardExpiry" xml:"HardExpiry"` + MaxPasswordAge int `json:"MaxPasswordAge" xml:"MaxPasswordAge"` + PasswordReusePrevention int `json:"PasswordReusePrevention" xml:"PasswordReusePrevention"` + MaxLoginAttemps int `json:"MaxLoginAttemps" xml:"MaxLoginAttemps"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies.go index b4f9e91f5..a4e3e9cf3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies.go @@ -17,5 +17,5 @@ package ram // PoliciesInListPolicies is a nested struct in ram response type PoliciesInListPolicies struct { - Policy []Policy `json:"Policy" xml:"Policy"` + Policy []PolicyInListPolicies `json:"Policy" xml:"Policy"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_group.go index 60464613f..cd1d6e9d7 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_group.go @@ -17,5 +17,5 @@ package ram // PoliciesInListPoliciesForGroup is a nested struct in ram response type PoliciesInListPoliciesForGroup struct { - Policy []Policy `json:"Policy" xml:"Policy"` + Policy []PolicyInListPoliciesForGroup `json:"Policy" xml:"Policy"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_role.go index 9bc518e84..6673f081d 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_role.go @@ -17,5 +17,5 @@ package ram // PoliciesInListPoliciesForRole is a nested struct in ram response type PoliciesInListPoliciesForRole struct { - Policy []Policy `json:"Policy" xml:"Policy"` + Policy []PolicyInListPoliciesForRole `json:"Policy" xml:"Policy"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_user.go index 1b60c9a02..fedaf9912 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policies_in_list_policies_for_user.go @@ -17,5 +17,5 @@ package ram // PoliciesInListPoliciesForUser is a nested struct in ram response type PoliciesInListPoliciesForUser struct { - Policy []Policy `json:"Policy" xml:"Policy"` + Policy []PolicyInListPoliciesForUser `json:"Policy" xml:"Policy"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_create_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_create_policy.go new file mode 100644 index 000000000..76789e1ef --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_create_policy.go @@ -0,0 +1,25 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyInCreatePolicy is a nested struct in ram response +type PolicyInCreatePolicy struct { + PolicyName string `json:"PolicyName" xml:"PolicyName"` + PolicyType string `json:"PolicyType" xml:"PolicyType"` + Description string `json:"Description" xml:"Description"` + DefaultVersion string `json:"DefaultVersion" xml:"DefaultVersion"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_get_policy.go similarity index 90% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_get_policy.go index 37a8bb103..a074550dc 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_get_policy.go @@ -15,15 +15,14 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Policy is a nested struct in ram response -type Policy struct { - PolicyDocument string `json:"PolicyDocument" xml:"PolicyDocument"` - AttachDate string `json:"AttachDate" xml:"AttachDate"` - CreateDate string `json:"CreateDate" xml:"CreateDate"` +// PolicyInGetPolicy is a nested struct in ram response +type PolicyInGetPolicy struct { + PolicyName string `json:"PolicyName" xml:"PolicyName"` PolicyType string `json:"PolicyType" xml:"PolicyType"` + Description string `json:"Description" xml:"Description"` + DefaultVersion string `json:"DefaultVersion" xml:"DefaultVersion"` + PolicyDocument string `json:"PolicyDocument" xml:"PolicyDocument"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` AttachmentCount int `json:"AttachmentCount" xml:"AttachmentCount"` - PolicyName string `json:"PolicyName" xml:"PolicyName"` - DefaultVersion string `json:"DefaultVersion" xml:"DefaultVersion"` - Description string `json:"Description" xml:"Description"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies.go new file mode 100644 index 000000000..2d522bea0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies.go @@ -0,0 +1,27 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyInListPolicies is a nested struct in ram response +type PolicyInListPolicies struct { + PolicyName string `json:"PolicyName" xml:"PolicyName"` + PolicyType string `json:"PolicyType" xml:"PolicyType"` + Description string `json:"Description" xml:"Description"` + DefaultVersion string `json:"DefaultVersion" xml:"DefaultVersion"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` + AttachmentCount int `json:"AttachmentCount" xml:"AttachmentCount"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_group.go new file mode 100644 index 000000000..420d68460 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_group.go @@ -0,0 +1,25 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyInListPoliciesForGroup is a nested struct in ram response +type PolicyInListPoliciesForGroup struct { + PolicyName string `json:"PolicyName" xml:"PolicyName"` + PolicyType string `json:"PolicyType" xml:"PolicyType"` + Description string `json:"Description" xml:"Description"` + DefaultVersion string `json:"DefaultVersion" xml:"DefaultVersion"` + AttachDate string `json:"AttachDate" xml:"AttachDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_role.go new file mode 100644 index 000000000..e739a004b --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_role.go @@ -0,0 +1,25 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyInListPoliciesForRole is a nested struct in ram response +type PolicyInListPoliciesForRole struct { + PolicyName string `json:"PolicyName" xml:"PolicyName"` + PolicyType string `json:"PolicyType" xml:"PolicyType"` + Description string `json:"Description" xml:"Description"` + DefaultVersion string `json:"DefaultVersion" xml:"DefaultVersion"` + AttachDate string `json:"AttachDate" xml:"AttachDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_user.go new file mode 100644 index 000000000..fb9a2ea9e --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_in_list_policies_for_user.go @@ -0,0 +1,25 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyInListPoliciesForUser is a nested struct in ram response +type PolicyInListPoliciesForUser struct { + PolicyName string `json:"PolicyName" xml:"PolicyName"` + PolicyType string `json:"PolicyType" xml:"PolicyType"` + Description string `json:"Description" xml:"Description"` + DefaultVersion string `json:"DefaultVersion" xml:"DefaultVersion"` + AttachDate string `json:"AttachDate" xml:"AttachDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_create_policy_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_create_policy_version.go new file mode 100644 index 000000000..c9ed51d70 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_create_policy_version.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyVersionInCreatePolicyVersion is a nested struct in ram response +type PolicyVersionInCreatePolicyVersion struct { + VersionId string `json:"VersionId" xml:"VersionId"` + IsDefaultVersion bool `json:"IsDefaultVersion" xml:"IsDefaultVersion"` + PolicyDocument string `json:"PolicyDocument" xml:"PolicyDocument"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_get_policy_version.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_get_policy_version.go new file mode 100644 index 000000000..c28ecff5c --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_get_policy_version.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyVersionInGetPolicyVersion is a nested struct in ram response +type PolicyVersionInGetPolicyVersion struct { + VersionId string `json:"VersionId" xml:"VersionId"` + IsDefaultVersion bool `json:"IsDefaultVersion" xml:"IsDefaultVersion"` + PolicyDocument string `json:"PolicyDocument" xml:"PolicyDocument"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_list_policy_versions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_list_policy_versions.go new file mode 100644 index 000000000..31d01ac42 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_version_in_list_policy_versions.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PolicyVersionInListPolicyVersions is a nested struct in ram response +type PolicyVersionInListPolicyVersions struct { + VersionId string `json:"VersionId" xml:"VersionId"` + IsDefaultVersion bool `json:"IsDefaultVersion" xml:"IsDefaultVersion"` + PolicyDocument string `json:"PolicyDocument" xml:"PolicyDocument"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_versions.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_versions.go index 41952d57a..6575192d6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_versions.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_policy_versions.go @@ -17,5 +17,5 @@ package ram // PolicyVersions is a nested struct in ram response type PolicyVersions struct { - PolicyVersion []PolicyVersion `json:"PolicyVersion" xml:"PolicyVersion"` + PolicyVersion []PolicyVersionInListPolicyVersions `json:"PolicyVersion" xml:"PolicyVersion"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key.go deleted file mode 100644 index 08d23d934..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key.go +++ /dev/null @@ -1,24 +0,0 @@ -package ram - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// PublicKey is a nested struct in ram response -type PublicKey struct { - CreateDate string `json:"CreateDate" xml:"CreateDate"` - PublicKeyId string `json:"PublicKeyId" xml:"PublicKeyId"` - Status string `json:"Status" xml:"Status"` - PublicKeySpec string `json:"PublicKeySpec" xml:"PublicKeySpec"` -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference_in_get_security_preference.go similarity index 85% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference_in_get_security_preference.go index 52d215d01..e43e84779 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference_in_get_security_preference.go @@ -15,7 +15,7 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// PublicKeyPreference is a nested struct in ram response -type PublicKeyPreference struct { +// PublicKeyPreferenceInGetSecurityPreference is a nested struct in ram response +type PublicKeyPreferenceInGetSecurityPreference struct { AllowUserToManagePublicKeys bool `json:"AllowUserToManagePublicKeys" xml:"AllowUserToManagePublicKeys"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference_in_set_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference_in_set_security_preference.go new file mode 100644 index 000000000..6877f174a --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_public_key_preference_in_set_security_preference.go @@ -0,0 +1,21 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// PublicKeyPreferenceInSetSecurityPreference is a nested struct in ram response +type PublicKeyPreferenceInSetSecurityPreference struct { + AllowUserToManagePublicKeys bool `json:"AllowUserToManagePublicKeys" xml:"AllowUserToManagePublicKeys"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_create_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_create_role.go new file mode 100644 index 000000000..13bb31300 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_create_role.go @@ -0,0 +1,27 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RoleInCreateRole is a nested struct in ram response +type RoleInCreateRole struct { + RoleId string `json:"RoleId" xml:"RoleId"` + RoleName string `json:"RoleName" xml:"RoleName"` + Arn string `json:"Arn" xml:"Arn"` + Description string `json:"Description" xml:"Description"` + AssumeRolePolicyDocument string `json:"AssumeRolePolicyDocument" xml:"AssumeRolePolicyDocument"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + MaxSessionDuration int64 `json:"MaxSessionDuration" xml:"MaxSessionDuration"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_get_role.go similarity index 87% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_get_role.go index 301f0aa0f..526aaa5a8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_get_role.go @@ -15,14 +15,14 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Role is a nested struct in ram response -type Role struct { +// RoleInGetRole is a nested struct in ram response +type RoleInGetRole struct { RoleId string `json:"RoleId" xml:"RoleId"` - CreateDate string `json:"CreateDate" xml:"CreateDate"` - AttachDate string `json:"AttachDate" xml:"AttachDate"` - Arn string `json:"Arn" xml:"Arn"` - UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` - Description string `json:"Description" xml:"Description"` RoleName string `json:"RoleName" xml:"RoleName"` + Arn string `json:"Arn" xml:"Arn"` + Description string `json:"Description" xml:"Description"` AssumeRolePolicyDocument string `json:"AssumeRolePolicyDocument" xml:"AssumeRolePolicyDocument"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` + MaxSessionDuration int64 `json:"MaxSessionDuration" xml:"MaxSessionDuration"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_list_entities_for_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_list_entities_for_policy.go new file mode 100644 index 000000000..d28f0a59e --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_list_entities_for_policy.go @@ -0,0 +1,25 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RoleInListEntitiesForPolicy is a nested struct in ram response +type RoleInListEntitiesForPolicy struct { + RoleId string `json:"RoleId" xml:"RoleId"` + RoleName string `json:"RoleName" xml:"RoleName"` + Arn string `json:"Arn" xml:"Arn"` + Description string `json:"Description" xml:"Description"` + AttachDate string `json:"AttachDate" xml:"AttachDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_list_roles.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_list_roles.go new file mode 100644 index 000000000..d805be654 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_list_roles.go @@ -0,0 +1,27 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RoleInListRoles is a nested struct in ram response +type RoleInListRoles struct { + RoleId string `json:"RoleId" xml:"RoleId"` + RoleName string `json:"RoleName" xml:"RoleName"` + Arn string `json:"Arn" xml:"Arn"` + Description string `json:"Description" xml:"Description"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` + MaxSessionDuration int64 `json:"MaxSessionDuration" xml:"MaxSessionDuration"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_update_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_update_role.go new file mode 100644 index 000000000..ed5aaae94 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_role_in_update_role.go @@ -0,0 +1,28 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// RoleInUpdateRole is a nested struct in ram response +type RoleInUpdateRole struct { + RoleId string `json:"RoleId" xml:"RoleId"` + RoleName string `json:"RoleName" xml:"RoleName"` + Arn string `json:"Arn" xml:"Arn"` + Description string `json:"Description" xml:"Description"` + AssumeRolePolicyDocument string `json:"AssumeRolePolicyDocument" xml:"AssumeRolePolicyDocument"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` + MaxSessionDuration int64 `json:"MaxSessionDuration" xml:"MaxSessionDuration"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_roles_in_list_entities_for_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_roles_in_list_entities_for_policy.go index d72583f5c..9363c55e4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_roles_in_list_entities_for_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_roles_in_list_entities_for_policy.go @@ -17,5 +17,5 @@ package ram // RolesInListEntitiesForPolicy is a nested struct in ram response type RolesInListEntitiesForPolicy struct { - Role []Role `json:"Role" xml:"Role"` + Role []RoleInListEntitiesForPolicy `json:"Role" xml:"Role"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_roles_in_list_roles.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_roles_in_list_roles.go index ae81bc62b..45f882b7a 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_roles_in_list_roles.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_roles_in_list_roles.go @@ -17,5 +17,5 @@ package ram // RolesInListRoles is a nested struct in ram response type RolesInListRoles struct { - Role []Role `json:"Role" xml:"Role"` + Role []RoleInListRoles `json:"Role" xml:"Role"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference.go deleted file mode 100644 index 95a6226e4..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference.go +++ /dev/null @@ -1,24 +0,0 @@ -package ram - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// SecurityPreference is a nested struct in ram response -type SecurityPreference struct { - MFAPreference MFAPreference `json:"MFAPreference" xml:"MFAPreference"` - LoginProfilePreference LoginProfilePreference `json:"LoginProfilePreference" xml:"LoginProfilePreference"` - PublicKeyPreference PublicKeyPreference `json:"PublicKeyPreference" xml:"PublicKeyPreference"` - AccessKeyPreference AccessKeyPreference `json:"AccessKeyPreference" xml:"AccessKeyPreference"` -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference_in_get_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference_in_get_security_preference.go new file mode 100644 index 000000000..f941a8e51 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference_in_get_security_preference.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SecurityPreferenceInGetSecurityPreference is a nested struct in ram response +type SecurityPreferenceInGetSecurityPreference struct { + LoginProfilePreference LoginProfilePreferenceInGetSecurityPreference `json:"LoginProfilePreference" xml:"LoginProfilePreference"` + AccessKeyPreference AccessKeyPreferenceInGetSecurityPreference `json:"AccessKeyPreference" xml:"AccessKeyPreference"` + PublicKeyPreference PublicKeyPreferenceInGetSecurityPreference `json:"PublicKeyPreference" xml:"PublicKeyPreference"` + MFAPreference MFAPreferenceInGetSecurityPreference `json:"MFAPreference" xml:"MFAPreference"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference_in_set_security_preference.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference_in_set_security_preference.go new file mode 100644 index 000000000..d60fb1363 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_security_preference_in_set_security_preference.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// SecurityPreferenceInSetSecurityPreference is a nested struct in ram response +type SecurityPreferenceInSetSecurityPreference struct { + LoginProfilePreference LoginProfilePreferenceInSetSecurityPreference `json:"LoginProfilePreference" xml:"LoginProfilePreference"` + AccessKeyPreference AccessKeyPreferenceInSetSecurityPreference `json:"AccessKeyPreference" xml:"AccessKeyPreference"` + PublicKeyPreference PublicKeyPreferenceInSetSecurityPreference `json:"PublicKeyPreference" xml:"PublicKeyPreference"` + MFAPreference MFAPreferenceInSetSecurityPreference `json:"MFAPreference" xml:"MFAPreference"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_create_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_create_user.go new file mode 100644 index 000000000..f37de285e --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_create_user.go @@ -0,0 +1,27 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserInCreateUser is a nested struct in ram response +type UserInCreateUser struct { + UserId string `json:"UserId" xml:"UserId"` + UserName string `json:"UserName" xml:"UserName"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + MobilePhone string `json:"MobilePhone" xml:"MobilePhone"` + Email string `json:"Email" xml:"Email"` + Comments string `json:"Comments" xml:"Comments"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_get_user.go similarity index 87% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_get_user.go index ba9597da9..c6c874ff2 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_get_user.go @@ -15,17 +15,15 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// User is a nested struct in ram response -type User struct { +// UserInGetUser is a nested struct in ram response +type UserInGetUser struct { + UserId string `json:"UserId" xml:"UserId"` + UserName string `json:"UserName" xml:"UserName"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` MobilePhone string `json:"MobilePhone" xml:"MobilePhone"` + Email string `json:"Email" xml:"Email"` Comments string `json:"Comments" xml:"Comments"` CreateDate string `json:"CreateDate" xml:"CreateDate"` - AttachDate string `json:"AttachDate" xml:"AttachDate"` - Email string `json:"Email" xml:"Email"` - UserId string `json:"UserId" xml:"UserId"` UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` - UserName string `json:"UserName" xml:"UserName"` - JoinDate string `json:"JoinDate" xml:"JoinDate"` LastLoginDate string `json:"LastLoginDate" xml:"LastLoginDate"` - DisplayName string `json:"DisplayName" xml:"DisplayName"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_entities_for_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_entities_for_policy.go new file mode 100644 index 000000000..c8b9b41a0 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_entities_for_policy.go @@ -0,0 +1,24 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserInListEntitiesForPolicy is a nested struct in ram response +type UserInListEntitiesForPolicy struct { + UserId string `json:"UserId" xml:"UserId"` + UserName string `json:"UserName" xml:"UserName"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + AttachDate string `json:"AttachDate" xml:"AttachDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_users.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_users.go new file mode 100644 index 000000000..4938b512d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_users.go @@ -0,0 +1,28 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserInListUsers is a nested struct in ram response +type UserInListUsers struct { + UserId string `json:"UserId" xml:"UserId"` + UserName string `json:"UserName" xml:"UserName"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + MobilePhone string `json:"MobilePhone" xml:"MobilePhone"` + Email string `json:"Email" xml:"Email"` + Comments string `json:"Comments" xml:"Comments"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_users_for_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_users_for_group.go new file mode 100644 index 000000000..be94bbc81 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_users_for_group.go @@ -0,0 +1,23 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserInListUsersForGroup is a nested struct in ram response +type UserInListUsersForGroup struct { + UserName string `json:"UserName" xml:"UserName"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + JoinDate string `json:"JoinDate" xml:"JoinDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_virtual_mfa_devices.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_virtual_mfa_devices.go new file mode 100644 index 000000000..858bd03c9 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_list_virtual_mfa_devices.go @@ -0,0 +1,23 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserInListVirtualMFADevices is a nested struct in ram response +type UserInListVirtualMFADevices struct { + UserId string `json:"UserId" xml:"UserId"` + UserName string `json:"UserName" xml:"UserName"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_update_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_update_user.go new file mode 100644 index 000000000..b31c62c6d --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_user_in_update_user.go @@ -0,0 +1,28 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserInUpdateUser is a nested struct in ram response +type UserInUpdateUser struct { + UserId string `json:"UserId" xml:"UserId"` + UserName string `json:"UserName" xml:"UserName"` + DisplayName string `json:"DisplayName" xml:"DisplayName"` + MobilePhone string `json:"MobilePhone" xml:"MobilePhone"` + Email string `json:"Email" xml:"Email"` + Comments string `json:"Comments" xml:"Comments"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + UpdateDate string `json:"UpdateDate" xml:"UpdateDate"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_entities_for_policy.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_entities_for_policy.go index fa864369b..c33e279a6 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_entities_for_policy.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_entities_for_policy.go @@ -17,5 +17,5 @@ package ram // UsersInListEntitiesForPolicy is a nested struct in ram response type UsersInListEntitiesForPolicy struct { - User []User `json:"User" xml:"User"` + User []UserInListEntitiesForPolicy `json:"User" xml:"User"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_users.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_users.go index 48596725a..9d2d7f7ea 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_users.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_users.go @@ -17,5 +17,5 @@ package ram // UsersInListUsers is a nested struct in ram response type UsersInListUsers struct { - User []User `json:"User" xml:"User"` + User []UserInListUsers `json:"User" xml:"User"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_users_for_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_users_for_group.go index 711484562..5df914974 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_users_for_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_users_in_list_users_for_group.go @@ -17,5 +17,5 @@ package ram // UsersInListUsersForGroup is a nested struct in ram response type UsersInListUsersForGroup struct { - User []User `json:"User" xml:"User"` + User []UserInListUsersForGroup `json:"User" xml:"User"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device_in_create_virtual_mfa_device.go similarity index 81% rename from vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device.go rename to vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device_in_create_virtual_mfa_device.go index f91b513cf..20b4ec2b8 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device_in_create_virtual_mfa_device.go @@ -15,11 +15,9 @@ package ram // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// VirtualMFADevice is a nested struct in ram response -type VirtualMFADevice struct { - QRCodePNG string `json:"QRCodePNG" xml:"QRCodePNG"` - ActivateDate string `json:"ActivateDate" xml:"ActivateDate"` - Base32StringSeed string `json:"Base32StringSeed" xml:"Base32StringSeed"` +// VirtualMFADeviceInCreateVirtualMFADevice is a nested struct in ram response +type VirtualMFADeviceInCreateVirtualMFADevice struct { SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` - User User `json:"User" xml:"User"` + Base32StringSeed string `json:"Base32StringSeed" xml:"Base32StringSeed"` + QRCodePNG string `json:"QRCodePNG" xml:"QRCodePNG"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device_in_list_virtual_mfa_devices.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device_in_list_virtual_mfa_devices.go new file mode 100644 index 000000000..427830b07 --- /dev/null +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_device_in_list_virtual_mfa_devices.go @@ -0,0 +1,23 @@ +package ram + +//Licensed under the Apache License, Version 2.0 (the "License"); +//you may not use this file except in compliance with the License. +//You may obtain a copy of the License at +// +//http://www.apache.org/licenses/LICENSE-2.0 +// +//Unless required by applicable law or agreed to in writing, software +//distributed under the License is distributed on an "AS IS" BASIS, +//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +//See the License for the specific language governing permissions and +//limitations under the License. +// +// Code generated by Alibaba Cloud SDK Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// VirtualMFADeviceInListVirtualMFADevices is a nested struct in ram response +type VirtualMFADeviceInListVirtualMFADevices struct { + SerialNumber string `json:"SerialNumber" xml:"SerialNumber"` + ActivateDate string `json:"ActivateDate" xml:"ActivateDate"` + User UserInListVirtualMFADevices `json:"User" xml:"User"` +} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_devices.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_devices.go index 675148a8e..71b374ff3 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_devices.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/struct_virtual_mfa_devices.go @@ -17,5 +17,5 @@ package ram // VirtualMFADevices is a nested struct in ram response type VirtualMFADevices struct { - VirtualMFADevice []VirtualMFADevice `json:"VirtualMFADevice" xml:"VirtualMFADevice"` + VirtualMFADevice []VirtualMFADeviceInListVirtualMFADevices `json:"VirtualMFADevice" xml:"VirtualMFADevice"` } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/unbind_mfa_device.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/unbind_mfa_device.go index 6f66d99e8..ef66f5adb 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/unbind_mfa_device.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/unbind_mfa_device.go @@ -82,8 +82,8 @@ type UnbindMFADeviceRequest struct { // UnbindMFADeviceResponse is the response struct for api UnbindMFADevice type UnbindMFADeviceResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - MFADevice MFADevice `json:"MFADevice" xml:"MFADevice"` + RequestId string `json:"RequestId" xml:"RequestId"` + MFADevice MFADeviceInUnbindMFADevice `json:"MFADevice" xml:"MFADevice"` } // CreateUnbindMFADeviceRequest creates a request to invoke UnbindMFADevice API @@ -91,7 +91,7 @@ func CreateUnbindMFADeviceRequest() (request *UnbindMFADeviceRequest) { request = &UnbindMFADeviceRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "UnbindMFADevice", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "UnbindMFADevice", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_access_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_access_key.go index 4e376619f..df72f78a5 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_access_key.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_access_key.go @@ -92,7 +92,7 @@ func CreateUpdateAccessKeyRequest() (request *UpdateAccessKeyRequest) { request = &UpdateAccessKeyRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "UpdateAccessKey", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "UpdateAccessKey", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_group.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_group.go index d8bf3201e..565defae4 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_group.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_group.go @@ -76,16 +76,16 @@ func (client *Client) UpdateGroupWithCallback(request *UpdateGroupRequest, callb // UpdateGroupRequest is the request struct for api UpdateGroup type UpdateGroupRequest struct { *requests.RpcRequest + GroupName string `position:"Query" name:"GroupName"` NewGroupName string `position:"Query" name:"NewGroupName"` NewComments string `position:"Query" name:"NewComments"` - GroupName string `position:"Query" name:"GroupName"` } // UpdateGroupResponse is the response struct for api UpdateGroup type UpdateGroupResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Group Group `json:"Group" xml:"Group"` + RequestId string `json:"RequestId" xml:"RequestId"` + Group GroupInUpdateGroup `json:"Group" xml:"Group"` } // CreateUpdateGroupRequest creates a request to invoke UpdateGroup API @@ -93,7 +93,7 @@ func CreateUpdateGroupRequest() (request *UpdateGroupRequest) { request = &UpdateGroupRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "UpdateGroup", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "UpdateGroup", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_login_profile.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_login_profile.go index cc2d80d04..54fea436c 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_login_profile.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_login_profile.go @@ -76,8 +76,8 @@ func (client *Client) UpdateLoginProfileWithCallback(request *UpdateLoginProfile // UpdateLoginProfileRequest is the request struct for api UpdateLoginProfile type UpdateLoginProfileRequest struct { *requests.RpcRequest - Password string `position:"Query" name:"Password"` PasswordResetRequired requests.Boolean `position:"Query" name:"PasswordResetRequired"` + Password string `position:"Query" name:"Password"` MFABindRequired requests.Boolean `position:"Query" name:"MFABindRequired"` UserName string `position:"Query" name:"UserName"` } @@ -93,7 +93,7 @@ func CreateUpdateLoginProfileRequest() (request *UpdateLoginProfileRequest) { request = &UpdateLoginProfileRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "UpdateLoginProfile", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "UpdateLoginProfile", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_public_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_public_key.go deleted file mode 100644 index a698eb837..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_public_key.go +++ /dev/null @@ -1,105 +0,0 @@ -package ram - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" -) - -// UpdatePublicKey invokes the ram.UpdatePublicKey API synchronously -// api document: https://help.aliyun.com/api/ram/updatepublickey.html -func (client *Client) UpdatePublicKey(request *UpdatePublicKeyRequest) (response *UpdatePublicKeyResponse, err error) { - response = CreateUpdatePublicKeyResponse() - err = client.DoAction(request, response) - return -} - -// UpdatePublicKeyWithChan invokes the ram.UpdatePublicKey API asynchronously -// api document: https://help.aliyun.com/api/ram/updatepublickey.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) UpdatePublicKeyWithChan(request *UpdatePublicKeyRequest) (<-chan *UpdatePublicKeyResponse, <-chan error) { - responseChan := make(chan *UpdatePublicKeyResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.UpdatePublicKey(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// UpdatePublicKeyWithCallback invokes the ram.UpdatePublicKey API asynchronously -// api document: https://help.aliyun.com/api/ram/updatepublickey.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) UpdatePublicKeyWithCallback(request *UpdatePublicKeyRequest, callback func(response *UpdatePublicKeyResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *UpdatePublicKeyResponse - var err error - defer close(result) - response, err = client.UpdatePublicKey(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// UpdatePublicKeyRequest is the request struct for api UpdatePublicKey -type UpdatePublicKeyRequest struct { - *requests.RpcRequest - UserPublicKeyId string `position:"Query" name:"UserPublicKeyId"` - UserName string `position:"Query" name:"UserName"` - Status string `position:"Query" name:"Status"` -} - -// UpdatePublicKeyResponse is the response struct for api UpdatePublicKey -type UpdatePublicKeyResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` -} - -// CreateUpdatePublicKeyRequest creates a request to invoke UpdatePublicKey API -func CreateUpdatePublicKeyRequest() (request *UpdatePublicKeyRequest) { - request = &UpdatePublicKeyRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ram", "2015-05-01", "UpdatePublicKey", "ram", "openAPI") - return -} - -// CreateUpdatePublicKeyResponse creates a response to parse from UpdatePublicKey response -func CreateUpdatePublicKeyResponse() (response *UpdatePublicKeyResponse) { - response = &UpdatePublicKeyResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_role.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_role.go index 6f2b4af0c..583e3cc61 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_role.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_role.go @@ -76,15 +76,16 @@ func (client *Client) UpdateRoleWithCallback(request *UpdateRoleRequest, callbac // UpdateRoleRequest is the request struct for api UpdateRole type UpdateRoleRequest struct { *requests.RpcRequest - NewAssumeRolePolicyDocument string `position:"Query" name:"NewAssumeRolePolicyDocument"` - RoleName string `position:"Query" name:"RoleName"` + NewAssumeRolePolicyDocument string `position:"Query" name:"NewAssumeRolePolicyDocument"` + RoleName string `position:"Query" name:"RoleName"` + NewMaxSessionDuration requests.Integer `position:"Query" name:"NewMaxSessionDuration"` } // UpdateRoleResponse is the response struct for api UpdateRole type UpdateRoleResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Role Role `json:"Role" xml:"Role"` + RequestId string `json:"RequestId" xml:"RequestId"` + Role RoleInUpdateRole `json:"Role" xml:"Role"` } // CreateUpdateRoleRequest creates a request to invoke UpdateRole API @@ -92,7 +93,7 @@ func CreateUpdateRoleRequest() (request *UpdateRoleRequest) { request = &UpdateRoleRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "UpdateRole", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "UpdateRole", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_user.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_user.go index 1c8f16a37..9902b4623 100644 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_user.go +++ b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/update_user.go @@ -77,18 +77,18 @@ func (client *Client) UpdateUserWithCallback(request *UpdateUserRequest, callbac type UpdateUserRequest struct { *requests.RpcRequest NewUserName string `position:"Query" name:"NewUserName"` - NewDisplayName string `position:"Query" name:"NewDisplayName"` NewMobilePhone string `position:"Query" name:"NewMobilePhone"` - NewComments string `position:"Query" name:"NewComments"` NewEmail string `position:"Query" name:"NewEmail"` + NewDisplayName string `position:"Query" name:"NewDisplayName"` + NewComments string `position:"Query" name:"NewComments"` UserName string `position:"Query" name:"UserName"` } // UpdateUserResponse is the response struct for api UpdateUser type UpdateUserResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - User User `json:"User" xml:"User"` + RequestId string `json:"RequestId" xml:"RequestId"` + User UserInUpdateUser `json:"User" xml:"User"` } // CreateUpdateUserRequest creates a request to invoke UpdateUser API @@ -96,7 +96,7 @@ func CreateUpdateUserRequest() (request *UpdateUserRequest) { request = &UpdateUserRequest{ RpcRequest: &requests.RpcRequest{}, } - request.InitWithApiInfo("Ram", "2015-05-01", "UpdateUser", "ram", "openAPI") + request.InitWithApiInfo("Ram", "2015-05-01", "UpdateUser", "Ram", "openAPI") return } diff --git a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/upload_public_key.go b/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/upload_public_key.go deleted file mode 100644 index 3bd708870..000000000 --- a/vendor/github.com/aliyun/alibaba-cloud-sdk-go/services/ram/upload_public_key.go +++ /dev/null @@ -1,105 +0,0 @@ -package ram - -//Licensed under the Apache License, Version 2.0 (the "License"); -//you may not use this file except in compliance with the License. -//You may obtain a copy of the License at -// -//http://www.apache.org/licenses/LICENSE-2.0 -// -//Unless required by applicable law or agreed to in writing, software -//distributed under the License is distributed on an "AS IS" BASIS, -//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//See the License for the specific language governing permissions and -//limitations under the License. -// -// Code generated by Alibaba Cloud SDK Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests" - "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses" -) - -// UploadPublicKey invokes the ram.UploadPublicKey API synchronously -// api document: https://help.aliyun.com/api/ram/uploadpublickey.html -func (client *Client) UploadPublicKey(request *UploadPublicKeyRequest) (response *UploadPublicKeyResponse, err error) { - response = CreateUploadPublicKeyResponse() - err = client.DoAction(request, response) - return -} - -// UploadPublicKeyWithChan invokes the ram.UploadPublicKey API asynchronously -// api document: https://help.aliyun.com/api/ram/uploadpublickey.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) UploadPublicKeyWithChan(request *UploadPublicKeyRequest) (<-chan *UploadPublicKeyResponse, <-chan error) { - responseChan := make(chan *UploadPublicKeyResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.UploadPublicKey(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// UploadPublicKeyWithCallback invokes the ram.UploadPublicKey API asynchronously -// api document: https://help.aliyun.com/api/ram/uploadpublickey.html -// asynchronous document: https://help.aliyun.com/document_detail/66220.html -func (client *Client) UploadPublicKeyWithCallback(request *UploadPublicKeyRequest, callback func(response *UploadPublicKeyResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *UploadPublicKeyResponse - var err error - defer close(result) - response, err = client.UploadPublicKey(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// UploadPublicKeyRequest is the request struct for api UploadPublicKey -type UploadPublicKeyRequest struct { - *requests.RpcRequest - PublicKeySpec string `position:"Query" name:"PublicKeySpec"` - UserName string `position:"Query" name:"UserName"` -} - -// UploadPublicKeyResponse is the response struct for api UploadPublicKey -type UploadPublicKeyResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - PublicKey PublicKey `json:"PublicKey" xml:"PublicKey"` -} - -// CreateUploadPublicKeyRequest creates a request to invoke UploadPublicKey API -func CreateUploadPublicKeyRequest() (request *UploadPublicKeyRequest) { - request = &UploadPublicKeyRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("Ram", "2015-05-01", "UploadPublicKey", "ram", "openAPI") - return -} - -// CreateUploadPublicKeyResponse creates a response to parse from UploadPublicKey response -func CreateUploadPublicKeyResponse() (response *UploadPublicKeyResponse) { - response = &UploadPublicKeyResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/LICENSE b/vendor/github.com/aliyun/aliyun-oss-go-sdk/LICENSE new file mode 100644 index 000000000..d46e9d128 --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2015 aliyun.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/auth.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/auth.go index 02c1f144e..bc1e4fa3f 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/auth.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/auth.go @@ -4,59 +4,157 @@ import ( "bytes" "crypto/hmac" "crypto/sha1" + "crypto/sha256" "encoding/base64" + "fmt" "hash" "io" "net/http" "sort" + "strconv" "strings" ) -// 用于signHeader的字典排序存放容器。 +// headerSorter defines the key-value structure for storing the sorted data in signHeader. type headerSorter struct { Keys []string Vals []string } -// 生成签名方法(直接设置请求的Header)。 -func (conn Conn) signHeader(req *http.Request, canonicalizedResource string) { - // Find out the "x-oss-"'s address in this request'header - temp := make(map[string]string) +// getAdditionalHeaderKeys get exist key in http header +func (conn Conn) getAdditionalHeaderKeys(req *http.Request) ([]string, map[string]string) { + var keysList []string + keysMap := make(map[string]string) + srcKeys := make(map[string]string) - for k, v := range req.Header { - if strings.HasPrefix(strings.ToLower(k), "x-oss-") { - temp[strings.ToLower(k)] = v[0] + for k := range req.Header { + srcKeys[strings.ToLower(k)] = "" + } + + for _, v := range conn.config.AdditionalHeaders { + if _, ok := srcKeys[strings.ToLower(v)]; ok { + keysMap[strings.ToLower(v)] = "" } } - hs := newHeaderSorter(temp) - // Sort the temp by the Ascending Order + for k := range keysMap { + keysList = append(keysList, k) + } + sort.Strings(keysList) + return keysList, keysMap +} + +// signHeader signs the header and sets it as the authorization header. +func (conn Conn) signHeader(req *http.Request, canonicalizedResource string) { + akIf := conn.config.GetCredentials() + authorizationStr := "" + if conn.config.AuthVersion == AuthV2 { + additionalList, _ := conn.getAdditionalHeaderKeys(req) + if len(additionalList) > 0 { + authorizationFmt := "OSS2 AccessKeyId:%v,AdditionalHeaders:%v,Signature:%v" + additionnalHeadersStr := strings.Join(additionalList, ";") + authorizationStr = fmt.Sprintf(authorizationFmt, akIf.GetAccessKeyID(), additionnalHeadersStr, conn.getSignedStr(req, canonicalizedResource, akIf.GetAccessKeySecret())) + } else { + authorizationFmt := "OSS2 AccessKeyId:%v,Signature:%v" + authorizationStr = fmt.Sprintf(authorizationFmt, akIf.GetAccessKeyID(), conn.getSignedStr(req, canonicalizedResource, akIf.GetAccessKeySecret())) + } + } else { + // Get the final authorization string + authorizationStr = "OSS " + akIf.GetAccessKeyID() + ":" + conn.getSignedStr(req, canonicalizedResource, akIf.GetAccessKeySecret()) + } + + // Give the parameter "Authorization" value + req.Header.Set(HTTPHeaderAuthorization, authorizationStr) +} + +func (conn Conn) getSignedStr(req *http.Request, canonicalizedResource string, keySecret string) string { + // Find out the "x-oss-"'s address in header of the request + ossHeadersMap := make(map[string]string) + additionalList, additionalMap := conn.getAdditionalHeaderKeys(req) + for k, v := range req.Header { + if strings.HasPrefix(strings.ToLower(k), "x-oss-") { + ossHeadersMap[strings.ToLower(k)] = v[0] + } else if conn.config.AuthVersion == AuthV2 { + if _, ok := additionalMap[strings.ToLower(k)]; ok { + ossHeadersMap[strings.ToLower(k)] = v[0] + } + } + } + hs := newHeaderSorter(ossHeadersMap) + + // Sort the ossHeadersMap by the ascending order hs.Sort() - // Get the CanonicalizedOSSHeaders + // Get the canonicalizedOSSHeaders canonicalizedOSSHeaders := "" for i := range hs.Keys { canonicalizedOSSHeaders += hs.Keys[i] + ":" + hs.Vals[i] + "\n" } // Give other parameters values + // when sign URL, date is expires date := req.Header.Get(HTTPHeaderDate) contentType := req.Header.Get(HTTPHeaderContentType) contentMd5 := req.Header.Get(HTTPHeaderContentMD5) + // default is v1 signature signStr := req.Method + "\n" + contentMd5 + "\n" + contentType + "\n" + date + "\n" + canonicalizedOSSHeaders + canonicalizedResource - h := hmac.New(func() hash.Hash { return sha1.New() }, []byte(conn.config.AccessKeySecret)) + h := hmac.New(func() hash.Hash { return sha1.New() }, []byte(keySecret)) + + // v2 signature + if conn.config.AuthVersion == AuthV2 { + signStr = req.Method + "\n" + contentMd5 + "\n" + contentType + "\n" + date + "\n" + canonicalizedOSSHeaders + strings.Join(additionalList, ";") + "\n" + canonicalizedResource + h = hmac.New(func() hash.Hash { return sha256.New() }, []byte(keySecret)) + } + + // convert sign to log for easy to view + if conn.config.LogLevel >= Debug { + var signBuf bytes.Buffer + for i := 0; i < len(signStr); i++ { + if signStr[i] != '\n' { + signBuf.WriteByte(signStr[i]) + } else { + signBuf.WriteString("\\n") + } + } + conn.config.WriteLog(Debug, "[Req:%p]signStr:%s\n", req, signBuf.String()) + } + io.WriteString(h, signStr) signedStr := base64.StdEncoding.EncodeToString(h.Sum(nil)) - // Get the final Authorization' string - authorizationStr := "OSS " + conn.config.AccessKeyID + ":" + signedStr - - // Give the parameter "Authorization" value - req.Header.Set(HTTPHeaderAuthorization, authorizationStr) + return signedStr } -// Additional function for function SignHeader. +func (conn Conn) getRtmpSignedStr(bucketName, channelName, playlistName string, expiration int64, keySecret string, params map[string]interface{}) string { + if params[HTTPParamAccessKeyID] == nil { + return "" + } + + canonResource := fmt.Sprintf("/%s/%s", bucketName, channelName) + canonParamsKeys := []string{} + for key := range params { + if key != HTTPParamAccessKeyID && key != HTTPParamSignature && key != HTTPParamExpires && key != HTTPParamSecurityToken { + canonParamsKeys = append(canonParamsKeys, key) + } + } + + sort.Strings(canonParamsKeys) + canonParamsStr := "" + for _, key := range canonParamsKeys { + canonParamsStr = fmt.Sprintf("%s%s:%s\n", canonParamsStr, key, params[key].(string)) + } + + expireStr := strconv.FormatInt(expiration, 10) + signStr := expireStr + "\n" + canonParamsStr + canonResource + + h := hmac.New(func() hash.Hash { return sha1.New() }, []byte(keySecret)) + io.WriteString(h, signStr) + signedStr := base64.StdEncoding.EncodeToString(h.Sum(nil)) + return signedStr +} + +// newHeaderSorter is an additional function for function SignHeader. func newHeaderSorter(m map[string]string) *headerSorter { hs := &headerSorter{ Keys: make([]string, 0, len(m)), @@ -70,22 +168,22 @@ func newHeaderSorter(m map[string]string) *headerSorter { return hs } -// Additional function for function SignHeader. +// Sort is an additional function for function SignHeader. func (hs *headerSorter) Sort() { sort.Sort(hs) } -// Additional function for function SignHeader. +// Len is an additional function for function SignHeader. func (hs *headerSorter) Len() int { return len(hs.Vals) } -// Additional function for function SignHeader. +// Less is an additional function for function SignHeader. func (hs *headerSorter) Less(i, j int) bool { return bytes.Compare([]byte(hs.Keys[i]), []byte(hs.Keys[j])) < 0 } -// Additional function for function SignHeader. +// Swap is an additional function for function SignHeader. func (hs *headerSorter) Swap(i, j int) { hs.Vals[i], hs.Vals[j] = hs.Vals[j], hs.Vals[i] hs.Keys[i], hs.Keys[j] = hs.Keys[j], hs.Keys[i] diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/bucket.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/bucket.go index 1da3c0765..430252c02 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/bucket.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/bucket.go @@ -5,14 +5,16 @@ import ( "crypto/md5" "encoding/base64" "encoding/xml" + "fmt" "hash" "hash/crc64" "io" - "io/ioutil" "net/http" "net/url" "os" "strconv" + "strings" + "time" ) // Bucket implements the operations of object. @@ -21,19 +23,18 @@ type Bucket struct { BucketName string } +// PutObject creates a new object and it will overwrite the original one if it exists already. // -// PutObject 新建Object,如果Object已存在,覆盖原有Object。 +// objectKey the object key in UTF-8 encoding. The length must be between 1 and 1023, and cannot start with "/" or "\". +// reader io.Reader instance for reading the data for uploading +// options the options for uploading the object. The valid options here are CacheControl, ContentDisposition, ContentEncoding +// Expires, ServerSideEncryption, ObjectACL and Meta. Refer to the link below for more details. +// https://help.aliyun.com/document_detail/oss/api-reference/object/PutObject.html // -// objectKey 上传对象的名称,使用UTF-8编码、长度必须在1-1023字节之间、不能以“/”或者“\”字符开头。 -// reader io.Reader读取object的数据。 -// options 上传对象时可以指定对象的属性,可用选项有CacheControl、ContentDisposition、ContentEncoding、 -// Expires、ServerSideEncryption、ObjectACL、Meta,具体含义请参看 -// https://help.aliyun.com/document_detail/oss/api-reference/object/PutObject.html -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) PutObject(objectKey string, reader io.Reader, options ...Option) error { - opts := addContentType(options, objectKey) + opts := AddContentType(options, objectKey) request := &PutObjectRequest{ ObjectKey: objectKey, @@ -48,14 +49,13 @@ func (bucket Bucket) PutObject(objectKey string, reader io.Reader, options ...Op return err } +// PutObjectFromFile creates a new object from the local file. // -// PutObjectFromFile 新建Object,内容从本地文件中读取。 +// objectKey object key. +// filePath the local file path to upload. +// options the options for uploading the object. Refer to the parameter options in PutObject for more details. // -// objectKey 上传对象的名称。 -// filePath 本地文件,上传对象的值为该文件内容。 -// options 上传对象时可以指定对象的属性。详见PutObject的options。 -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) PutObjectFromFile(objectKey, filePath string, options ...Option) error { fd, err := os.Open(filePath) @@ -64,7 +64,7 @@ func (bucket Bucket) PutObjectFromFile(objectKey, filePath string, options ...Op } defer fd.Close() - opts := addContentType(options, filePath, objectKey) + opts := AddContentType(options, filePath, objectKey) request := &PutObjectRequest{ ObjectKey: objectKey, @@ -79,96 +79,100 @@ func (bucket Bucket) PutObjectFromFile(objectKey, filePath string, options ...Op return err } +// DoPutObject does the actual upload work. // -// DoPutObject 上传文件。 +// request the request instance for uploading an object. +// options the options for uploading an object. // -// request 上传请求。 -// options 上传选项。 -// -// Response 上传请求返回值。 -// error 操作无错误为nil,非nil为错误信息。 +// Response the response from OSS. +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) DoPutObject(request *PutObjectRequest, options []Option) (*Response, error) { - isOptSet, _, _ := isOptionSet(options, HTTPHeaderContentType) + isOptSet, _, _ := IsOptionSet(options, HTTPHeaderContentType) if !isOptSet { - options = addContentType(options, request.ObjectKey) + options = AddContentType(options, request.ObjectKey) } - listener := getProgressListener(options) + listener := GetProgressListener(options) - resp, err := bucket.do("PUT", request.ObjectKey, "", "", options, request.Reader, listener) + params := map[string]interface{}{} + resp, err := bucket.do("PUT", request.ObjectKey, params, options, request.Reader, listener) if err != nil { return nil, err } - if bucket.getConfig().IsEnableCRC { - err = checkCRC(resp, "DoPutObject") + if bucket.GetConfig().IsEnableCRC { + err = CheckCRC(resp, "DoPutObject") if err != nil { return resp, err } } - err = checkRespCode(resp.StatusCode, []int{http.StatusOK}) + err = CheckRespCode(resp.StatusCode, []int{http.StatusOK}) return resp, err } +// GetObject downloads the object. // -// GetObject 下载文件。 +// objectKey the object key. +// options the options for downloading the object. The valid values are: Range, IfModifiedSince, IfUnmodifiedSince, IfMatch, +// IfNoneMatch, AcceptEncoding. For more details, please check out: +// https://help.aliyun.com/document_detail/oss/api-reference/object/GetObject.html // -// objectKey 下载的文件名称。 -// options 对象的属性限制项,可选值有Range、IfModifiedSince、IfUnmodifiedSince、IfMatch、 -// IfNoneMatch、AcceptEncoding,详细请参考 -// https://help.aliyun.com/document_detail/oss/api-reference/object/GetObject.html -// -// io.ReadCloser reader,读取数据后需要close。error为nil时有效。 -// error 操作无错误为nil,非nil为错误信息。 +// io.ReadCloser reader instance for reading data from response. It must be called close() after the usage and only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) GetObject(objectKey string, options ...Option) (io.ReadCloser, error) { result, err := bucket.DoGetObject(&GetObjectRequest{objectKey}, options) if err != nil { return nil, err } - return result.Response.Body, nil + + return result.Response, nil } +// GetObjectToFile downloads the data to a local file. // -// GetObjectToFile 下载文件。 +// objectKey the object key to download. +// filePath the local file to store the object data. +// options the options for downloading the object. Refer to the parameter options in method GetObject for more details. // -// objectKey 下载的文件名称。 -// filePath 下载对象的内容写到该本地文件。 -// options 对象的属性限制项。详见GetObject的options。 -// -// error 操作无错误时返回error为nil,非nil为错误说明。 +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) GetObjectToFile(objectKey, filePath string, options ...Option) error { tempFilePath := filePath + TempFileSuffix - // 读取Object内容 + // Calls the API to actually download the object. Returns the result instance. result, err := bucket.DoGetObject(&GetObjectRequest{objectKey}, options) if err != nil { return err } - defer result.Response.Body.Close() + defer result.Response.Close() - // 如果文件不存在则创建,存在则清空 + // If the local file does not exist, create a new one. If it exists, overwrite it. fd, err := os.OpenFile(tempFilePath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, FilePermMode) if err != nil { return err } - // 存储数据到文件 + // Copy the data to the local file path. _, err = io.Copy(fd, result.Response.Body) fd.Close() if err != nil { return err } - // 比较CRC值 - hasRange, _, _ := isOptionSet(options, HTTPHeaderRange) - if bucket.getConfig().IsEnableCRC && !hasRange { + // Compares the CRC value + hasRange, _, _ := IsOptionSet(options, HTTPHeaderRange) + encodeOpt, _ := FindOption(options, HTTPHeaderAcceptEncoding, nil) + acceptEncoding := "" + if encodeOpt != nil { + acceptEncoding = encodeOpt.(string) + } + if bucket.GetConfig().IsEnableCRC && !hasRange && acceptEncoding != "gzip" { result.Response.ClientCRC = result.ClientCRC.Sum64() - err = checkCRC(result.Response, "GetObjectToFile") + err = CheckCRC(result.Response, "GetObjectToFile") if err != nil { os.Remove(tempFilePath) return err @@ -178,17 +182,17 @@ func (bucket Bucket) GetObjectToFile(objectKey, filePath string, options ...Opti return os.Rename(tempFilePath, filePath) } +// DoGetObject is the actual API that gets the object. It's the internal function called by other public APIs. // -// DoGetObject 下载文件 +// request the request to download the object. +// options the options for downloading the file. Checks out the parameter options in method GetObject. // -// request 下载请求 -// options 对象的属性限制项。详见GetObject的options。 -// -// GetObjectResult 下载请求返回值。 -// error 操作无错误为nil,非nil为错误信息。 +// GetObjectResult the result instance of getting the object. +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) DoGetObject(request *GetObjectRequest, options []Option) (*GetObjectResult, error) { - resp, err := bucket.do("GET", request.ObjectKey, "", "", options, nil, nil) + params, _ := GetRawParams(options) + resp, err := bucket.do("GET", request.ObjectKey, params, options, nil, nil) if err != nil { return nil, err } @@ -197,41 +201,51 @@ func (bucket Bucket) DoGetObject(request *GetObjectRequest, options []Option) (* Response: resp, } - // crc + // CRC var crcCalc hash.Hash64 - hasRange, _, _ := isOptionSet(options, HTTPHeaderRange) - if bucket.getConfig().IsEnableCRC && !hasRange { - crcCalc = crc64.New(crcTable()) + hasRange, _, _ := IsOptionSet(options, HTTPHeaderRange) + if bucket.GetConfig().IsEnableCRC && !hasRange { + crcCalc = crc64.New(CrcTable()) result.ServerCRC = resp.ServerCRC result.ClientCRC = crcCalc } - // progress - listener := getProgressListener(options) + // Progress + listener := GetProgressListener(options) contentLen, _ := strconv.ParseInt(resp.Headers.Get(HTTPHeaderContentLength), 10, 64) - resp.Body = ioutil.NopCloser(TeeReader(resp.Body, crcCalc, contentLen, listener, nil)) + resp.Body = TeeReader(resp.Body, crcCalc, contentLen, listener, nil) return result, nil } +// CopyObject copies the object inside the bucket. // -// CopyObject 同一个bucket内拷贝Object。 +// srcObjectKey the source object to copy. +// destObjectKey the target object to copy. +// options options for copying an object. You can specify the conditions of copy. The valid conditions are CopySourceIfMatch, +// CopySourceIfNoneMatch, CopySourceIfModifiedSince, CopySourceIfUnmodifiedSince, MetadataDirective. +// Also you can specify the target object's attributes, such as CacheControl, ContentDisposition, ContentEncoding, Expires, +// ServerSideEncryption, ObjectACL, Meta. Refer to the link below for more details : +// https://help.aliyun.com/document_detail/oss/api-reference/object/CopyObject.html // -// srcObjectKey Copy的源对象。 -// destObjectKey Copy的目标对象。 -// options Copy对象时,您可以指定源对象的限制条件,满足限制条件时copy,不满足时返回错误,您可以选择如下选项CopySourceIfMatch、 -// CopySourceIfNoneMatch、CopySourceIfModifiedSince、CopySourceIfUnmodifiedSince、MetadataDirective。 -// Copy对象时,您可以指定目标对象的属性,如CacheControl、ContentDisposition、ContentEncoding、Expires、 -// ServerSideEncryption、ObjectACL、Meta,选项的含义请参看 -// https://help.aliyun.com/document_detail/oss/api-reference/object/CopyObject.html -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) CopyObject(srcObjectKey, destObjectKey string, options ...Option) (CopyObjectResult, error) { var out CopyObjectResult - options = append(options, CopySource(bucket.BucketName, url.QueryEscape(srcObjectKey))) - resp, err := bucket.do("PUT", destObjectKey, "", "", options, nil, nil) + + //first find version id + versionIdKey := "versionId" + versionId, _ := FindOption(options, versionIdKey, nil) + if versionId == nil { + options = append(options, CopySource(bucket.BucketName, url.QueryEscape(srcObjectKey))) + } else { + options = DeleteOption(options, versionIdKey) + options = append(options, CopySourceVersion(bucket.BucketName, url.QueryEscape(srcObjectKey), versionId.(string))) + } + + params := map[string]interface{}{} + resp, err := bucket.do("PUT", destObjectKey, params, options, nil, nil) if err != nil { return out, err } @@ -241,29 +255,28 @@ func (bucket Bucket) CopyObject(srcObjectKey, destObjectKey string, options ...O return out, err } +// CopyObjectTo copies the object to another bucket. // -// CopyObjectTo bucket间拷贝object。 +// srcObjectKey source object key. The source bucket is Bucket.BucketName . +// destBucketName target bucket name. +// destObjectKey target object name. +// options copy options, check out parameter options in function CopyObject for more details. // -// srcObjectKey 源Object名称。源Bucket名称为Bucket.BucketName。 -// destBucketName 目标Bucket名称。 -// destObjectKey 目标Object名称。 -// options Copy选项,详见CopyObject的options。 -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) CopyObjectTo(destBucketName, destObjectKey, srcObjectKey string, options ...Option) (CopyObjectResult, error) { return bucket.copy(srcObjectKey, destBucketName, destObjectKey, options...) } // -// CopyObjectFrom bucket间拷贝object。 +// CopyObjectFrom copies the object to another bucket. // -// srcBucketName 源Bucket名称。 -// srcObjectKey 源Object名称。 -// destObjectKey 目标Object名称。目标Bucket名称为Bucket.BucketName。 -// options Copy选项,详见CopyObject的options。 +// srcBucketName source bucket name. +// srcObjectKey source object name. +// destObjectKey target object name. The target bucket name is Bucket.BucketName. +// options copy options. Check out parameter options in function CopyObject. // -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) CopyObjectFrom(srcBucketName, srcObjectKey, destObjectKey string, options ...Option) (CopyObjectResult, error) { destBucketName := bucket.BucketName @@ -278,13 +291,32 @@ func (bucket Bucket) CopyObjectFrom(srcBucketName, srcObjectKey, destObjectKey s func (bucket Bucket) copy(srcObjectKey, destBucketName, destObjectKey string, options ...Option) (CopyObjectResult, error) { var out CopyObjectResult - options = append(options, CopySource(bucket.BucketName, url.QueryEscape(srcObjectKey))) + + //first find version id + versionIdKey := "versionId" + versionId, _ := FindOption(options, versionIdKey, nil) + if versionId == nil { + options = append(options, CopySource(bucket.BucketName, url.QueryEscape(srcObjectKey))) + } else { + options = DeleteOption(options, versionIdKey) + options = append(options, CopySourceVersion(bucket.BucketName, url.QueryEscape(srcObjectKey), versionId.(string))) + } + headers := make(map[string]string) err := handleOptions(headers, options) if err != nil { return out, err } - resp, err := bucket.Client.Conn.Do("PUT", destBucketName, destObjectKey, "", "", headers, nil, 0, nil) + params := map[string]interface{}{} + resp, err := bucket.Client.Conn.Do("PUT", destBucketName, destObjectKey, params, headers, nil, 0, nil) + + // get response header + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil { + pRespHeader := respHeader.(*http.Header) + *pRespHeader = resp.Headers + } + if err != nil { return out, err } @@ -294,22 +326,21 @@ func (bucket Bucket) copy(srcObjectKey, destBucketName, destObjectKey string, op return out, err } +// AppendObject uploads the data in the way of appending an existing or new object. // -// AppendObject 追加方式上传。 +// AppendObject the parameter appendPosition specifies which postion (in the target object) to append. For the first append (to a non-existing file), +// the appendPosition should be 0. The appendPosition in the subsequent calls will be the current object length. +// For example, the first appendObject's appendPosition is 0 and it uploaded 65536 bytes data, then the second call's position is 65536. +// The response header x-oss-next-append-position after each successful request also specifies the next call's append position (so the caller need not to maintain this information). // -// AppendObject参数必须包含position,其值指定从何处进行追加。首次追加操作的position必须为0, -// 后续追加操作的position是Object的当前长度。例如,第一次Append Object请求指定position值为0, -// content-length是65536;那么,第二次Append Object需要指定position为65536。 -// 每次操作成功后,响应头部x-oss-next-append-position也会标明下一次追加的position。 +// objectKey the target object to append to. +// reader io.Reader. The read instance for reading the data to append. +// appendPosition the start position to append. +// destObjectProperties the options for the first appending, such as CacheControl, ContentDisposition, ContentEncoding, +// Expires, ServerSideEncryption, ObjectACL. // -// objectKey 需要追加的Object。 -// reader io.Reader,读取追的内容。 -// appendPosition object追加的起始位置。 -// destObjectProperties 第一次追加时指定新对象的属性,如CacheControl、ContentDisposition、ContentEncoding、 -// Expires、ServerSideEncryption、ObjectACL。 -// -// int64 下次追加的开始位置,error为nil空时有效。 -// error 操作无错误为nil,非nil为错误信息。 +// int64 the next append position, it's valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) AppendObject(objectKey string, reader io.Reader, appendPosition int64, options ...Option) (int64, error) { request := &AppendObjectRequest{ @@ -319,37 +350,49 @@ func (bucket Bucket) AppendObject(objectKey string, reader io.Reader, appendPosi } result, err := bucket.DoAppendObject(request, options) + if err != nil { + return appendPosition, err + } return result.NextPosition, err } +// DoAppendObject is the actual API that does the object append. // -// DoAppendObject 追加上传。 +// request the request object for appending object. +// options the options for appending object. // -// request 追加上传请求。 -// options 追加上传选项。 -// -// AppendObjectResult 追加上传请求返回值。 -// error 操作无错误为nil,非nil为错误信息。 +// AppendObjectResult the result object for appending object. +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) DoAppendObject(request *AppendObjectRequest, options []Option) (*AppendObjectResult, error) { - params := "append&position=" + strconv.FormatInt(request.Position, 10) + params := map[string]interface{}{} + params["append"] = nil + params["position"] = strconv.FormatInt(request.Position, 10) headers := make(map[string]string) - opts := addContentType(options, request.ObjectKey) + opts := AddContentType(options, request.ObjectKey) handleOptions(headers, opts) var initCRC uint64 - isCRCSet, initCRCOpt, _ := isOptionSet(options, initCRC64) + isCRCSet, initCRCOpt, _ := IsOptionSet(options, initCRC64) if isCRCSet { initCRC = initCRCOpt.(uint64) } - listener := getProgressListener(options) + listener := GetProgressListener(options) handleOptions(headers, opts) - resp, err := bucket.Client.Conn.Do("POST", bucket.BucketName, request.ObjectKey, params, params, headers, + resp, err := bucket.Client.Conn.Do("POST", bucket.BucketName, request.ObjectKey, params, headers, request.Reader, initCRC, listener) + + // get response header + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil { + pRespHeader := respHeader.(*http.Header) + *pRespHeader = resp.Headers + } + if err != nil { return nil, err } @@ -361,8 +404,8 @@ func (bucket Bucket) DoAppendObject(request *AppendObjectRequest, options []Opti CRC: resp.ServerCRC, } - if bucket.getConfig().IsEnableCRC && isCRCSet { - err = checkCRC(resp, "AppendObject") + if bucket.GetConfig().IsEnableCRC && isCRCSet { + err = CheckCRC(resp, "AppendObject") if err != nil { return result, err } @@ -371,30 +414,30 @@ func (bucket Bucket) DoAppendObject(request *AppendObjectRequest, options []Opti return result, nil } +// DeleteObject deletes the object. // -// DeleteObject 删除Object。 +// objectKey the object key to delete. // -// objectKey 待删除Object。 +// error it's nil if no error, otherwise it's an error object. // -// error 操作无错误为nil,非nil为错误信息。 -// -func (bucket Bucket) DeleteObject(objectKey string) error { - resp, err := bucket.do("DELETE", objectKey, "", "", nil, nil, nil) +func (bucket Bucket) DeleteObject(objectKey string, options ...Option) error { + params, _ := GetRawParams(options) + resp, err := bucket.do("DELETE", objectKey, params, options, nil, nil) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusNoContent}) + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) } +// DeleteObjects deletes multiple objects. // -// DeleteObjects 批量删除object。 +// objectKeys the object keys to delete. +// options the options for deleting objects. +// Supported option is DeleteObjectsQuiet which means it will not return error even deletion failed (not recommended). By default it's not used. // -// objectKeys 待删除object类表。 -// options 删除选项,DeleteObjectsQuiet,是否是安静模式,默认不使用。 -// -// DeleteObjectsResult 非安静模式的的返回值。 -// error 操作无错误为nil,非nil为错误信息。 +// DeleteObjectsResult the result object. +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) DeleteObjects(objectKeys []string, options ...Option) (DeleteObjectsResult, error) { out := DeleteObjectsResult{} @@ -402,9 +445,9 @@ func (bucket Bucket) DeleteObjects(objectKeys []string, options ...Option) (Dele for _, key := range objectKeys { dxml.Objects = append(dxml.Objects, DeleteObject{Key: key}) } - isQuiet, _ := findOption(options, deleteObjectsQuiet, false) + + isQuiet, _ := FindOption(options, deleteObjectsQuiet, false) dxml.Quiet = isQuiet.(bool) - encode := "&encoding-type=url" bs, err := xml.Marshal(dxml) if err != nil { @@ -418,7 +461,68 @@ func (bucket Bucket) DeleteObjects(objectKeys []string, options ...Option) (Dele sum := md5.Sum(bs) b64 := base64.StdEncoding.EncodeToString(sum[:]) options = append(options, ContentMD5(b64)) - resp, err := bucket.do("POST", "", "delete"+encode, "delete", options, buffer, nil) + + params := map[string]interface{}{} + params["delete"] = nil + params["encoding-type"] = "url" + + resp, err := bucket.do("POST", "", params, options, buffer, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + deletedResult := DeleteObjectVersionsResult{} + if !dxml.Quiet { + if err = xmlUnmarshal(resp.Body, &deletedResult); err == nil { + err = decodeDeleteObjectsResult(&deletedResult) + } + } + + // Keep compatibility:need convert to struct DeleteObjectsResult + out.XMLName = deletedResult.XMLName + for _, v := range deletedResult.DeletedObjectsDetail { + out.DeletedObjects = append(out.DeletedObjects, v.Key) + } + + return out, err +} + +// DeleteObjectVersions deletes multiple object versions. +// +// objectVersions the object keys and versions to delete. +// options the options for deleting objects. +// Supported option is DeleteObjectsQuiet which means it will not return error even deletion failed (not recommended). By default it's not used. +// +// DeleteObjectVersionsResult the result object. +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) DeleteObjectVersions(objectVersions []DeleteObject, options ...Option) (DeleteObjectVersionsResult, error) { + out := DeleteObjectVersionsResult{} + dxml := deleteXML{} + dxml.Objects = objectVersions + + isQuiet, _ := FindOption(options, deleteObjectsQuiet, false) + dxml.Quiet = isQuiet.(bool) + + bs, err := xml.Marshal(dxml) + if err != nil { + return out, err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + options = append(options, ContentType(contentType)) + sum := md5.Sum(bs) + b64 := base64.StdEncoding.EncodeToString(sum[:]) + options = append(options, ContentMD5(b64)) + + params := map[string]interface{}{} + params["delete"] = nil + params["encoding-type"] = "url" + + resp, err := bucket.do("POST", "", params, options, buffer, nil) if err != nil { return out, err } @@ -432,54 +536,58 @@ func (bucket Bucket) DeleteObjects(objectKeys []string, options ...Option) (Dele return out, err } +// IsObjectExist checks if the object exists. // -// IsObjectExist object是否存在。 +// bool flag of object's existence (true:exists; false:non-exist) when error is nil. // -// bool object是否存在,true存在,false不存在。error为nil时有效。 +// error it's nil if no error, otherwise it's an error object. // -// error 操作无错误为nil,非nil为错误信息。 -// -func (bucket Bucket) IsObjectExist(objectKey string) (bool, error) { - listRes, err := bucket.ListObjects(Prefix(objectKey), MaxKeys(1)) - if err != nil { - return false, err - } - - if len(listRes.Objects) == 1 && listRes.Objects[0].Key == objectKey { +func (bucket Bucket) IsObjectExist(objectKey string, options ...Option) (bool, error) { + _, err := bucket.GetObjectMeta(objectKey, options...) + if err == nil { return true, nil } - return false, nil + + switch err.(type) { + case ServiceError: + if err.(ServiceError).StatusCode == 404 { + return false, nil + } + } + + return false, err } +// ListObjects lists the objects under the current bucket. // -// ListObjects 获得Bucket下筛选后所有的object的列表。 +// options it contains all the filters for listing objects. +// It could specify a prefix filter on object keys, the max keys count to return and the object key marker and the delimiter for grouping object names. +// The key marker means the returned objects' key must be greater than it in lexicographic order. // -// options ListObject的筛选行为。Prefix指定的前缀、MaxKeys最大数目、Marker第一个开始、Delimiter对Object名字进行分组的字符。 +// For example, if the bucket has 8 objects, my-object-1, my-object-11, my-object-2, my-object-21, +// my-object-22, my-object-3, my-object-31, my-object-32. If the prefix is my-object-2 (no other filters), then it returns +// my-object-2, my-object-21, my-object-22 three objects. If the marker is my-object-22 (no other filters), then it returns +// my-object-3, my-object-31, my-object-32 three objects. If the max keys is 5, then it returns 5 objects. +// The three filters could be used together to achieve filter and paging functionality. +// If the prefix is the folder name, then it could list all files under this folder (including the files under its subfolders). +// But if the delimiter is specified with '/', then it only returns that folder's files (no subfolder's files). The direct subfolders are in the commonPrefixes properties. +// For example, if the bucket has three objects fun/test.jpg, fun/movie/001.avi, fun/movie/007.avi. And if the prefix is "fun/", then it returns all three objects. +// But if the delimiter is '/', then only "fun/test.jpg" is returned as files and fun/movie/ is returned as common prefix. // -// 您有如下8个object,my-object-1, my-object-11, my-object-2, my-object-21, -// my-object-22, my-object-3, my-object-31, my-object-32。如果您指定了Prefix为my-object-2, -// 则返回my-object-2, my-object-21, my-object-22三个object。如果您指定了Marker为my-object-22, -// 则返回my-object-3, my-object-31, my-object-32三个object。如果您指定MaxKeys则每次最多返回MaxKeys个, -// 最后一次可能不足。这三个参数可以组合使用,实现分页等功能。如果把prefix设为某个文件夹名,就可以罗列以此prefix开头的文件, -// 即该文件夹下递归的所有的文件和子文件夹。如果再把delimiter设置为"/"时,返回值就只罗列该文件夹下的文件,该文件夹下的子文件名 -// 返回在CommonPrefixes部分,子文件夹下递归的文件和文件夹不被显示。例如一个bucket存在三个object,fun/test.jpg、 -// fun/movie/001.avi、fun/movie/007.avi。若设定prefix为"fun/",则返回三个object;如果增加设定 -// delimiter为"/",则返回文件"fun/test.jpg"和前缀"fun/movie/",即实现了文件夹的逻辑。 +// For common usage scenario, check out sample/list_object.go. // -// 常用场景,请参数示例sample/list_object.go。 -// -// ListObjectsResponse 操作成功后的返回值,成员Objects为bucket中对象列表。error为nil时该返回值有效。 +// ListObjectsResult the return value after operation succeeds (only valid when error is nil). // func (bucket Bucket) ListObjects(options ...Option) (ListObjectsResult, error) { var out ListObjectsResult options = append(options, EncodingType("url")) - params, err := handleParams(options) + params, err := GetRawParams(options) if err != nil { return out, err } - resp, err := bucket.do("GET", "", params, "", nil, nil, nil) + resp, err := bucket.do("GET", "", params, options, nil, nil) if err != nil { return out, err } @@ -494,14 +602,67 @@ func (bucket Bucket) ListObjects(options ...Option) (ListObjectsResult, error) { return out, err } +// Recommend to use ListObjectsV2 to replace ListObjects +// ListOListObjectsV2bjects lists the objects under the current bucket. +// ListObjectsResultV2 the return value after operation succeeds (only valid when error is nil). +func (bucket Bucket) ListObjectsV2(options ...Option) (ListObjectsResultV2, error) { + var out ListObjectsResultV2 + + options = append(options, EncodingType("url")) + options = append(options, ListType(2)) + params, err := GetRawParams(options) + if err != nil { + return out, err + } + + resp, err := bucket.do("GET", "", params, options, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + if err != nil { + return out, err + } + + err = decodeListObjectsResultV2(&out) + return out, err +} + +// ListObjectVersions lists objects of all versions under the current bucket. +func (bucket Bucket) ListObjectVersions(options ...Option) (ListObjectVersionsResult, error) { + var out ListObjectVersionsResult + + options = append(options, EncodingType("url")) + params, err := GetRawParams(options) + if err != nil { + return out, err + } + params["versions"] = nil + + resp, err := bucket.do("GET", "", params, options, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + if err != nil { + return out, err + } + + err = decodeListObjectVersionsResult(&out) + return out, err +} + +// SetObjectMeta sets the metadata of the Object. // -// SetObjectMeta 设置Object的Meta。 +// objectKey object +// options options for setting the metadata. The valid options are CacheControl, ContentDisposition, ContentEncoding, Expires, +// ServerSideEncryption, and custom metadata. // -// objectKey object -// options 指定对象的属性,有以下可选项CacheControl、ContentDisposition、ContentEncoding、Expires、 -// ServerSideEncryption、Meta。 -// -// error 操作无错误时error为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) SetObjectMeta(objectKey string, options ...Option) error { options = append(options, MetadataDirective(MetaReplace)) @@ -509,18 +670,18 @@ func (bucket Bucket) SetObjectMeta(objectKey string, options ...Option) error { return err } +// GetObjectDetailedMeta gets the object's detailed metadata // -// GetObjectDetailedMeta 查询Object的头信息。 +// objectKey object key. +// options the constraints of the object. Only when the object meets the requirements this method will return the metadata. Otherwise returns error. Valid options are IfModifiedSince, IfUnmodifiedSince, +// IfMatch, IfNoneMatch. For more details check out https://help.aliyun.com/document_detail/oss/api-reference/object/HeadObject.html // -// objectKey object名称。 -// objectPropertyConstraints 对象的属性限制项,满足时正常返回,不满足时返回错误。现在项有IfModifiedSince、IfUnmodifiedSince、 -// IfMatch、IfNoneMatch。具体含义请参看 https://help.aliyun.com/document_detail/oss/api-reference/object/HeadObject.html -// -// http.Header 对象的meta,error为nil时有效。 -// error 操作无错误为nil,非nil为错误信息。 +// http.Header object meta when error is nil. +// error it's nil if no error, otherwise it's an error object. // func (bucket Bucket) GetObjectDetailedMeta(objectKey string, options ...Option) (http.Header, error) { - resp, err := bucket.do("HEAD", objectKey, "", "", options, nil, nil) + params, _ := GetRawParams(options) + resp, err := bucket.do("HEAD", objectKey, params, options, nil, nil) if err != nil { return nil, err } @@ -529,19 +690,21 @@ func (bucket Bucket) GetObjectDetailedMeta(objectKey string, options ...Option) return resp.Headers, nil } +// GetObjectMeta gets object metadata. // -// GetObjectMeta 查询Object的头信息。 +// GetObjectMeta is more lightweight than GetObjectDetailedMeta as it only returns basic metadata including ETag +// size, LastModified. The size information is in the HTTP header Content-Length. // -// GetObjectMeta相比GetObjectDetailedMeta更轻量,仅返回指定Object的少量基本meta信息, -// 包括该Object的ETag、Size(对象大小)、LastModified,其中Size由响应头Content-Length的数值表示。 +// objectKey object key // -// objectKey object名称。 +// http.Header the object's metadata, valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // -// http.Header 对象的meta,error为nil时有效。 -// error 操作无错误为nil,非nil为错误信息。 -// -func (bucket Bucket) GetObjectMeta(objectKey string) (http.Header, error) { - resp, err := bucket.do("GET", objectKey, "?objectMeta", "", nil, nil, nil) +func (bucket Bucket) GetObjectMeta(objectKey string, options ...Option) (http.Header, error) { + params, _ := GetRawParams(options) + params["objectMeta"] = nil + //resp, err := bucket.do("GET", objectKey, "?objectMeta", "", nil, nil, nil) + resp, err := bucket.do("HEAD", objectKey, params, options, nil, nil) if err != nil { return nil, err } @@ -550,44 +713,46 @@ func (bucket Bucket) GetObjectMeta(objectKey string) (http.Header, error) { return resp.Headers, nil } +// SetObjectACL updates the object's ACL. // -// SetObjectACL 修改Object的ACL权限。 +// Only the bucket's owner could update object's ACL which priority is higher than bucket's ACL. +// For example, if the bucket ACL is private and object's ACL is public-read-write. +// Then object's ACL is used and it means all users could read or write that object. +// When the object's ACL is not set, then bucket's ACL is used as the object's ACL. // -// 只有Bucket Owner才有权限调用PutObjectACL来修改Object的ACL。Object ACL优先级高于Bucket ACL。 -// 例如Bucket ACL是private的,而Object ACL是public-read-write的,则访问这个Object时, -// 先判断Object的ACL,所以所有用户都拥有这个Object的访问权限,即使这个Bucket是private bucket。 -// 如果某个Object从来没设置过ACL,则访问权限遵循Bucket ACL。 +// Object read operations include GetObject, HeadObject, CopyObject and UploadPartCopy on the source object; +// Object write operations include PutObject, PostObject, AppendObject, DeleteObject, DeleteMultipleObjects, +// CompleteMultipartUpload and CopyObject on target object. // -// Object的读操作包括GetObject,HeadObject,CopyObject和UploadPartCopy中的对source object的读; -// Object的写操作包括:PutObject,PostObject,AppendObject,DeleteObject, -// DeleteMultipleObjects,CompleteMultipartUpload以及CopyObject对新的Object的写。 +// objectKey the target object key (to set the ACL on) +// objectAcl object ACL. Valid options are PrivateACL, PublicReadACL, PublicReadWriteACL. // -// objectKey 设置权限的object。 -// objectAcl 对象权限。可选值PrivateACL(私有读写)、PublicReadACL(公共读私有写)、PublicReadWriteACL(公共读写)。 +// error it's nil if no error, otherwise it's an error object. // -// error 操作无错误为nil,非nil为错误信息。 -// -func (bucket Bucket) SetObjectACL(objectKey string, objectACL ACLType) error { - options := []Option{ObjectACL(objectACL)} - resp, err := bucket.do("PUT", objectKey, "acl", "acl", options, nil, nil) +func (bucket Bucket) SetObjectACL(objectKey string, objectACL ACLType, options ...Option) error { + options = append(options, ObjectACL(objectACL)) + params, _ := GetRawParams(options) + params["acl"] = nil + resp, err := bucket.do("PUT", objectKey, params, options, nil, nil) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusOK}) + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) } +// GetObjectACL gets object's ACL // -// GetObjectACL 获取对象的ACL权限。 +// objectKey the object to get ACL from. // -// objectKey 获取权限的object。 +// GetObjectACLResult the result object when error is nil. GetObjectACLResult.Acl is the object ACL. +// error it's nil if no error, otherwise it's an error object. // -// GetObjectAclResponse 获取权限操作返回值,error为nil时有效。GetObjectAclResponse.Acl为对象的权限。 -// error 操作无错误为nil,非nil为错误信息。 -// -func (bucket Bucket) GetObjectACL(objectKey string) (GetObjectACLResult, error) { +func (bucket Bucket) GetObjectACL(objectKey string, options ...Option) (GetObjectACLResult, error) { var out GetObjectACLResult - resp, err := bucket.do("GET", objectKey, "acl", "acl", nil, nil, nil) + params, _ := GetRawParams(options) + params["acl"] = nil + resp, err := bucket.do("GET", objectKey, params, options, nil, nil) if err != nil { return out, err } @@ -597,23 +762,514 @@ func (bucket Bucket) GetObjectACL(objectKey string) (GetObjectACLResult, error) return out, err } +// PutSymlink creates a symlink (to point to an existing object) +// +// Symlink cannot point to another symlink. +// When creating a symlink, it does not check the existence of the target file, and does not check if the target file is symlink. +// Neither it checks the caller's permission on the target file. All these checks are deferred to the actual GetObject call via this symlink. +// If trying to add an existing file, as long as the caller has the write permission, the existing one will be overwritten. +// If the x-oss-meta- is specified, it will be added as the metadata of the symlink file. +// +// symObjectKey the symlink object's key. +// targetObjectKey the target object key to point to. +// +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) PutSymlink(symObjectKey string, targetObjectKey string, options ...Option) error { + options = append(options, symlinkTarget(url.QueryEscape(targetObjectKey))) + params, _ := GetRawParams(options) + params["symlink"] = nil + resp, err := bucket.do("PUT", symObjectKey, params, options, nil, nil) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetSymlink gets the symlink object with the specified key. +// If the symlink object does not exist, returns 404. +// +// objectKey the symlink object's key. +// +// error it's nil if no error, otherwise it's an error object. +// When error is nil, the target file key is in the X-Oss-Symlink-Target header of the returned object. +// +func (bucket Bucket) GetSymlink(objectKey string, options ...Option) (http.Header, error) { + params, _ := GetRawParams(options) + params["symlink"] = nil + resp, err := bucket.do("GET", objectKey, params, options, nil, nil) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + targetObjectKey := resp.Headers.Get(HTTPHeaderOssSymlinkTarget) + targetObjectKey, err = url.QueryUnescape(targetObjectKey) + if err != nil { + return resp.Headers, err + } + resp.Headers.Set(HTTPHeaderOssSymlinkTarget, targetObjectKey) + return resp.Headers, err +} + +// RestoreObject restores the object from the archive storage. +// +// An archive object is in cold status by default and it cannot be accessed. +// When restore is called on the cold object, it will become available for access after some time. +// If multiple restores are called on the same file when the object is being restored, server side does nothing for additional calls but returns success. +// By default, the restored object is available for access for one day. After that it will be unavailable again. +// But if another RestoreObject are called after the file is restored, then it will extend one day's access time of that object, up to 7 days. +// +// objectKey object key to restore. +// +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) RestoreObject(objectKey string, options ...Option) error { + params, _ := GetRawParams(options) + params["restore"] = nil + resp, err := bucket.do("POST", objectKey, params, options, nil, nil) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK, http.StatusAccepted}) +} + +// RestoreObjectDetail support more features than RestoreObject +func (bucket Bucket) RestoreObjectDetail(objectKey string, restoreConfig RestoreConfiguration, options ...Option) error { + if restoreConfig.Tier == "" { + // Expedited, Standard, Bulk + restoreConfig.Tier = string(RestoreStandard) + } + + if restoreConfig.Days == 0 { + restoreConfig.Days = 1 + } + + bs, err := xml.Marshal(restoreConfig) + if err != nil { + return err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + options = append(options, ContentType(contentType)) + + params, _ := GetRawParams(options) + params["restore"] = nil + + resp, err := bucket.do("POST", objectKey, params, options, buffer, nil) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK, http.StatusAccepted}) +} + +// RestoreObjectXML support more features than RestoreObject +func (bucket Bucket) RestoreObjectXML(objectKey, configXML string, options ...Option) error { + buffer := new(bytes.Buffer) + buffer.Write([]byte(configXML)) + + contentType := http.DetectContentType(buffer.Bytes()) + options = append(options, ContentType(contentType)) + + params, _ := GetRawParams(options) + params["restore"] = nil + + resp, err := bucket.do("POST", objectKey, params, options, buffer, nil) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK, http.StatusAccepted}) +} + +// SignURL signs the URL. Users could access the object directly with this URL without getting the AK. +// +// objectKey the target object to sign. +// signURLConfig the configuration for the signed URL +// +// string returns the signed URL, when error is nil. +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) SignURL(objectKey string, method HTTPMethod, expiredInSec int64, options ...Option) (string, error) { + if expiredInSec < 0 { + return "", fmt.Errorf("invalid expires: %d, expires must bigger than 0", expiredInSec) + } + expiration := time.Now().Unix() + expiredInSec + + params, err := GetRawParams(options) + if err != nil { + return "", err + } + + headers := make(map[string]string) + err = handleOptions(headers, options) + if err != nil { + return "", err + } + + return bucket.Client.Conn.signURL(method, bucket.BucketName, objectKey, expiration, params, headers), nil +} + +// PutObjectWithURL uploads an object with the URL. If the object exists, it will be overwritten. +// PutObjectWithURL It will not generate minetype according to the key name. +// +// signedURL signed URL. +// reader io.Reader the read instance for reading the data for the upload. +// options the options for uploading the data. The valid options are CacheControl, ContentDisposition, ContentEncoding, +// Expires, ServerSideEncryption, ObjectACL and custom metadata. Check out the following link for details: +// https://help.aliyun.com/document_detail/oss/api-reference/object/PutObject.html +// +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) PutObjectWithURL(signedURL string, reader io.Reader, options ...Option) error { + resp, err := bucket.DoPutObjectWithURL(signedURL, reader, options) + if err != nil { + return err + } + defer resp.Body.Close() + + return err +} + +// PutObjectFromFileWithURL uploads an object from a local file with the signed URL. +// PutObjectFromFileWithURL It does not generate mimetype according to object key's name or the local file name. +// +// signedURL the signed URL. +// filePath local file path, such as dirfile.txt, for uploading. +// options options for uploading, same as the options in PutObject function. +// +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) PutObjectFromFileWithURL(signedURL, filePath string, options ...Option) error { + fd, err := os.Open(filePath) + if err != nil { + return err + } + defer fd.Close() + + resp, err := bucket.DoPutObjectWithURL(signedURL, fd, options) + if err != nil { + return err + } + defer resp.Body.Close() + + return err +} + +// DoPutObjectWithURL is the actual API that does the upload with URL work(internal for SDK) +// +// signedURL the signed URL. +// reader io.Reader the read instance for getting the data to upload. +// options options for uploading. +// +// Response the response object which contains the HTTP response. +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) DoPutObjectWithURL(signedURL string, reader io.Reader, options []Option) (*Response, error) { + listener := GetProgressListener(options) + + params := map[string]interface{}{} + resp, err := bucket.doURL("PUT", signedURL, params, options, reader, listener) + if err != nil { + return nil, err + } + + if bucket.GetConfig().IsEnableCRC { + err = CheckCRC(resp, "DoPutObjectWithURL") + if err != nil { + return resp, err + } + } + + err = CheckRespCode(resp.StatusCode, []int{http.StatusOK}) + + return resp, err +} + +// GetObjectWithURL downloads the object and returns the reader instance, with the signed URL. +// +// signedURL the signed URL. +// options options for downloading the object. Valid options are IfModifiedSince, IfUnmodifiedSince, IfMatch, +// IfNoneMatch, AcceptEncoding. For more information, check out the following link: +// https://help.aliyun.com/document_detail/oss/api-reference/object/GetObject.html +// +// io.ReadCloser the reader object for getting the data from response. It needs be closed after the usage. It's only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) GetObjectWithURL(signedURL string, options ...Option) (io.ReadCloser, error) { + result, err := bucket.DoGetObjectWithURL(signedURL, options) + if err != nil { + return nil, err + } + return result.Response, nil +} + +// GetObjectToFileWithURL downloads the object into a local file with the signed URL. +// +// signedURL the signed URL +// filePath the local file path to download to. +// options the options for downloading object. Check out the parameter options in function GetObject for the reference. +// +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) GetObjectToFileWithURL(signedURL, filePath string, options ...Option) error { + tempFilePath := filePath + TempFileSuffix + + // Get the object's content + result, err := bucket.DoGetObjectWithURL(signedURL, options) + if err != nil { + return err + } + defer result.Response.Close() + + // If the file does not exist, create one. If exists, then overwrite it. + fd, err := os.OpenFile(tempFilePath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, FilePermMode) + if err != nil { + return err + } + + // Save the data to the file. + _, err = io.Copy(fd, result.Response.Body) + fd.Close() + if err != nil { + return err + } + + // Compare the CRC value. If CRC values do not match, return error. + hasRange, _, _ := IsOptionSet(options, HTTPHeaderRange) + encodeOpt, _ := FindOption(options, HTTPHeaderAcceptEncoding, nil) + acceptEncoding := "" + if encodeOpt != nil { + acceptEncoding = encodeOpt.(string) + } + + if bucket.GetConfig().IsEnableCRC && !hasRange && acceptEncoding != "gzip" { + result.Response.ClientCRC = result.ClientCRC.Sum64() + err = CheckCRC(result.Response, "GetObjectToFileWithURL") + if err != nil { + os.Remove(tempFilePath) + return err + } + } + + return os.Rename(tempFilePath, filePath) +} + +// DoGetObjectWithURL is the actual API that downloads the file with the signed URL. +// +// signedURL the signed URL. +// options the options for getting object. Check out parameter options in GetObject for the reference. +// +// GetObjectResult the result object when the error is nil. +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) DoGetObjectWithURL(signedURL string, options []Option) (*GetObjectResult, error) { + params, _ := GetRawParams(options) + resp, err := bucket.doURL("GET", signedURL, params, options, nil, nil) + if err != nil { + return nil, err + } + + result := &GetObjectResult{ + Response: resp, + } + + // CRC + var crcCalc hash.Hash64 + hasRange, _, _ := IsOptionSet(options, HTTPHeaderRange) + if bucket.GetConfig().IsEnableCRC && !hasRange { + crcCalc = crc64.New(CrcTable()) + result.ServerCRC = resp.ServerCRC + result.ClientCRC = crcCalc + } + + // Progress + listener := GetProgressListener(options) + + contentLen, _ := strconv.ParseInt(resp.Headers.Get(HTTPHeaderContentLength), 10, 64) + resp.Body = TeeReader(resp.Body, crcCalc, contentLen, listener, nil) + + return result, nil +} + +// +// ProcessObject apply process on the specified image file. +// +// The supported process includes resize, rotate, crop, watermark, format, +// udf, customized style, etc. +// +// +// objectKey object key to process. +// process process string, such as "image/resize,w_100|sys/saveas,o_dGVzdC5qcGc,b_dGVzdA" +// +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) ProcessObject(objectKey string, process string, options ...Option) (ProcessObjectResult, error) { + var out ProcessObjectResult + params, _ := GetRawParams(options) + params["x-oss-process"] = nil + processData := fmt.Sprintf("%v=%v", "x-oss-process", process) + data := strings.NewReader(processData) + resp, err := bucket.do("POST", objectKey, params, nil, data, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = jsonUnmarshal(resp.Body, &out) + return out, err +} + +// +// PutObjectTagging add tagging to object +// +// objectKey object key to add tagging +// tagging tagging to be added +// +// error nil if success, otherwise error +// +func (bucket Bucket) PutObjectTagging(objectKey string, tagging Tagging, options ...Option) error { + bs, err := xml.Marshal(tagging) + if err != nil { + return err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + params, _ := GetRawParams(options) + params["tagging"] = nil + resp, err := bucket.do("PUT", objectKey, params, options, buffer, nil) + if err != nil { + return err + } + defer resp.Body.Close() + + return nil +} + +// +// GetObjectTagging get tagging of the object +// +// objectKey object key to get tagging +// +// Tagging +// error nil if success, otherwise error + +func (bucket Bucket) GetObjectTagging(objectKey string, options ...Option) (GetObjectTaggingResult, error) { + var out GetObjectTaggingResult + params, _ := GetRawParams(options) + params["tagging"] = nil + + resp, err := bucket.do("GET", objectKey, params, options, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// +// DeleteObjectTagging delete object taggging +// +// objectKey object key to delete tagging +// +// error nil if success, otherwise error +// +func (bucket Bucket) DeleteObjectTagging(objectKey string, options ...Option) error { + params, _ := GetRawParams(options) + params["tagging"] = nil + + if objectKey == "" { + return fmt.Errorf("invalid argument: object name is empty") + } + + resp, err := bucket.do("DELETE", objectKey, params, options, nil, nil) + if err != nil { + return err + } + defer resp.Body.Close() + + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +func (bucket Bucket) OptionsMethod(objectKey string, options ...Option) (http.Header, error) { + var out http.Header + resp, err := bucket.do("OPTIONS", objectKey, nil, options, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + out = resp.Headers + return out, nil +} + +// public +func (bucket Bucket) Do(method, objectName string, params map[string]interface{}, options []Option, + data io.Reader, listener ProgressListener) (*Response, error) { + return bucket.do(method, objectName, params, options, data, listener) +} + // Private -func (bucket Bucket) do(method, objectName, urlParams, subResource string, options []Option, +func (bucket Bucket) do(method, objectName string, params map[string]interface{}, options []Option, data io.Reader, listener ProgressListener) (*Response, error) { headers := make(map[string]string) err := handleOptions(headers, options) if err != nil { return nil, err } - return bucket.Client.Conn.Do(method, bucket.BucketName, objectName, - urlParams, subResource, headers, data, 0, listener) + + err = CheckBucketName(bucket.BucketName) + if len(bucket.BucketName) > 0 && err != nil { + return nil, err + } + + resp, err := bucket.Client.Conn.Do(method, bucket.BucketName, objectName, + params, headers, data, 0, listener) + + // get response header + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil && resp != nil { + pRespHeader := respHeader.(*http.Header) + *pRespHeader = resp.Headers + } + + return resp, err } -func (bucket Bucket) getConfig() *Config { +func (bucket Bucket) doURL(method HTTPMethod, signedURL string, params map[string]interface{}, options []Option, + data io.Reader, listener ProgressListener) (*Response, error) { + headers := make(map[string]string) + err := handleOptions(headers, options) + if err != nil { + return nil, err + } + + resp, err := bucket.Client.Conn.DoURL(method, signedURL, headers, data, 0, listener) + + // get response header + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil { + pRespHeader := respHeader.(*http.Header) + *pRespHeader = resp.Headers + } + + return resp, err +} + +func (bucket Bucket) GetConfig() *Config { return bucket.Client.Config } -func addContentType(options []Option, keys ...string) []Option { +func AddContentType(options []Option, keys ...string) []Option { typ := TypeByExtension("") for _, key := range keys { typ = TypeByExtension(key) diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/client.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/client.go index 23df9bc1a..aacf3e7f7 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/client.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/client.go @@ -5,126 +5,168 @@ package oss import ( "bytes" "encoding/xml" + "fmt" "io" + "io/ioutil" + "log" + "net" "net/http" "strings" "time" ) -// -// Client Sdk的入口,Client的方法可以完成bucket的各种操作,如create/delete bucket, -// set/get acl/lifecycle/referer/logging/website等。文件(object)的上传下载通过Bucket完成。 -// 用户用oss.New创建Client。 +// Client SDK's entry point. It's for bucket related options such as create/delete/set bucket (such as set/get ACL/lifecycle/referer/logging/website). +// Object related operations are done by Bucket class. +// Users use oss.New to create Client instance. // type ( - // Client oss client + // Client OSS client Client struct { - Config *Config // Oss Client configure - Conn *Conn // Send http request + Config *Config // OSS client configuration + Conn *Conn // Send HTTP request + HTTPClient *http.Client //http.Client to use - if nil will make its own } // ClientOption client option such as UseCname, Timeout, SecurityToken. ClientOption func(*Client) ) +// New creates a new client. // -// New 生成一个新的Client。 +// endpoint the OSS datacenter endpoint such as http://oss-cn-hangzhou.aliyuncs.com . +// accessKeyId access key Id. +// accessKeySecret access key secret. // -// endpoint 用户Bucket所在数据中心的访问域名,如http://oss-cn-hangzhou.aliyuncs.com。 -// accessKeyId 用户标识。 -// accessKeySecret 用户密钥。 -// -// Client 生成的新Client。error为nil时有效。 -// error 操作无错误时为nil,非nil时表示操作出错。 +// Client creates the new client instance, the returned value is valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // func New(endpoint, accessKeyID, accessKeySecret string, options ...ClientOption) (*Client, error) { - // configuration + // Configuration config := getDefaultOssConfig() config.Endpoint = endpoint config.AccessKeyID = accessKeyID config.AccessKeySecret = accessKeySecret - // url parse + // URL parse url := &urlMaker{} - url.Init(config.Endpoint, config.IsCname, config.IsUseProxy) - - // http connect - conn := &Conn{config: config, url: url} - - // oss client - client := &Client{ - config, - conn, + err := url.Init(config.Endpoint, config.IsCname, config.IsUseProxy) + if err != nil { + return nil, err } - // client options parse + // HTTP connect + conn := &Conn{config: config, url: url} + + // OSS client + client := &Client{ + Config: config, + Conn: conn, + } + + // Client options parse for _, option := range options { option(client) } - // create http connect - err := conn.init(config, url) + if config.AuthVersion != AuthV1 && config.AuthVersion != AuthV2 { + return nil, fmt.Errorf("Init client Error, invalid Auth version: %v", config.AuthVersion) + } + + // Create HTTP connection + err = conn.init(config, url, client.HTTPClient) return client, err } +// Bucket gets the bucket instance. // -// Bucket 取存储空间(Bucket)的对象实例。 +// bucketName the bucket name. +// Bucket the bucket object, when error is nil. // -// bucketName 存储空间名称。 -// Bucket 新的Bucket。error为nil时有效。 -// -// error 操作无错误时返回nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) Bucket(bucketName string) (*Bucket, error) { + err := CheckBucketName(bucketName) + if err != nil { + return nil, err + } + return &Bucket{ client, bucketName, }, nil } +// CreateBucket creates a bucket. // -// CreateBucket 创建Bucket。 +// bucketName the bucket name, it's globably unique and immutable. The bucket name can only consist of lowercase letters, numbers and dash ('-'). +// It must start with lowercase letter or number and the length can only be between 3 and 255. +// options options for creating the bucket, with optional ACL. The ACL could be ACLPrivate, ACLPublicRead, and ACLPublicReadWrite. By default it's ACLPrivate. +// It could also be specified with StorageClass option, which supports StorageStandard, StorageIA(infrequent access), StorageArchive. // -// bucketName bucket名称,在整个OSS中具有全局唯一性,且不能修改。bucket名称的只能包括小写字母,数字和短横线-, -// 必须以小写字母或者数字开头,长度必须在3-255字节之间。 -// options 创建bucket的选项。您可以使用选项ACL,指定bucket的访问权限。Bucket有以下三种访问权限,私有读写(ACLPrivate)、 -// 公共读私有写(ACLPublicRead),公共读公共写(ACLPublicReadWrite),默认访问权限是私有读写。 -// -// error 操作无错误时返回nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) CreateBucket(bucketName string, options ...Option) error { headers := make(map[string]string) handleOptions(headers, options) - resp, err := client.do("PUT", bucketName, "", "", headers, nil) + buffer := new(bytes.Buffer) + + var cbConfig createBucketConfiguration + cbConfig.StorageClass = StorageStandard + + isStorageSet, valStroage, _ := IsOptionSet(options, storageClass) + isRedundancySet, valRedundancy, _ := IsOptionSet(options, redundancyType) + isObjectHashFuncSet, valHashFunc, _ := IsOptionSet(options, objectHashFunc) + if isStorageSet { + cbConfig.StorageClass = valStroage.(StorageClassType) + } + + if isRedundancySet { + cbConfig.DataRedundancyType = valRedundancy.(DataRedundancyType) + } + + if isObjectHashFuncSet { + cbConfig.ObjectHashFunction = valHashFunc.(ObjecthashFuncType) + } + + bs, err := xml.Marshal(cbConfig) + if err != nil { + return err + } + buffer.Write(bs) + contentType := http.DetectContentType(buffer.Bytes()) + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusOK}) + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) } +// ListBuckets lists buckets of the current account under the given endpoint, with optional filters. // -// ListBuckets 获取当前用户下的bucket。 +// options specifies the filters such as Prefix, Marker and MaxKeys. Prefix is the bucket name's prefix filter. +// And marker makes sure the returned buckets' name are greater than it in lexicographic order. +// Maxkeys limits the max keys to return, and by default it's 100 and up to 1000. +// For the common usage scenario, please check out list_bucket.go in the sample. +// ListBucketsResponse the response object if error is nil. // -// options 指定ListBuckets的筛选行为,Prefix、Marker、MaxKeys三个选项。Prefix限定前缀。 -// Marker设定从Marker之后的第一个开始返回。MaxKeys限定此次返回的最大数目,默认为100。 -// 常用使用场景的实现,参数示例程序list_bucket.go。 -// ListBucketsResponse 操作成功后的返回值,error为nil时该返回值有效。 -// -// error 操作无错误时返回nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) ListBuckets(options ...Option) (ListBucketsResult, error) { var out ListBucketsResult - params, err := handleParams(options) + params, err := GetRawParams(options) if err != nil { return out, err } - resp, err := client.do("GET", "", params, "", nil, nil) + resp, err := client.do("GET", "", params, nil, nil, options...) if err != nil { return out, err } @@ -134,13 +176,12 @@ func (client Client) ListBuckets(options ...Option) (ListBucketsResult, error) { return out, err } +// IsBucketExist checks if the bucket exists // -// IsBucketExist Bucket是否存在。 +// bucketName the bucket name. // -// bucketName 存储空间名称。 -// -// bool 存储空间是否存在。error为nil时有效。 -// error 操作无错误时返回nil,非nil为错误信息。 +// bool true if it exists, and it's only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // func (client Client) IsBucketExist(bucketName string) (bool, error) { listRes, err := client.ListBuckets(Prefix(bucketName), MaxKeys(1)) @@ -154,36 +195,37 @@ func (client Client) IsBucketExist(bucketName string) (bool, error) { return false, nil } +// DeleteBucket deletes the bucket. Only empty bucket can be deleted (no object and parts). // -// DeleteBucket 删除空存储空间。非空时请先清理Object、Upload。 +// bucketName the bucket name. // -// bucketName 存储空间名称。 +// error it's nil if no error, otherwise it's an error object. // -// error 操作无错误时返回nil,非nil为错误信息。 -// -func (client Client) DeleteBucket(bucketName string) error { - resp, err := client.do("DELETE", bucketName, "", "", nil, nil) +func (client Client) DeleteBucket(bucketName string, options ...Option) error { + params := map[string]interface{}{} + resp, err := client.do("DELETE", bucketName, params, nil, nil, options...) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusNoContent}) + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) } +// GetBucketLocation gets the bucket location. // -// GetBucketLocation 查看Bucket所属数据中心位置的信息。 -// -// 如果您想了解"访问域名和数据中心"详细信息,请参看 +// Checks out the following link for more information : // https://help.aliyun.com/document_detail/oss/user_guide/oss_concept/endpoint.html // -// bucketName 存储空间名称。 +// bucketName the bucket name // -// string Bucket所属的数据中心位置信息。 -// error 操作无错误时返回nil,非nil为错误信息。 +// string bucket's datacenter location +// error it's nil if no error, otherwise it's an error object. // func (client Client) GetBucketLocation(bucketName string) (string, error) { - resp, err := client.do("GET", bucketName, "location", "location", nil, nil) + params := map[string]interface{}{} + params["location"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) if err != nil { return "", err } @@ -194,36 +236,37 @@ func (client Client) GetBucketLocation(bucketName string) (string, error) { return LocationConstraint, err } +// SetBucketACL sets bucket's ACL. // -// SetBucketACL 修改Bucket的访问权限。 +// bucketName the bucket name +// bucketAcl the bucket ACL: ACLPrivate, ACLPublicRead and ACLPublicReadWrite. // -// bucketName 存储空间名称。 -// bucketAcl bucket的访问权限。Bucket有以下三种访问权限,Bucket有以下三种访问权限,私有读写(ACLPrivate)、 -// 公共读私有写(ACLPublicRead),公共读公共写(ACLPublicReadWrite)。 -// -// error 操作无错误时返回nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) SetBucketACL(bucketName string, bucketACL ACLType) error { headers := map[string]string{HTTPHeaderOssACL: string(bucketACL)} - resp, err := client.do("PUT", bucketName, "", "", headers, nil) + params := map[string]interface{}{} + params["acl"] = nil + resp, err := client.do("PUT", bucketName, params, headers, nil) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusOK}) + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) } +// GetBucketACL gets the bucket ACL. // -// GetBucketACL 获得Bucket的访问权限。 +// bucketName the bucket name. // -// bucketName 存储空间名称。 -// -// GetBucketAclResponse 操作成功后的返回值,error为nil时该返回值有效。 -// error 操作无错误时返回nil,非nil为错误信息。 +// GetBucketAclResponse the result object, and it's only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // func (client Client) GetBucketACL(bucketName string) (GetBucketACLResult, error) { var out GetBucketACLResult - resp, err := client.do("GET", bucketName, "acl", "acl", nil, nil) + params := map[string]interface{}{} + params["acl"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) if err != nil { return out, err } @@ -233,23 +276,24 @@ func (client Client) GetBucketACL(bucketName string) (GetBucketACLResult, error) return out, err } +// SetBucketLifecycle sets the bucket's lifecycle. // -// SetBucketLifecycle 修改Bucket的生命周期设置。 -// -// OSS提供Object生命周期管理来为用户管理对象。用户可以为某个Bucket定义生命周期配置,来为该Bucket的Object定义各种规则。 -// Bucket的拥有者可以通过SetBucketLifecycle来设置Bucket的Lifecycle配置。Lifecycle开启后,OSS将按照配置, -// 定期自动删除与Lifecycle规则相匹配的Object。如果您想了解更多的生命周期的信息,请参看 +// For more information, checks out following link: // https://help.aliyun.com/document_detail/oss/user_guide/manage_object/object_lifecycle.html // -// bucketName 存储空间名称。 -// rules 生命周期规则列表。生命周期规则有两种格式,指定绝对和相对过期时间,分布由days和year/month/day控制。 -// 具体用法请参考示例程序sample/bucket_lifecycle.go。 +// bucketName the bucket name. +// rules the lifecycle rules. There're two kind of rules: absolute time expiration and relative time expiration in days and day/month/year respectively. +// Check out sample/bucket_lifecycle.go for more details. // -// error 操作无错误时返回error为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) SetBucketLifecycle(bucketName string, rules []LifecycleRule) error { - lxml := lifecycleXML{Rules: convLifecycleRule(rules)} - bs, err := xml.Marshal(lxml) + err := verifyLifecycleRules(rules) + if err != nil { + return err + } + lifecycleCfg := LifecycleConfiguration{Rules: rules} + bs, err := xml.Marshal(lifecycleCfg) if err != nil { return err } @@ -260,66 +304,77 @@ func (client Client) SetBucketLifecycle(bucketName string, rules []LifecycleRule headers := map[string]string{} headers[HTTPHeaderContentType] = contentType - resp, err := client.do("PUT", bucketName, "lifecycle", "lifecycle", headers, buffer) + params := map[string]interface{}{} + params["lifecycle"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusOK}) + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) } -// -// DeleteBucketLifecycle 删除Bucket的生命周期设置。 +// DeleteBucketLifecycle deletes the bucket's lifecycle. // // -// bucketName 存储空间名称。 +// bucketName the bucket name. // -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) DeleteBucketLifecycle(bucketName string) error { - resp, err := client.do("DELETE", bucketName, "lifecycle", "lifecycle", nil, nil) + params := map[string]interface{}{} + params["lifecycle"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusNoContent}) + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) } +// GetBucketLifecycle gets the bucket's lifecycle settings. // -// GetBucketLifecycle 查看Bucket的生命周期设置。 +// bucketName the bucket name. // -// bucketName 存储空间名称。 -// -// GetBucketLifecycleResponse 操作成功的返回值,error为nil时该返回值有效。Rules为该bucket上的规则列表。 -// error 操作无错误时为nil,非nil为错误信息。 +// GetBucketLifecycleResponse the result object upon successful request. It's only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // func (client Client) GetBucketLifecycle(bucketName string) (GetBucketLifecycleResult, error) { var out GetBucketLifecycleResult - resp, err := client.do("GET", bucketName, "lifecycle", "lifecycle", nil, nil) + params := map[string]interface{}{} + params["lifecycle"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) if err != nil { return out, err } defer resp.Body.Close() err = xmlUnmarshal(resp.Body, &out) + + // NonVersionTransition is not suggested to use + // to keep compatible + for k, rule := range out.Rules { + if len(rule.NonVersionTransitions) > 0 { + out.Rules[k].NonVersionTransition = &(out.Rules[k].NonVersionTransitions[0]) + } + } return out, err } +// SetBucketReferer sets the bucket's referer whitelist and the flag if allowing empty referrer. // -// SetBucketReferer 设置bucket的referer访问白名单和是否允许referer字段为空的请求访问。 -// -// 防止用户在OSS上的数据被其他人盗用,OSS支持基于HTTP header中表头字段referer的防盗链方法。可以通过OSS控制台或者API的方式对 -// 一个bucket设置referer字段的白名单和是否允许referer字段为空的请求访问。例如,对于一个名为oss-example的bucket, -// 设置其referer白名单为http://www.aliyun.com。则所有referer为http://www.aliyun.com的请求才能访问oss-example -// 这个bucket中的object。如果您还需要了解更多信息,请参看 +// To avoid stealing link on OSS data, OSS supports the HTTP referrer header. A whitelist referrer could be set either by API or web console, as well as +// the allowing empty referrer flag. Note that this applies to requests from webbrowser only. +// For example, for a bucket os-example and its referrer http://www.aliyun.com, all requests from this URL could access the bucket. +// For more information, please check out this link : // https://help.aliyun.com/document_detail/oss/user_guide/security_management/referer.html // -// bucketName 存储空间名称。 -// referers 访问白名单列表。一个bucket可以支持多个referer参数。referer参数支持通配符"*"和"?"。 -// 用法请参看示例sample/bucket_referer.go -// allowEmptyReferer 指定是否允许referer字段为空的请求访问。 默认为true。 +// bucketName the bucket name. +// referers the referrer white list. A bucket could have a referrer list and each referrer supports one '*' and multiple '?' as wildcards. +// The sample could be found in sample/bucket_referer.go +// allowEmptyReferer the flag of allowing empty referrer. By default it's true. // -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) SetBucketReferer(bucketName string, referers []string, allowEmptyReferer bool) error { rxml := RefererXML{} @@ -343,25 +398,28 @@ func (client Client) SetBucketReferer(bucketName string, referers []string, allo headers := map[string]string{} headers[HTTPHeaderContentType] = contentType - resp, err := client.do("PUT", bucketName, "referer", "referer", headers, buffer) + params := map[string]interface{}{} + params["referer"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusOK}) + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) } +// GetBucketReferer gets the bucket's referrer white list. // -// GetBucketReferer 获得Bucket的白名单地址。 +// bucketName the bucket name. // -// bucketName 存储空间名称。 -// -// GetBucketRefererResponse 操作成功的返回值,error为nil时该返回值有效。 -// error 操作无错误时为nil,非nil为错误信息。 +// GetBucketRefererResponse the result object upon successful request. It's only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // func (client Client) GetBucketReferer(bucketName string) (GetBucketRefererResult, error) { var out GetBucketRefererResult - resp, err := client.do("GET", bucketName, "referer", "referer", nil, nil) + params := map[string]interface{}{} + params["referer"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) if err != nil { return out, err } @@ -371,18 +429,17 @@ func (client Client) GetBucketReferer(bucketName string) (GetBucketRefererResult return out, err } +// SetBucketLogging sets the bucket logging settings. // -// SetBucketLogging 修改Bucket的日志设置。 +// OSS could automatically store the access log. Only the bucket owner could enable the logging. +// Once enabled, OSS would save all the access log into hourly log files in a specified bucket. +// For more information, please check out https://help.aliyun.com/document_detail/oss/user_guide/security_management/logging.html // -// OSS为您提供自动保存访问日志记录功能。Bucket的拥有者可以开启访问日志记录功能。当一个bucket开启访问日志记录功能后, -// OSS自动将访问这个bucket的请求日志,以小时为单位,按照固定的命名规则,生成一个Object写入用户指定的bucket中。 -// 如果您需要更多,请参看 https://help.aliyun.com/document_detail/oss/user_guide/security_management/logging.html +// bucketName bucket name to enable the log. +// targetBucket the target bucket name to store the log files. +// targetPrefix the log files' prefix. // -// bucketName 需要记录访问日志的Bucket。 -// targetBucket 访问日志记录到的Bucket。 -// targetPrefix bucketName中需要存储访问日志记录的object前缀。为空记录所有object的访问日志。 -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) SetBucketLogging(bucketName, targetBucket, targetPrefix string, isEnable bool) error { @@ -409,41 +466,45 @@ func (client Client) SetBucketLogging(bucketName, targetBucket, targetPrefix str headers := map[string]string{} headers[HTTPHeaderContentType] = contentType - resp, err := client.do("PUT", bucketName, "logging", "logging", headers, buffer) + params := map[string]interface{}{} + params["logging"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusOK}) + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) } +// DeleteBucketLogging deletes the logging configuration to disable the logging on the bucket. // -// DeleteBucketLogging 删除Bucket的日志设置。 +// bucketName the bucket name to disable the logging. // -// bucketName 需要删除访问日志的Bucket。 -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) DeleteBucketLogging(bucketName string) error { - resp, err := client.do("DELETE", bucketName, "logging", "logging", nil, nil) + params := map[string]interface{}{} + params["logging"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusNoContent}) + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) } +// GetBucketLogging gets the bucket's logging settings // -// GetBucketLogging 获得Bucket的日志设置。 +// bucketName the bucket name +// GetBucketLoggingResponse the result object upon successful request. It's only valid when error is nil. // -// bucketName 需要删除访问日志的Bucket。 -// GetBucketLoggingResponse 操作成功的返回值,error为nil时该返回值有效。 -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) GetBucketLogging(bucketName string) (GetBucketLoggingResult, error) { var out GetBucketLoggingResult - resp, err := client.do("GET", bucketName, "logging", "logging", nil, nil) + params := map[string]interface{}{} + params["logging"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) if err != nil { return out, err } @@ -453,17 +514,16 @@ func (client Client) GetBucketLogging(bucketName string) (GetBucketLoggingResult return out, err } +// SetBucketWebsite sets the bucket's static website's index and error page. // -// SetBucketWebsite 设置/修改Bucket的默认首页以及错误页。 +// OSS supports static web site hosting for the bucket data. When the bucket is enabled with that, you can access the file in the bucket like the way to access a static website. +// For more information, please check out: https://help.aliyun.com/document_detail/oss/user_guide/static_host_website.html // -// OSS支持静态网站托管,Website操作可以将一个bucket设置成静态网站托管模式 。您可以将自己的Bucket配置成静态网站托管模式。 -// 如果您需要更多,请参看 https://help.aliyun.com/document_detail/oss/user_guide/static_host_website.html +// bucketName the bucket name to enable static web site. +// indexDocument index page. +// errorDocument error page. // -// bucketName 需要设置Website的Bucket。 -// indexDocument 索引文档。 -// errorDocument 错误文档。 -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) SetBucketWebsite(bucketName, indexDocument, errorDocument string) error { wxml := WebsiteXML{} @@ -481,41 +541,107 @@ func (client Client) SetBucketWebsite(bucketName, indexDocument, errorDocument s headers := make(map[string]string) headers[HTTPHeaderContentType] = contentType - resp, err := client.do("PUT", bucketName, "website", "website", headers, buffer) + params := map[string]interface{}{} + params["website"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusOK}) + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) } +// SetBucketWebsiteDetail sets the bucket's static website's detail // -// DeleteBucketWebsite 删除Bucket的Website设置。 +// OSS supports static web site hosting for the bucket data. When the bucket is enabled with that, you can access the file in the bucket like the way to access a static website. +// For more information, please check out: https://help.aliyun.com/document_detail/oss/user_guide/static_host_website.html // -// bucketName 需要删除website设置的Bucket。 +// bucketName the bucket name to enable static web site. // -// error 操作无错误为nil,非nil为错误信息。 +// wxml the website's detail +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) SetBucketWebsiteDetail(bucketName string, wxml WebsiteXML, options ...Option) error { + bs, err := xml.Marshal(wxml) + if err != nil { + return err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := make(map[string]string) + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + params["website"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// SetBucketWebsiteXml sets the bucket's static website's rule +// +// OSS supports static web site hosting for the bucket data. When the bucket is enabled with that, you can access the file in the bucket like the way to access a static website. +// For more information, please check out: https://help.aliyun.com/document_detail/oss/user_guide/static_host_website.html +// +// bucketName the bucket name to enable static web site. +// +// wxml the website's detail +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) SetBucketWebsiteXml(bucketName string, webXml string, options ...Option) error { + buffer := new(bytes.Buffer) + buffer.Write([]byte(webXml)) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := make(map[string]string) + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + params["website"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// DeleteBucketWebsite deletes the bucket's static web site settings. +// +// bucketName the bucket name. +// +// error it's nil if no error, otherwise it's an error object. // func (client Client) DeleteBucketWebsite(bucketName string) error { - resp, err := client.do("DELETE", bucketName, "website", "website", nil, nil) + params := map[string]interface{}{} + params["website"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusNoContent}) + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) } +// GetBucketWebsite gets the bucket's default page (index page) and the error page. // -// GetBucketWebsite 获得Bucket的默认首页以及错误页。 +// bucketName the bucket name // -// bucketName 存储空间名称。 -// -// GetBucketWebsiteResponse 操作成功的返回值,error为nil时该返回值有效。 -// error 操作无错误为nil,非nil为错误信息。 +// GetBucketWebsiteResponse the result object upon successful request. It's only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // func (client Client) GetBucketWebsite(bucketName string) (GetBucketWebsiteResult, error) { var out GetBucketWebsiteResult - resp, err := client.do("GET", bucketName, "website", "website", nil, nil) + params := map[string]interface{}{} + params["website"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) if err != nil { return out, err } @@ -525,15 +651,36 @@ func (client Client) GetBucketWebsite(bucketName string) (GetBucketWebsiteResult return out, err } +// GetBucketWebsiteXml gets the bucket's website config xml config. // -// SetBucketCORS 设置Bucket的跨域访问(CORS)规则。 +// bucketName the bucket name // -// 跨域访问的更多信息,请参看 https://help.aliyun.com/document_detail/oss/user_guide/security_management/cors.html +// string the bucket's xml config, It's only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. // -// bucketName 需要设置Website的Bucket。 -// corsRules 待设置的CORS规则。用法请参看示例代码sample/bucket_cors.go。 +func (client Client) GetBucketWebsiteXml(bucketName string) (string, error) { + params := map[string]interface{}{} + params["website"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) + if err != nil { + return "", err + } + defer resp.Body.Close() + + body, err := ioutil.ReadAll(resp.Body) + + out := string(body) + return out, err +} + +// SetBucketCORS sets the bucket's CORS rules // -// error 操作无错误为nil,非nil为错误信息。 +// For more information, please check out https://help.aliyun.com/document_detail/oss/user_guide/security_management/cors.html +// +// bucketName the bucket name +// corsRules the CORS rules to set. The related sample code is in sample/bucket_cors.go. +// +// error it's nil if no error, otherwise it's an error object. // func (client Client) SetBucketCORS(bucketName string, corsRules []CORSRule) error { corsxml := CORSXML{} @@ -558,42 +705,45 @@ func (client Client) SetBucketCORS(bucketName string, corsRules []CORSRule) erro headers := map[string]string{} headers[HTTPHeaderContentType] = contentType - resp, err := client.do("PUT", bucketName, "cors", "cors", headers, buffer) + params := map[string]interface{}{} + params["cors"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusOK}) + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) } +// DeleteBucketCORS deletes the bucket's static website settings. // -// DeleteBucketCORS 删除Bucket的Website设置。 +// bucketName the bucket name. // -// bucketName 需要删除cors设置的Bucket。 -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) DeleteBucketCORS(bucketName string) error { - resp, err := client.do("DELETE", bucketName, "cors", "cors", nil, nil) + params := map[string]interface{}{} + params["cors"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusNoContent}) + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) } +// GetBucketCORS gets the bucket's CORS settings. // -// GetBucketCORS 获得Bucket的CORS设置。 +// bucketName the bucket name. +// GetBucketCORSResult the result object upon successful request. It's only valid when error is nil. // -// -// bucketName 存储空间名称。 -// GetBucketCORSResult 操作成功的返回值,error为nil时该返回值有效。 -// -// error 操作无错误为nil,非nil为错误信息。 +// error it's nil if no error, otherwise it's an error object. // func (client Client) GetBucketCORS(bucketName string) (GetBucketCORSResult, error) { var out GetBucketCORSResult - resp, err := client.do("GET", bucketName, "cors", "cors", nil, nil) + params := map[string]interface{}{} + params["cors"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) if err != nil { return out, err } @@ -603,17 +753,192 @@ func (client Client) GetBucketCORS(bucketName string) (GetBucketCORSResult, erro return out, err } +// GetBucketInfo gets the bucket information. // -// GetBucketInfo 获得Bucket的信息。 +// bucketName the bucket name. +// GetBucketInfoResult the result object upon successful request. It's only valid when error is nil. // -// bucketName 存储空间名称。 -// GetBucketInfoResult 操作成功的返回值,error为nil时该返回值有效。 +// error it's nil if no error, otherwise it's an error object. // -// error 操作无错误为nil,非nil为错误信息。 -// -func (client Client) GetBucketInfo(bucketName string) (GetBucketInfoResult, error) { +func (client Client) GetBucketInfo(bucketName string, options ...Option) (GetBucketInfoResult, error) { var out GetBucketInfoResult - resp, err := client.do("GET", bucketName, "bucketInfo", "bucketInfo", nil, nil) + params := map[string]interface{}{} + params["bucketInfo"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + + // convert None to "" + if err == nil { + if out.BucketInfo.SseRule.KMSMasterKeyID == "None" { + out.BucketInfo.SseRule.KMSMasterKeyID = "" + } + + if out.BucketInfo.SseRule.SSEAlgorithm == "None" { + out.BucketInfo.SseRule.SSEAlgorithm = "" + } + + if out.BucketInfo.SseRule.KMSDataEncryption == "None" { + out.BucketInfo.SseRule.KMSDataEncryption = "" + } + } + return out, err +} + +// SetBucketVersioning set bucket versioning:Enabled、Suspended +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error object. +func (client Client) SetBucketVersioning(bucketName string, versioningConfig VersioningConfig, options ...Option) error { + var err error + var bs []byte + bs, err = xml.Marshal(versioningConfig) + + if err != nil { + return err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := map[string]string{} + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + params["versioning"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetBucketVersioning get bucket versioning status:Enabled、Suspended +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error object. +func (client Client) GetBucketVersioning(bucketName string, options ...Option) (GetBucketVersioningResult, error) { + var out GetBucketVersioningResult + params := map[string]interface{}{} + params["versioning"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// SetBucketEncryption set bucket encryption config +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error object. +func (client Client) SetBucketEncryption(bucketName string, encryptionRule ServerEncryptionRule, options ...Option) error { + var err error + var bs []byte + bs, err = xml.Marshal(encryptionRule) + + if err != nil { + return err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := map[string]string{} + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + params["encryption"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetBucketEncryption get bucket encryption +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error object. +func (client Client) GetBucketEncryption(bucketName string, options ...Option) (GetBucketEncryptionResult, error) { + var out GetBucketEncryptionResult + params := map[string]interface{}{} + params["encryption"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// DeleteBucketEncryption delete bucket encryption config +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error bucket +func (client Client) DeleteBucketEncryption(bucketName string, options ...Option) error { + params := map[string]interface{}{} + params["encryption"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil, options...) + + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +// +// SetBucketTagging add tagging to bucket +// bucketName name of bucket +// tagging tagging to be added +// error nil if success, otherwise error +func (client Client) SetBucketTagging(bucketName string, tagging Tagging, options ...Option) error { + var err error + var bs []byte + bs, err = xml.Marshal(tagging) + + if err != nil { + return err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := map[string]string{} + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + params["tagging"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetBucketTagging get tagging of the bucket +// bucketName name of bucket +// error nil if success, otherwise error +func (client Client) GetBucketTagging(bucketName string, options ...Option) (GetBucketTaggingResult, error) { + var out GetBucketTaggingResult + params := map[string]interface{}{} + params["tagging"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil, options...) if err != nil { return out, err } @@ -624,9 +949,658 @@ func (client Client) GetBucketInfo(bucketName string) (GetBucketInfoResult, erro } // -// UseCname 设置是否使用CNAME,默认不使用。 +// DeleteBucketTagging delete bucket tagging +// bucketName name of bucket +// error nil if success, otherwise error // -// isUseCname true设置endpoint格式是cname格式,false为非cname格式,默认false +func (client Client) DeleteBucketTagging(bucketName string, options ...Option) error { + params := map[string]interface{}{} + params["tagging"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +// GetBucketStat get bucket stat +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error object. +func (client Client) GetBucketStat(bucketName string) (GetBucketStatResult, error) { + var out GetBucketStatResult + params := map[string]interface{}{} + params["stat"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// GetBucketPolicy API operation for Object Storage Service. +// +// Get the policy from the bucket. +// +// bucketName the bucket name. +// +// string return the bucket's policy, and it's only valid when error is nil. +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) GetBucketPolicy(bucketName string, options ...Option) (string, error) { + params := map[string]interface{}{} + params["policy"] = nil + + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + if err != nil { + return "", err + } + defer resp.Body.Close() + + body, err := ioutil.ReadAll(resp.Body) + + out := string(body) + return out, err +} + +// SetBucketPolicy API operation for Object Storage Service. +// +// Set the policy from the bucket. +// +// bucketName the bucket name. +// +// policy the bucket policy. +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) SetBucketPolicy(bucketName string, policy string, options ...Option) error { + params := map[string]interface{}{} + params["policy"] = nil + + buffer := strings.NewReader(policy) + + resp, err := client.do("PUT", bucketName, params, nil, buffer, options...) + if err != nil { + return err + } + defer resp.Body.Close() + + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// DeleteBucketPolicy API operation for Object Storage Service. +// +// Deletes the policy from the bucket. +// +// bucketName the bucket name. +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) DeleteBucketPolicy(bucketName string, options ...Option) error { + params := map[string]interface{}{} + params["policy"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil, options...) + if err != nil { + return err + } + + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +// SetBucketRequestPayment API operation for Object Storage Service. +// +// Set the requestPayment of bucket +// +// bucketName the bucket name. +// +// paymentConfig the payment configuration +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) SetBucketRequestPayment(bucketName string, paymentConfig RequestPaymentConfiguration, options ...Option) error { + params := map[string]interface{}{} + params["requestPayment"] = nil + + var bs []byte + bs, err := xml.Marshal(paymentConfig) + + if err != nil { + return err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := map[string]string{} + headers[HTTPHeaderContentType] = contentType + + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetBucketRequestPayment API operation for Object Storage Service. +// +// Get bucket requestPayment +// +// bucketName the bucket name. +// +// RequestPaymentConfiguration the payment configuration +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) GetBucketRequestPayment(bucketName string, options ...Option) (RequestPaymentConfiguration, error) { + var out RequestPaymentConfiguration + params := map[string]interface{}{} + params["requestPayment"] = nil + + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// GetUserQoSInfo API operation for Object Storage Service. +// +// Get user qos. +// +// UserQoSConfiguration the User Qos and range Information. +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) GetUserQoSInfo(options ...Option) (UserQoSConfiguration, error) { + var out UserQoSConfiguration + params := map[string]interface{}{} + params["qosInfo"] = nil + + resp, err := client.do("GET", "", params, nil, nil, options...) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// SetBucketQoSInfo API operation for Object Storage Service. +// +// Set Bucket Qos information. +// +// bucketName the bucket name. +// +// qosConf the qos configuration. +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) SetBucketQoSInfo(bucketName string, qosConf BucketQoSConfiguration, options ...Option) error { + params := map[string]interface{}{} + params["qosInfo"] = nil + + var bs []byte + bs, err := xml.Marshal(qosConf) + if err != nil { + return err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentTpye := http.DetectContentType(buffer.Bytes()) + headers := map[string]string{} + headers[HTTPHeaderContentType] = contentTpye + + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + if err != nil { + return err + } + + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetBucketQosInfo API operation for Object Storage Service. +// +// Get Bucket Qos information. +// +// bucketName the bucket name. +// +// BucketQoSConfiguration the return qos configuration. +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) GetBucketQosInfo(bucketName string, options ...Option) (BucketQoSConfiguration, error) { + var out BucketQoSConfiguration + params := map[string]interface{}{} + params["qosInfo"] = nil + + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// DeleteBucketQosInfo API operation for Object Storage Service. +// +// Delete Bucket QoS information. +// +// bucketName the bucket name. +// +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) DeleteBucketQosInfo(bucketName string, options ...Option) error { + params := map[string]interface{}{} + params["qosInfo"] = nil + + resp, err := client.do("DELETE", bucketName, params, nil, nil, options...) + if err != nil { + return err + } + defer resp.Body.Close() + + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +// SetBucketInventory API operation for Object Storage Service +// +// Set the Bucket inventory. +// +// bucketName tht bucket name. +// +// inventoryConfig the inventory configuration. +// +// error it's nil if no error, otherwise it's an error. +// +func (client Client) SetBucketInventory(bucketName string, inventoryConfig InventoryConfiguration, options ...Option) error { + params := map[string]interface{}{} + params["inventoryId"] = inventoryConfig.Id + params["inventory"] = nil + + var bs []byte + bs, err := xml.Marshal(inventoryConfig) + + if err != nil { + return err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := make(map[string]string) + headers[HTTPHeaderContentType] = contentType + + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + + if err != nil { + return err + } + + defer resp.Body.Close() + + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetBucketInventory API operation for Object Storage Service +// +// Get the Bucket inventory. +// +// bucketName tht bucket name. +// +// strInventoryId the inventory id. +// +// InventoryConfiguration the inventory configuration. +// +// error it's nil if no error, otherwise it's an error. +// +func (client Client) GetBucketInventory(bucketName string, strInventoryId string, options ...Option) (InventoryConfiguration, error) { + var out InventoryConfiguration + params := map[string]interface{}{} + params["inventory"] = nil + params["inventoryId"] = strInventoryId + + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// ListBucketInventory API operation for Object Storage Service +// +// List the Bucket inventory. +// +// bucketName tht bucket name. +// +// continuationToken the users token. +// +// ListInventoryConfigurationsResult list all inventory configuration by . +// +// error it's nil if no error, otherwise it's an error. +// +func (client Client) ListBucketInventory(bucketName, continuationToken string, options ...Option) (ListInventoryConfigurationsResult, error) { + var out ListInventoryConfigurationsResult + params := map[string]interface{}{} + params["inventory"] = nil + if continuationToken == "" { + params["continuation-token"] = nil + } else { + params["continuation-token"] = continuationToken + } + + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// DeleteBucketInventory API operation for Object Storage Service. +// +// Delete Bucket inventory information. +// +// bucketName tht bucket name. +// +// strInventoryId the inventory id. +// +// error it's nil if no error, otherwise it's an error. +// +func (client Client) DeleteBucketInventory(bucketName, strInventoryId string, options ...Option) error { + params := map[string]interface{}{} + params["inventory"] = nil + params["inventoryId"] = strInventoryId + + resp, err := client.do("DELETE", bucketName, params, nil, nil, options...) + if err != nil { + return err + } + defer resp.Body.Close() + + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +// SetBucketAsyncTask API operation for set async fetch task +// +// bucketName tht bucket name. +// +// asynConf configruation +// +// error it's nil if success, otherwise it's an error. +func (client Client) SetBucketAsyncTask(bucketName string, asynConf AsyncFetchTaskConfiguration, options ...Option) (AsyncFetchTaskResult, error) { + var out AsyncFetchTaskResult + params := map[string]interface{}{} + params["asyncFetch"] = nil + + var bs []byte + bs, err := xml.Marshal(asynConf) + + if err != nil { + return out, err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := make(map[string]string) + headers[HTTPHeaderContentType] = contentType + + resp, err := client.do("POST", bucketName, params, headers, buffer, options...) + + if err != nil { + return out, err + } + + defer resp.Body.Close() + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// GetBucketAsyncTask API operation for set async fetch task +// +// bucketName tht bucket name. +// +// taskid returned by SetBucketAsyncTask +// +// error it's nil if success, otherwise it's an error. +func (client Client) GetBucketAsyncTask(bucketName string, taskID string, options ...Option) (AsynFetchTaskInfo, error) { + var out AsynFetchTaskInfo + params := map[string]interface{}{} + params["asyncFetch"] = nil + + headers := make(map[string]string) + headers[HTTPHeaderOssTaskID] = taskID + resp, err := client.do("GET", bucketName, params, headers, nil, options...) + if err != nil { + return out, err + } + defer resp.Body.Close() + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// InitiateBucketWorm creates bucket worm Configuration +// bucketName the bucket name. +// retentionDays the retention period in days +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) InitiateBucketWorm(bucketName string, retentionDays int, options ...Option) (string, error) { + var initiateWormConf InitiateWormConfiguration + initiateWormConf.RetentionPeriodInDays = retentionDays + + var respHeader http.Header + isOptSet, _, _ := IsOptionSet(options, responseHeader) + if !isOptSet { + options = append(options, GetResponseHeader(&respHeader)) + } + + bs, err := xml.Marshal(initiateWormConf) + if err != nil { + return "", err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := make(map[string]string) + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + params["worm"] = nil + + resp, err := client.do("POST", bucketName, params, headers, buffer, options...) + if err != nil { + return "", err + } + defer resp.Body.Close() + + respOpt, _ := FindOption(options, responseHeader, nil) + wormID := "" + err = CheckRespCode(resp.StatusCode, []int{http.StatusOK}) + if err == nil && respOpt != nil { + wormID = (respOpt.(*http.Header)).Get("x-oss-worm-id") + } + return wormID, err +} + +// AbortBucketWorm delete bucket worm Configuration +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) AbortBucketWorm(bucketName string, options ...Option) error { + params := map[string]interface{}{} + params["worm"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +// CompleteBucketWorm complete bucket worm Configuration +// bucketName the bucket name. +// wormID the worm id +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) CompleteBucketWorm(bucketName string, wormID string, options ...Option) error { + params := map[string]interface{}{} + params["wormId"] = wormID + resp, err := client.do("POST", bucketName, params, nil, nil, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// ExtendBucketWorm exetend bucket worm Configuration +// bucketName the bucket name. +// retentionDays the retention period in days +// wormID the worm id +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) ExtendBucketWorm(bucketName string, retentionDays int, wormID string, options ...Option) error { + var extendWormConf ExtendWormConfiguration + extendWormConf.RetentionPeriodInDays = retentionDays + + bs, err := xml.Marshal(extendWormConf) + if err != nil { + return err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := make(map[string]string) + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + params["wormId"] = wormID + params["wormExtend"] = nil + + resp, err := client.do("POST", bucketName, params, headers, buffer, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetBucketWorm get bucket worm Configuration +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) GetBucketWorm(bucketName string, options ...Option) (WormConfiguration, error) { + var out WormConfiguration + params := map[string]interface{}{} + params["worm"] = nil + + resp, err := client.do("GET", bucketName, params, nil, nil, options...) + if err != nil { + return out, err + } + defer resp.Body.Close() + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// SetBucketTransferAcc set bucket transfer acceleration configuration +// bucketName the bucket name. +// accConf bucket transfer acceleration configuration +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) SetBucketTransferAcc(bucketName string, accConf TransferAccConfiguration, options ...Option) error { + bs, err := xml.Marshal(accConf) + if err != nil { + return err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + + contentType := http.DetectContentType(buffer.Bytes()) + headers := make(map[string]string) + headers[HTTPHeaderContentType] = contentType + + params := map[string]interface{}{} + params["transferAcceleration"] = nil + resp, err := client.do("PUT", bucketName, params, headers, buffer, options...) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetBucketTransferAcc get bucket transfer acceleration configuration +// bucketName the bucket name. +// accConf bucket transfer acceleration configuration +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) GetBucketTransferAcc(bucketName string, options ...Option) (TransferAccConfiguration, error) { + var out TransferAccConfiguration + params := map[string]interface{}{} + params["transferAcceleration"] = nil + resp, err := client.do("GET", bucketName, params, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// DeleteBucketTransferAcc delete bucket transfer acceleration configuration +// bucketName the bucket name. +// error it's nil if no error, otherwise it's an error object. +// +func (client Client) DeleteBucketTransferAcc(bucketName string, options ...Option) error { + params := map[string]interface{}{} + params["transferAcceleration"] = nil + resp, err := client.do("DELETE", bucketName, params, nil, nil) + if err != nil { + return err + } + defer resp.Body.Close() + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +// LimitUploadSpeed set upload bandwidth limit speed,default is 0,unlimited +// upSpeed KB/s, 0 is unlimited,default is 0 +// error it's nil if success, otherwise failure +func (client Client) LimitUploadSpeed(upSpeed int) error { + if client.Config == nil { + return fmt.Errorf("client config is nil") + } + return client.Config.LimitUploadSpeed(upSpeed) +} + +// UseCname sets the flag of using CName. By default it's false. +// +// isUseCname true: the endpoint has the CName, false: the endpoint does not have cname. Default is false. // func UseCname(isUseCname bool) ClientOption { return func(client *Client) { @@ -635,11 +1609,10 @@ func UseCname(isUseCname bool) ClientOption { } } +// Timeout sets the HTTP timeout in seconds. // -// Timeout 设置HTTP超时时间。 -// -// connectTimeoutSec HTTP链接超时时间,单位是秒,默认10秒。0表示永不超时。 -// readWriteTimeout HTTP发送接受数据超时时间,单位是秒,默认20秒。0表示永不超时。 +// connectTimeoutSec HTTP timeout in seconds. Default is 10 seconds. 0 means infinite (not recommended) +// readWriteTimeout HTTP read or write's timeout in seconds. Default is 20 seconds. 0 means infinite. // func Timeout(connectTimeoutSec, readWriteTimeout int64) ClientOption { return func(client *Client) { @@ -649,15 +1622,16 @@ func Timeout(connectTimeoutSec, readWriteTimeout int64) ClientOption { time.Second * time.Duration(readWriteTimeout) client.Config.HTTPTimeout.HeaderTimeout = time.Second * time.Duration(readWriteTimeout) + client.Config.HTTPTimeout.IdleConnTimeout = + time.Second * time.Duration(readWriteTimeout) client.Config.HTTPTimeout.LongTimeout = time.Second * time.Duration(readWriteTimeout*10) } } +// SecurityToken sets the temporary user's SecurityToken. // -// SecurityToken 临时用户设置SecurityToken。 -// -// token STS token +// token STS token // func SecurityToken(token string) ClientOption { return func(client *Client) { @@ -665,10 +1639,9 @@ func SecurityToken(token string) ClientOption { } } +// EnableMD5 enables MD5 validation. // -// EnableMD5 是否启用MD5校验,默认启用。 -// -// isEnableMD5 true启用MD5校验,false不启用MD5校验 +// isEnableMD5 true: enable MD5 validation; false: disable MD5 validation. // func EnableMD5(isEnableMD5 bool) ClientOption { return func(client *Client) { @@ -676,10 +1649,9 @@ func EnableMD5(isEnableMD5 bool) ClientOption { } } +// MD5ThresholdCalcInMemory sets the memory usage threshold for computing the MD5, default is 16MB. // -// MD5ThresholdCalcInMemory 使用内存计算MD5值的上限,默认16MB。 -// -// threshold 单位Byte。上传内容小于threshold在MD5在内存中计算,大于使用临时文件计算MD5 +// threshold the memory threshold in bytes. When the uploaded content is more than 16MB, the temp file is used for computing the MD5. // func MD5ThresholdCalcInMemory(threshold int64) ClientOption { return func(client *Client) { @@ -687,10 +1659,9 @@ func MD5ThresholdCalcInMemory(threshold int64) ClientOption { } } +// EnableCRC enables the CRC checksum. Default is true. // -// EnableCRC 上传是否启用CRC校验,默认启用。 -// -// isEnableCRC true启用CRC校验,false不启用CRC校验 +// isEnableCRC true: enable CRC checksum; false: disable the CRC checksum. // func EnableCRC(isEnableCRC bool) ClientOption { return func(client *Client) { @@ -698,21 +1669,20 @@ func EnableCRC(isEnableCRC bool) ClientOption { } } +// UserAgent specifies UserAgent. The default is aliyun-sdk-go/1.2.0 (windows/-/amd64;go1.5.2). // -// UserAgent 指定UserAgent,默认如下aliyun-sdk-go/1.2.0 (windows/-/amd64;go1.5.2)。 -// -// userAgent user agent字符串。 +// userAgent the user agent string. // func UserAgent(userAgent string) ClientOption { return func(client *Client) { client.Config.UserAgent = userAgent + client.Config.UserSetUa = true } } +// Proxy sets the proxy (optional). The default is not using proxy. // -// Proxy 设置代理服务器,默认不使用代理。 -// -// proxyHost 代理服务器地址,格式是host或host:port +// proxyHost the proxy host in the format "host:port". For example, proxy.com:80 . // func Proxy(proxyHost string) ClientOption { return func(client *Client) { @@ -722,12 +1692,11 @@ func Proxy(proxyHost string) ClientOption { } } +// AuthProxy sets the proxy information with user name and password. // -// AuthProxy 设置需要认证的代理服务器,默认不使用代理。 -// -// proxyHost 代理服务器地址,格式是host或host:port -// proxyUser 代理服务器认证的用户名 -// proxyPassword 代理服务器认证的用户密码 +// proxyHost the proxy host in the format "host:port". For example, proxy.com:80 . +// proxyUser the proxy user name. +// proxyPassword the proxy password. // func AuthProxy(proxyHost, proxyUser, proxyPassword string) ClientOption { return func(client *Client) { @@ -740,9 +1709,102 @@ func AuthProxy(proxyHost, proxyUser, proxyPassword string) ClientOption { } } -// Private -func (client Client) do(method, bucketName, urlParams, subResource string, - headers map[string]string, data io.Reader) (*Response, error) { - return client.Conn.Do(method, bucketName, "", urlParams, - subResource, headers, data, 0, nil) +// +// HTTPClient sets the http.Client in use to the one passed in +// +func HTTPClient(HTTPClient *http.Client) ClientOption { + return func(client *Client) { + client.HTTPClient = HTTPClient + } +} + +// +// SetLogLevel sets the oss sdk log level +// +func SetLogLevel(LogLevel int) ClientOption { + return func(client *Client) { + client.Config.LogLevel = LogLevel + } +} + +// +// SetLogger sets the oss sdk logger +// +func SetLogger(Logger *log.Logger) ClientOption { + return func(client *Client) { + client.Config.Logger = Logger + } +} + +// SetCredentialsProvider sets funciton for get the user's ak +func SetCredentialsProvider(provider CredentialsProvider) ClientOption { + return func(client *Client) { + client.Config.CredentialsProvider = provider + } +} + +// SetLocalAddr sets funciton for local addr +func SetLocalAddr(localAddr net.Addr) ClientOption { + return func(client *Client) { + client.Config.LocalAddr = localAddr + } +} + +// AuthVersion sets auth version: v1 or v2 signature which oss_server needed +func AuthVersion(authVersion AuthVersionType) ClientOption { + return func(client *Client) { + client.Config.AuthVersion = authVersion + } +} + +// AdditionalHeaders sets special http headers needed to be signed +func AdditionalHeaders(headers []string) ClientOption { + return func(client *Client) { + client.Config.AdditionalHeaders = headers + } +} + +// only effective from go1.7 onward,RedirectEnabled set http redirect enabled or not +func RedirectEnabled(enabled bool) ClientOption { + return func(client *Client) { + client.Config.RedirectEnabled = enabled + } +} + +// Private +func (client Client) do(method, bucketName string, params map[string]interface{}, + headers map[string]string, data io.Reader, options ...Option) (*Response, error) { + err := CheckBucketName(bucketName) + if len(bucketName) > 0 && err != nil { + return nil, err + } + + // option headers + addHeaders := make(map[string]string) + err = handleOptions(addHeaders, options) + if err != nil { + return nil, err + } + + // merge header + if headers == nil { + headers = make(map[string]string) + } + + for k, v := range addHeaders { + if _, ok := headers[k]; !ok { + headers[k] = v + } + } + + resp, err := client.Conn.Do(method, bucketName, "", params, headers, data, 0, nil) + + // get response header + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil { + pRespHeader := respHeader.(*http.Header) + *pRespHeader = resp.Headers + } + + return resp, err } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/conf.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/conf.go index e8bee299e..55e5e370a 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/conf.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/conf.go @@ -1,40 +1,146 @@ package oss import ( + "bytes" + "fmt" + "log" + "net" + "os" "time" ) -// HTTPTimeout http timeout +// Define the level of the output log +const ( + LogOff = iota + Error + Warn + Info + Debug +) + +// LogTag Tag for each level of log +var LogTag = []string{"[error]", "[warn]", "[info]", "[debug]"} + +// HTTPTimeout defines HTTP timeout. type HTTPTimeout struct { ConnectTimeout time.Duration ReadWriteTimeout time.Duration HeaderTimeout time.Duration LongTimeout time.Duration + IdleConnTimeout time.Duration } -// Config oss configure +// HTTPMaxConns defines max idle connections and max idle connections per host +type HTTPMaxConns struct { + MaxIdleConns int + MaxIdleConnsPerHost int +} + +// CredentialInf is interface for get AccessKeyID,AccessKeySecret,SecurityToken +type Credentials interface { + GetAccessKeyID() string + GetAccessKeySecret() string + GetSecurityToken() string +} + +// CredentialInfBuild is interface for get CredentialInf +type CredentialsProvider interface { + GetCredentials() Credentials +} + +type defaultCredentials struct { + config *Config +} + +func (defCre *defaultCredentials) GetAccessKeyID() string { + return defCre.config.AccessKeyID +} + +func (defCre *defaultCredentials) GetAccessKeySecret() string { + return defCre.config.AccessKeySecret +} + +func (defCre *defaultCredentials) GetSecurityToken() string { + return defCre.config.SecurityToken +} + +type defaultCredentialsProvider struct { + config *Config +} + +func (defBuild *defaultCredentialsProvider) GetCredentials() Credentials { + return &defaultCredentials{config: defBuild.config} +} + +// Config defines oss configuration type Config struct { - Endpoint string // oss地址 - AccessKeyID string // accessId - AccessKeySecret string // accessKey - RetryTimes uint // 失败重试次数,默认5 - UserAgent string // SDK名称/版本/系统信息 - IsDebug bool // 是否开启调试模式,默认false - Timeout uint // 超时时间,默认60s - SecurityToken string // STS Token - IsCname bool // Endpoint是否是CNAME - HTTPTimeout HTTPTimeout // HTTP的超时时间设置 - IsUseProxy bool // 是否使用代理 - ProxyHost string // 代理服务器地址 - IsAuthProxy bool // 代理服务器是否使用用户认证 - ProxyUser string // 代理服务器认证用户名 - ProxyPassword string // 代理服务器认证密码 - IsEnableMD5 bool // 上传数据时是否启用MD5校验 - MD5Threshold int64 // 内存中计算MD5的上线大小,大于该值启用临时文件,单位Byte - IsEnableCRC bool // 上传数据时是否启用CRC64校验 + Endpoint string // OSS endpoint + AccessKeyID string // AccessId + AccessKeySecret string // AccessKey + RetryTimes uint // Retry count by default it's 5. + UserAgent string // SDK name/version/system information + IsDebug bool // Enable debug mode. Default is false. + Timeout uint // Timeout in seconds. By default it's 60. + SecurityToken string // STS Token + IsCname bool // If cname is in the endpoint. + HTTPTimeout HTTPTimeout // HTTP timeout + HTTPMaxConns HTTPMaxConns // Http max connections + IsUseProxy bool // Flag of using proxy. + ProxyHost string // Flag of using proxy host. + IsAuthProxy bool // Flag of needing authentication. + ProxyUser string // Proxy user + ProxyPassword string // Proxy password + IsEnableMD5 bool // Flag of enabling MD5 for upload. + MD5Threshold int64 // Memory footprint threshold for each MD5 computation (16MB is the default), in byte. When the data is more than that, temp file is used. + IsEnableCRC bool // Flag of enabling CRC for upload. + LogLevel int // Log level + Logger *log.Logger // For write log + UploadLimitSpeed int // Upload limit speed:KB/s, 0 is unlimited + UploadLimiter *OssLimiter // Bandwidth limit reader for upload + CredentialsProvider CredentialsProvider // User provides interface to get AccessKeyID, AccessKeySecret, SecurityToken + LocalAddr net.Addr // local client host info + UserSetUa bool // UserAgent is set by user or not + AuthVersion AuthVersionType // v1 or v2 signature,default is v1 + AdditionalHeaders []string // special http headers needed to be sign + RedirectEnabled bool // only effective from go1.7 onward, enable http redirect or not } -// 获取默认配置 +// LimitUploadSpeed uploadSpeed:KB/s, 0 is unlimited,default is 0 +func (config *Config) LimitUploadSpeed(uploadSpeed int) error { + if uploadSpeed < 0 { + return fmt.Errorf("invalid argument, the value of uploadSpeed is less than 0") + } else if uploadSpeed == 0 { + config.UploadLimitSpeed = 0 + config.UploadLimiter = nil + return nil + } + + var err error + config.UploadLimiter, err = GetOssLimiter(uploadSpeed) + if err == nil { + config.UploadLimitSpeed = uploadSpeed + } + return err +} + +// WriteLog output log function +func (config *Config) WriteLog(LogLevel int, format string, a ...interface{}) { + if config.LogLevel < LogLevel || config.Logger == nil { + return + } + + var logBuffer bytes.Buffer + logBuffer.WriteString(LogTag[LogLevel-1]) + logBuffer.WriteString(fmt.Sprintf(format, a...)) + config.Logger.Printf("%s", logBuffer.String()) +} + +// for get Credentials +func (config *Config) GetCredentials() Credentials { + return config.CredentialsProvider.GetCredentials() +} + +// getDefaultOssConfig gets the default configuration. func getDefaultOssConfig() *Config { config := Config{} @@ -43,8 +149,8 @@ func getDefaultOssConfig() *Config { config.AccessKeySecret = "" config.RetryTimes = 5 config.IsDebug = false - config.UserAgent = userAgent - config.Timeout = 60 // seconds + config.UserAgent = userAgent() + config.Timeout = 60 // Seconds config.SecurityToken = "" config.IsCname = false @@ -52,6 +158,9 @@ func getDefaultOssConfig() *Config { config.HTTPTimeout.ReadWriteTimeout = time.Second * 60 // 60s config.HTTPTimeout.HeaderTimeout = time.Second * 60 // 60s config.HTTPTimeout.LongTimeout = time.Second * 300 // 300s + config.HTTPTimeout.IdleConnTimeout = time.Second * 50 // 50s + config.HTTPMaxConns.MaxIdleConns = 100 + config.HTTPMaxConns.MaxIdleConnsPerHost = 100 config.IsUseProxy = false config.ProxyHost = "" @@ -63,5 +172,14 @@ func getDefaultOssConfig() *Config { config.IsEnableMD5 = false config.IsEnableCRC = true + config.LogLevel = LogOff + config.Logger = log.New(os.Stdout, "", log.LstdFlags) + + provider := &defaultCredentialsProvider{config: &config} + config.CredentialsProvider = provider + + config.AuthVersion = AuthV1 + config.RedirectEnabled = true + return &config } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/conn.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/conn.go index 77707bd92..fbbb1bb7e 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/conn.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/conn.go @@ -4,6 +4,7 @@ import ( "bytes" "crypto/md5" "encoding/base64" + "encoding/json" "encoding/xml" "fmt" "hash" @@ -13,64 +14,245 @@ import ( "net/http" "net/url" "os" + "sort" "strconv" "strings" "time" ) -// Conn oss conn +// Conn defines OSS Conn type Conn struct { config *Config url *urlMaker client *http.Client } -// init 初始化Conn -func (conn *Conn) init(config *Config, urlMaker *urlMaker) error { - httpTimeOut := conn.config.HTTPTimeout +var signKeyList = []string{"acl", "uploads", "location", "cors", + "logging", "website", "referer", "lifecycle", + "delete", "append", "tagging", "objectMeta", + "uploadId", "partNumber", "security-token", + "position", "img", "style", "styleName", + "replication", "replicationProgress", + "replicationLocation", "cname", "bucketInfo", + "comp", "qos", "live", "status", "vod", + "startTime", "endTime", "symlink", + "x-oss-process", "response-content-type", "x-oss-traffic-limit", + "response-content-language", "response-expires", + "response-cache-control", "response-content-disposition", + "response-content-encoding", "udf", "udfName", "udfImage", + "udfId", "udfImageDesc", "udfApplication", "comp", + "udfApplicationLog", "restore", "callback", "callback-var", "qosInfo", + "policy", "stat", "encryption", "versions", "versioning", "versionId", "requestPayment", + "x-oss-request-payer", "sequential", + "inventory", "inventoryId", "continuation-token", "asyncFetch", + "worm", "wormId", "wormExtend", "withHashContext", + "x-oss-enable-md5", "x-oss-enable-sha1", "x-oss-enable-sha256", + "x-oss-hash-ctx", "x-oss-md5-ctx", "transferAcceleration", +} - // new Transport - transport := &http.Transport{ - Dial: func(netw, addr string) (net.Conn, error) { - conn, err := net.DialTimeout(netw, addr, httpTimeOut.ConnectTimeout) +// init initializes Conn +func (conn *Conn) init(config *Config, urlMaker *urlMaker, client *http.Client) error { + if client == nil { + // New transport + transport := newTransport(conn, config) + + // Proxy + if conn.config.IsUseProxy { + proxyURL, err := url.Parse(config.ProxyHost) if err != nil { - return nil, err + return err } - return newTimeoutConn(conn, httpTimeOut.ReadWriteTimeout, httpTimeOut.LongTimeout), nil - }, - ResponseHeaderTimeout: httpTimeOut.HeaderTimeout, - } - - // Proxy - if conn.config.IsUseProxy { - proxyURL, err := url.Parse(config.ProxyHost) - if err != nil { - return err + if config.IsAuthProxy { + if config.ProxyPassword != "" { + proxyURL.User = url.UserPassword(config.ProxyUser, config.ProxyPassword) + } else { + proxyURL.User = url.User(config.ProxyUser) + } + } + transport.Proxy = http.ProxyURL(proxyURL) + } + client = &http.Client{Transport: transport} + if !config.RedirectEnabled { + disableHTTPRedirect(client) } - transport.Proxy = http.ProxyURL(proxyURL) } conn.config = config conn.url = urlMaker - conn.client = &http.Client{Transport: transport} + conn.client = client return nil } -// Do 处理请求,返回响应结果。 -func (conn Conn) Do(method, bucketName, objectName, urlParams, subResource string, headers map[string]string, +// Do sends request and returns the response +func (conn Conn) Do(method, bucketName, objectName string, params map[string]interface{}, headers map[string]string, data io.Reader, initCRC uint64, listener ProgressListener) (*Response, error) { + urlParams := conn.getURLParams(params) + subResource := conn.getSubResource(params) uri := conn.url.getURL(bucketName, objectName, urlParams) - resource := conn.url.getResource(bucketName, objectName, subResource) + resource := conn.getResource(bucketName, objectName, subResource) return conn.doRequest(method, uri, resource, headers, data, initCRC, listener) } +// DoURL sends the request with signed URL and returns the response result. +func (conn Conn) DoURL(method HTTPMethod, signedURL string, headers map[string]string, + data io.Reader, initCRC uint64, listener ProgressListener) (*Response, error) { + // Get URI from signedURL + uri, err := url.ParseRequestURI(signedURL) + if err != nil { + return nil, err + } + + m := strings.ToUpper(string(method)) + req := &http.Request{ + Method: m, + URL: uri, + Proto: "HTTP/1.1", + ProtoMajor: 1, + ProtoMinor: 1, + Header: make(http.Header), + Host: uri.Host, + } + + tracker := &readerTracker{completedBytes: 0} + fd, crc := conn.handleBody(req, data, initCRC, listener, tracker) + if fd != nil { + defer func() { + fd.Close() + os.Remove(fd.Name()) + }() + } + + if conn.config.IsAuthProxy { + auth := conn.config.ProxyUser + ":" + conn.config.ProxyPassword + basic := "Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + req.Header.Set("Proxy-Authorization", basic) + } + + req.Header.Set(HTTPHeaderHost, req.Host) + req.Header.Set(HTTPHeaderUserAgent, conn.config.UserAgent) + + if headers != nil { + for k, v := range headers { + req.Header.Set(k, v) + } + } + + // Transfer started + event := newProgressEvent(TransferStartedEvent, 0, req.ContentLength, 0) + publishProgress(listener, event) + + if conn.config.LogLevel >= Debug { + conn.LoggerHTTPReq(req) + } + + resp, err := conn.client.Do(req) + if err != nil { + // Transfer failed + event = newProgressEvent(TransferFailedEvent, tracker.completedBytes, req.ContentLength, 0) + publishProgress(listener, event) + conn.config.WriteLog(Debug, "[Resp:%p]http error:%s\n", req, err.Error()) + return nil, err + } + + if conn.config.LogLevel >= Debug { + //print out http resp + conn.LoggerHTTPResp(req, resp) + } + + // Transfer completed + event = newProgressEvent(TransferCompletedEvent, tracker.completedBytes, req.ContentLength, 0) + publishProgress(listener, event) + + return conn.handleResponse(resp, crc) +} + +func (conn Conn) getURLParams(params map[string]interface{}) string { + // Sort + keys := make([]string, 0, len(params)) + for k := range params { + keys = append(keys, k) + } + sort.Strings(keys) + + // Serialize + var buf bytes.Buffer + for _, k := range keys { + if buf.Len() > 0 { + buf.WriteByte('&') + } + buf.WriteString(url.QueryEscape(k)) + if params[k] != nil { + buf.WriteString("=" + strings.Replace(url.QueryEscape(params[k].(string)), "+", "%20", -1)) + } + } + + return buf.String() +} + +func (conn Conn) getSubResource(params map[string]interface{}) string { + // Sort + keys := make([]string, 0, len(params)) + signParams := make(map[string]string) + for k := range params { + if conn.config.AuthVersion == AuthV2 { + encodedKey := url.QueryEscape(k) + keys = append(keys, encodedKey) + if params[k] != nil && params[k] != "" { + signParams[encodedKey] = strings.Replace(url.QueryEscape(params[k].(string)), "+", "%20", -1) + } + } else if conn.isParamSign(k) { + keys = append(keys, k) + if params[k] != nil { + signParams[k] = params[k].(string) + } + } + } + sort.Strings(keys) + + // Serialize + var buf bytes.Buffer + for _, k := range keys { + if buf.Len() > 0 { + buf.WriteByte('&') + } + buf.WriteString(k) + if _, ok := signParams[k]; ok { + buf.WriteString("=" + signParams[k]) + } + } + return buf.String() +} + +func (conn Conn) isParamSign(paramKey string) bool { + for _, k := range signKeyList { + if paramKey == k { + return true + } + } + return false +} + +// getResource gets canonicalized resource +func (conn Conn) getResource(bucketName, objectName, subResource string) string { + if subResource != "" { + subResource = "?" + subResource + } + if bucketName == "" { + if conn.config.AuthVersion == AuthV2 { + return url.QueryEscape("/") + subResource + } + return fmt.Sprintf("/%s%s", bucketName, subResource) + } + if conn.config.AuthVersion == AuthV2 { + return url.QueryEscape("/"+bucketName+"/") + strings.Replace(url.QueryEscape(objectName), "+", "%20", -1) + subResource + } + return fmt.Sprintf("/%s/%s%s", bucketName, objectName, subResource) +} + func (conn Conn) doRequest(method string, uri *url.URL, canonicalizedResource string, headers map[string]string, data io.Reader, initCRC uint64, listener ProgressListener) (*Response, error) { method = strings.ToUpper(method) - if !conn.config.IsUseProxy { - uri.Opaque = uri.Path - } req := &http.Request{ Method: method, URL: uri, @@ -98,10 +280,12 @@ func (conn Conn) doRequest(method string, uri *url.URL, canonicalizedResource st date := time.Now().UTC().Format(http.TimeFormat) req.Header.Set(HTTPHeaderDate, date) - req.Header.Set(HTTPHeaderHost, conn.config.Endpoint) + req.Header.Set(HTTPHeaderHost, req.Host) req.Header.Set(HTTPHeaderUserAgent, conn.config.UserAgent) - if conn.config.SecurityToken != "" { - req.Header.Set(HTTPHeaderOssSecurityToken, conn.config.SecurityToken) + + akIf := conn.config.GetCredentials() + if akIf.GetSecurityToken() != "" { + req.Header.Set(HTTPHeaderOssSecurityToken, akIf.GetSecurityToken()) } if headers != nil { @@ -112,76 +296,173 @@ func (conn Conn) doRequest(method string, uri *url.URL, canonicalizedResource st conn.signHeader(req, canonicalizedResource) - // transfer started - event := newProgressEvent(TransferStartedEvent, 0, req.ContentLength) + // Transfer started + event := newProgressEvent(TransferStartedEvent, 0, req.ContentLength, 0) publishProgress(listener, event) + if conn.config.LogLevel >= Debug { + conn.LoggerHTTPReq(req) + } + resp, err := conn.client.Do(req) + if err != nil { - // transfer failed - event = newProgressEvent(TransferFailedEvent, tracker.completedBytes, req.ContentLength) + // Transfer failed + event = newProgressEvent(TransferFailedEvent, tracker.completedBytes, req.ContentLength, 0) publishProgress(listener, event) + conn.config.WriteLog(Debug, "[Resp:%p]http error:%s\n", req, err.Error()) return nil, err } - // transfer completed - event = newProgressEvent(TransferCompletedEvent, tracker.completedBytes, req.ContentLength) + if conn.config.LogLevel >= Debug { + //print out http resp + conn.LoggerHTTPResp(req, resp) + } + + // Transfer completed + event = newProgressEvent(TransferCompletedEvent, tracker.completedBytes, req.ContentLength, 0) publishProgress(listener, event) return conn.handleResponse(resp, crc) } -// handle request body +func (conn Conn) signURL(method HTTPMethod, bucketName, objectName string, expiration int64, params map[string]interface{}, headers map[string]string) string { + akIf := conn.config.GetCredentials() + if akIf.GetSecurityToken() != "" { + params[HTTPParamSecurityToken] = akIf.GetSecurityToken() + } + + m := strings.ToUpper(string(method)) + req := &http.Request{ + Method: m, + Header: make(http.Header), + } + + if conn.config.IsAuthProxy { + auth := conn.config.ProxyUser + ":" + conn.config.ProxyPassword + basic := "Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + req.Header.Set("Proxy-Authorization", basic) + } + + req.Header.Set(HTTPHeaderDate, strconv.FormatInt(expiration, 10)) + req.Header.Set(HTTPHeaderUserAgent, conn.config.UserAgent) + + if headers != nil { + for k, v := range headers { + req.Header.Set(k, v) + } + } + + if conn.config.AuthVersion == AuthV2 { + params[HTTPParamSignatureVersion] = "OSS2" + params[HTTPParamExpiresV2] = strconv.FormatInt(expiration, 10) + params[HTTPParamAccessKeyIDV2] = conn.config.AccessKeyID + additionalList, _ := conn.getAdditionalHeaderKeys(req) + if len(additionalList) > 0 { + params[HTTPParamAdditionalHeadersV2] = strings.Join(additionalList, ";") + } + } + + subResource := conn.getSubResource(params) + canonicalizedResource := conn.getResource(bucketName, objectName, subResource) + signedStr := conn.getSignedStr(req, canonicalizedResource, akIf.GetAccessKeySecret()) + + if conn.config.AuthVersion == AuthV1 { + params[HTTPParamExpires] = strconv.FormatInt(expiration, 10) + params[HTTPParamAccessKeyID] = akIf.GetAccessKeyID() + params[HTTPParamSignature] = signedStr + } else if conn.config.AuthVersion == AuthV2 { + params[HTTPParamSignatureV2] = signedStr + } + urlParams := conn.getURLParams(params) + return conn.url.getSignURL(bucketName, objectName, urlParams) +} + +func (conn Conn) signRtmpURL(bucketName, channelName, playlistName string, expiration int64) string { + params := map[string]interface{}{} + if playlistName != "" { + params[HTTPParamPlaylistName] = playlistName + } + expireStr := strconv.FormatInt(expiration, 10) + params[HTTPParamExpires] = expireStr + + akIf := conn.config.GetCredentials() + if akIf.GetAccessKeyID() != "" { + params[HTTPParamAccessKeyID] = akIf.GetAccessKeyID() + if akIf.GetSecurityToken() != "" { + params[HTTPParamSecurityToken] = akIf.GetSecurityToken() + } + signedStr := conn.getRtmpSignedStr(bucketName, channelName, playlistName, expiration, akIf.GetAccessKeySecret(), params) + params[HTTPParamSignature] = signedStr + } + + urlParams := conn.getURLParams(params) + return conn.url.getSignRtmpURL(bucketName, channelName, urlParams) +} + +// handleBody handles request body func (conn Conn) handleBody(req *http.Request, body io.Reader, initCRC uint64, listener ProgressListener, tracker *readerTracker) (*os.File, hash.Hash64) { var file *os.File var crc hash.Hash64 reader := body - - // length - switch v := body.(type) { - case *bytes.Buffer: - req.ContentLength = int64(v.Len()) - case *bytes.Reader: - req.ContentLength = int64(v.Len()) - case *strings.Reader: - req.ContentLength = int64(v.Len()) - case *os.File: - req.ContentLength = tryGetFileSize(v) - case *io.LimitedReader: - req.ContentLength = int64(v.N) + readerLen, err := GetReaderLen(reader) + if err == nil { + req.ContentLength = readerLen } req.Header.Set(HTTPHeaderContentLength, strconv.FormatInt(req.ContentLength, 10)) - // md5 + // MD5 if body != nil && conn.config.IsEnableMD5 && req.Header.Get(HTTPHeaderContentMD5) == "" { md5 := "" reader, md5, file, _ = calcMD5(body, req.ContentLength, conn.config.MD5Threshold) req.Header.Set(HTTPHeaderContentMD5, md5) } - // crc + // CRC if reader != nil && conn.config.IsEnableCRC { - crc = NewCRC(crcTable(), initCRC) + crc = NewCRC(CrcTable(), initCRC) reader = TeeReader(reader, crc, req.ContentLength, listener, tracker) } - // http body + // HTTP body rc, ok := reader.(io.ReadCloser) if !ok && reader != nil { rc = ioutil.NopCloser(reader) } - req.Body = rc + if conn.isUploadLimitReq(req) { + limitReader := &LimitSpeedReader{ + reader: rc, + ossLimiter: conn.config.UploadLimiter, + } + req.Body = limitReader + } else { + req.Body = rc + } return file, crc } +// isUploadLimitReq: judge limit upload speed or not +func (conn Conn) isUploadLimitReq(req *http.Request) bool { + if conn.config.UploadLimitSpeed == 0 || conn.config.UploadLimiter == nil { + return false + } + + if req.Method != "GET" && req.Method != "DELETE" && req.Method != "HEAD" { + if req.ContentLength > 0 { + return true + } + } + return false +} + func tryGetFileSize(f *os.File) int64 { fInfo, _ := f.Stat() return fInfo.Size() } -// handle response +// handleResponse handles response func (conn Conn) handleResponse(resp *http.Response, crc hash.Hash64) (*Response, error) { var cliCRC uint64 var srvCRC uint64 @@ -196,24 +477,28 @@ func (conn Conn) handleResponse(resp *http.Response, crc hash.Hash64) (*Response } if len(respBody) == 0 { - // no error in response body - err = fmt.Errorf("oss: service returned without a response body (%s)", resp.Status) + err = ServiceError{ + StatusCode: statusCode, + RequestID: resp.Header.Get(HTTPHeaderOssRequestID), + } } else { - // response contains storage service error object, unmarshal + // Response contains storage service error object, unmarshal srvErr, errIn := serviceErrFromXML(respBody, resp.StatusCode, resp.Header.Get(HTTPHeaderOssRequestID)) - if err != nil { // error unmarshaling the error response - err = errIn + if errIn != nil { // error unmarshaling the error response + err = fmt.Errorf("oss: service returned invalid response body, status = %s, RequestId = %s", resp.Status, resp.Header.Get(HTTPHeaderOssRequestID)) + } else { + err = srvErr } - err = srvErr } + return &Response{ StatusCode: resp.StatusCode, Headers: resp.Header, Body: ioutil.NopCloser(bytes.NewReader(respBody)), // restore the body }, err } else if statusCode >= 300 && statusCode <= 307 { - // oss use 3xx, but response has no body + // OSS use 3xx, but response has no body err := fmt.Errorf("oss: service returned %d,%s", resp.StatusCode, resp.Status) return &Response{ StatusCode: resp.StatusCode, @@ -237,9 +522,49 @@ func (conn Conn) handleResponse(resp *http.Response, crc hash.Hash64) (*Response }, nil } +// LoggerHTTPReq Print the header information of the http request +func (conn Conn) LoggerHTTPReq(req *http.Request) { + var logBuffer bytes.Buffer + logBuffer.WriteString(fmt.Sprintf("[Req:%p]Method:%s\t", req, req.Method)) + logBuffer.WriteString(fmt.Sprintf("Host:%s\t", req.URL.Host)) + logBuffer.WriteString(fmt.Sprintf("Path:%s\t", req.URL.Path)) + logBuffer.WriteString(fmt.Sprintf("Query:%s\t", req.URL.RawQuery)) + logBuffer.WriteString(fmt.Sprintf("Header info:")) + + for k, v := range req.Header { + var valueBuffer bytes.Buffer + for j := 0; j < len(v); j++ { + if j > 0 { + valueBuffer.WriteString(" ") + } + valueBuffer.WriteString(v[j]) + } + logBuffer.WriteString(fmt.Sprintf("\t%s:%s", k, valueBuffer.String())) + } + conn.config.WriteLog(Debug, "%s\n", logBuffer.String()) +} + +// LoggerHTTPResp Print Response to http request +func (conn Conn) LoggerHTTPResp(req *http.Request, resp *http.Response) { + var logBuffer bytes.Buffer + logBuffer.WriteString(fmt.Sprintf("[Resp:%p]StatusCode:%d\t", req, resp.StatusCode)) + logBuffer.WriteString(fmt.Sprintf("Header info:")) + for k, v := range resp.Header { + var valueBuffer bytes.Buffer + for j := 0; j < len(v); j++ { + if j > 0 { + valueBuffer.WriteString(" ") + } + valueBuffer.WriteString(v[j]) + } + logBuffer.WriteString(fmt.Sprintf("\t%s:%s", k, valueBuffer.String())) + } + conn.config.WriteLog(Debug, "%s\n", logBuffer.String()) +} + func calcMD5(body io.Reader, contentLen, md5Threshold int64) (reader io.Reader, b64 string, tempFile *os.File, err error) { if contentLen == 0 || contentLen > md5Threshold { - // huge body, use temporary file + // Huge body, use temporary file tempFile, err = ioutil.TempFile(os.TempDir(), TempFilePrefix) if tempFile != nil { io.Copy(tempFile, body) @@ -252,7 +577,7 @@ func calcMD5(body io.Reader, contentLen, md5Threshold int64) (reader io.Reader, reader = tempFile } } else { - // small body, use memory + // Small body, use memory buf, _ := ioutil.ReadAll(body) sum := md5.Sum(buf) b64 = base64.StdEncoding.EncodeToString(sum[:]) @@ -272,9 +597,11 @@ func readResponseBody(resp *http.Response) ([]byte, error) { func serviceErrFromXML(body []byte, statusCode int, requestID string) (ServiceError, error) { var storageErr ServiceError + if err := xml.Unmarshal(body, &storageErr); err != nil { return storageErr, err } + storageErr.StatusCode = statusCode storageErr.RequestID = requestID storageErr.RawMessage = string(body) @@ -289,7 +616,15 @@ func xmlUnmarshal(body io.Reader, v interface{}) error { return xml.Unmarshal(data, v) } -// Handle http timeout +func jsonUnmarshal(body io.Reader, v interface{}) error { + data, err := ioutil.ReadAll(body) + if err != nil { + return err + } + return json.Unmarshal(data, v) +} + +// timeoutConn handles HTTP timeout type timeoutConn struct { conn net.Conn timeout time.Duration @@ -343,7 +678,7 @@ func (c *timeoutConn) SetWriteDeadline(t time.Time) error { return c.conn.SetWriteDeadline(t) } -// UrlMaker - build url and resource +// UrlMaker builds URL and resource const ( urlTypeCname = 1 urlTypeIP = 2 @@ -351,14 +686,14 @@ const ( ) type urlMaker struct { - Scheme string // http or https - NetLoc string // host or ip - Type int // 1 CNAME 2 IP 3 ALIYUN - IsProxy bool // proxy + Scheme string // HTTP or HTTPS + NetLoc string // Host or IP + Type int // 1 CNAME, 2 IP, 3 ALIYUN + IsProxy bool // Proxy } -// Parse endpoint -func (um *urlMaker) Init(endpoint string, isCname bool, isProxy bool) { +// Init parses endpoint +func (um *urlMaker) Init(endpoint string, isCname bool, isProxy bool) error { if strings.HasPrefix(endpoint, "http://") { um.Scheme = "http" um.NetLoc = endpoint[len("http://"):] @@ -370,10 +705,22 @@ func (um *urlMaker) Init(endpoint string, isCname bool, isProxy bool) { um.NetLoc = endpoint } + //use url.Parse() to get real host + strUrl := um.Scheme + "://" + um.NetLoc + url, err := url.Parse(strUrl) + if err != nil { + return err + } + + um.NetLoc = url.Host host, _, err := net.SplitHostPort(um.NetLoc) if err != nil { host = um.NetLoc + if host[0] == '[' && host[len(host)-1] == ']' { + host = host[1 : len(host)-1] + } } + ip := net.ParseIP(host) if ip != nil { um.Type = urlTypeIP @@ -383,16 +730,46 @@ func (um *urlMaker) Init(endpoint string, isCname bool, isProxy bool) { um.Type = urlTypeAliyun } um.IsProxy = isProxy + + return nil } -// Build URL +// getURL gets URL func (um urlMaker) getURL(bucket, object, params string) *url.URL { + host, path := um.buildURL(bucket, object) + addr := "" + if params == "" { + addr = fmt.Sprintf("%s://%s%s", um.Scheme, host, path) + } else { + addr = fmt.Sprintf("%s://%s%s?%s", um.Scheme, host, path, params) + } + uri, _ := url.ParseRequestURI(addr) + return uri +} + +// getSignURL gets sign URL +func (um urlMaker) getSignURL(bucket, object, params string) string { + host, path := um.buildURL(bucket, object) + return fmt.Sprintf("%s://%s%s?%s", um.Scheme, host, path, params) +} + +// getSignRtmpURL Build Sign Rtmp URL +func (um urlMaker) getSignRtmpURL(bucket, channelName, params string) string { + host, path := um.buildURL(bucket, "live") + + channelName = url.QueryEscape(channelName) + channelName = strings.Replace(channelName, "+", "%20", -1) + + return fmt.Sprintf("rtmp://%s%s/%s?%s", host, path, channelName, params) +} + +// buildURL builds URL +func (um urlMaker) buildURL(bucket, object string) (string, string) { var host = "" var path = "" - if !um.IsProxy { - object = url.QueryEscape(object) - } + object = url.QueryEscape(object) + object = strings.Replace(object, "+", "%20", -1) if um.Type == urlTypeCname { host = um.NetLoc @@ -415,23 +792,5 @@ func (um urlMaker) getURL(bucket, object, params string) *url.URL { } } - uri := &url.URL{ - Scheme: um.Scheme, - Host: host, - Path: path, - RawQuery: params, - } - - return uri -} - -// Canonicalized Resource -func (um urlMaker) getResource(bucketName, objectName, subResource string) string { - if subResource != "" { - subResource = "?" + subResource - } - if bucketName == "" { - return fmt.Sprintf("/%s%s", bucketName, subResource) - } - return fmt.Sprintf("/%s/%s%s", bucketName, objectName, subResource) + return host, path } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/const.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/const.go index 7120763d3..6e02ef529 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/const.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/const.go @@ -2,35 +2,147 @@ package oss import "os" -// ACLType Bucket/Object的访问控制 +// ACLType bucket/object ACL type ACLType string const ( - // ACLPrivate 私有读写 + // ACLPrivate definition : private read and write ACLPrivate ACLType = "private" - // ACLPublicRead 公共读私有写 + // ACLPublicRead definition : public read and private write ACLPublicRead ACLType = "public-read" - // ACLPublicReadWrite 公共读写 + // ACLPublicReadWrite definition : public read and public write ACLPublicReadWrite ACLType = "public-read-write" - // ACLDefault Object默认权限,Bucket无此权限 + // ACLDefault Object. It's only applicable for object. ACLDefault ACLType = "default" ) -// MetadataDirectiveType 对象COPY时新对象是否使用原对象的Meta +// bucket versioning status +type VersioningStatus string + +const ( + // Versioning Status definition: Enabled + VersionEnabled VersioningStatus = "Enabled" + + // Versioning Status definition: Suspended + VersionSuspended VersioningStatus = "Suspended" +) + +// MetadataDirectiveType specifying whether use the metadata of source object when copying object. type MetadataDirectiveType string const ( - // MetaCopy 目标对象使用源对象的META + // MetaCopy the target object's metadata is copied from the source one MetaCopy MetadataDirectiveType = "COPY" - // MetaReplace 目标对象使用自定义的META + // MetaReplace the target object's metadata is created as part of the copy request (not same as the source one) MetaReplace MetadataDirectiveType = "REPLACE" ) -// Http头标签 +// TaggingDirectiveType specifying whether use the tagging of source object when copying object. +type TaggingDirectiveType string + +const ( + // TaggingCopy the target object's tagging is copied from the source one + TaggingCopy TaggingDirectiveType = "COPY" + + // TaggingReplace the target object's tagging is created as part of the copy request (not same as the source one) + TaggingReplace TaggingDirectiveType = "REPLACE" +) + +// AlgorithmType specifying the server side encryption algorithm name +type AlgorithmType string + +const ( + KMSAlgorithm AlgorithmType = "KMS" + AESAlgorithm AlgorithmType = "AES256" + SM4Algorithm AlgorithmType = "SM4" +) + +// StorageClassType bucket storage type +type StorageClassType string + +const ( + // StorageStandard standard + StorageStandard StorageClassType = "Standard" + + // StorageIA infrequent access + StorageIA StorageClassType = "IA" + + // StorageArchive archive + StorageArchive StorageClassType = "Archive" + + // StorageColdArchive cold archive + StorageColdArchive StorageClassType = "ColdArchive" +) + +//RedundancyType bucket data Redundancy type +type DataRedundancyType string + +const ( + // RedundancyLRS Local redundancy, default value + RedundancyLRS DataRedundancyType = "LRS" + + // RedundancyZRS Same city redundancy + RedundancyZRS DataRedundancyType = "ZRS" +) + +//ObjecthashFuncType +type ObjecthashFuncType string + +const ( + HashFuncSha1 ObjecthashFuncType = "SHA-1" + HashFuncSha256 ObjecthashFuncType = "SHA-256" +) + +// PayerType the type of request payer +type PayerType string + +const ( + // Requester the requester who send the request + Requester PayerType = "Requester" + + // BucketOwner the requester who send the request + BucketOwner PayerType = "BucketOwner" +) + +//RestoreMode the restore mode for coldArchive object +type RestoreMode string + +const ( + //RestoreExpedited object will be restored in 1 hour + RestoreExpedited RestoreMode = "Expedited" + + //RestoreStandard object will be restored in 2-5 hours + RestoreStandard RestoreMode = "Standard" + + //RestoreBulk object will be restored in 5-10 hours + RestoreBulk RestoreMode = "Bulk" +) + +// HTTPMethod HTTP request method +type HTTPMethod string + +const ( + // HTTPGet HTTP GET + HTTPGet HTTPMethod = "GET" + + // HTTPPut HTTP PUT + HTTPPut HTTPMethod = "PUT" + + // HTTPHead HTTP HEAD + HTTPHead HTTPMethod = "HEAD" + + // HTTPPost HTTP POST + HTTPPost HTTPMethod = "POST" + + // HTTPDelete HTTP DELETE + HTTPDelete HTTPMethod = "DELETE" +) + +// HTTP headers const ( HTTPHeaderAcceptEncoding string = "Accept-Encoding" HTTPHeaderAuthorization = "Authorization" @@ -55,12 +167,19 @@ const ( HTTPHeaderIfUnmodifiedSince = "If-Unmodified-Since" HTTPHeaderIfMatch = "If-Match" HTTPHeaderIfNoneMatch = "If-None-Match" + HTTPHeaderACReqMethod = "Access-Control-Request-Method" + HTTPHeaderACReqHeaders = "Access-Control-Request-Headers" HTTPHeaderOssACL = "X-Oss-Acl" HTTPHeaderOssMetaPrefix = "X-Oss-Meta-" HTTPHeaderOssObjectACL = "X-Oss-Object-Acl" HTTPHeaderOssSecurityToken = "X-Oss-Security-Token" HTTPHeaderOssServerSideEncryption = "X-Oss-Server-Side-Encryption" + HTTPHeaderOssServerSideEncryptionKeyID = "X-Oss-Server-Side-Encryption-Key-Id" + HTTPHeaderOssServerSideDataEncryption = "X-Oss-Server-Side-Data-Encryption" + HTTPHeaderSSECAlgorithm = "X-Oss-Server-Side-Encryption-Customer-Algorithm" + HTTPHeaderSSECKey = "X-Oss-Server-Side-Encryption-Customer-Key" + HTTPHeaderSSECKeyMd5 = "X-Oss-Server-Side-Encryption-Customer-Key-MD5" HTTPHeaderOssCopySource = "X-Oss-Copy-Source" HTTPHeaderOssCopySourceRange = "X-Oss-Copy-Source-Range" HTTPHeaderOssCopySourceIfMatch = "X-Oss-Copy-Source-If-Match" @@ -71,19 +190,68 @@ const ( HTTPHeaderOssNextAppendPosition = "X-Oss-Next-Append-Position" HTTPHeaderOssRequestID = "X-Oss-Request-Id" HTTPHeaderOssCRC64 = "X-Oss-Hash-Crc64ecma" + HTTPHeaderOssSymlinkTarget = "X-Oss-Symlink-Target" + HTTPHeaderOssStorageClass = "X-Oss-Storage-Class" + HTTPHeaderOssCallback = "X-Oss-Callback" + HTTPHeaderOssCallbackVar = "X-Oss-Callback-Var" + HTTPHeaderOssRequester = "X-Oss-Request-Payer" + HTTPHeaderOssTagging = "X-Oss-Tagging" + HTTPHeaderOssTaggingDirective = "X-Oss-Tagging-Directive" + HTTPHeaderOssTrafficLimit = "X-Oss-Traffic-Limit" + HTTPHeaderOssForbidOverWrite = "X-Oss-Forbid-Overwrite" + HTTPHeaderOssRangeBehavior = "X-Oss-Range-Behavior" + HTTPHeaderOssTaskID = "X-Oss-Task-Id" + HTTPHeaderOssHashCtx = "X-Oss-Hash-Ctx" + HTTPHeaderOssMd5Ctx = "X-Oss-Md5-Ctx" ) -// 其它常量 +// HTTP Param const ( - MaxPartSize = 5 * 1024 * 1024 * 1024 // 文件片最大值,5GB - MinPartSize = 100 * 1024 // 文件片最小值,100KBß + HTTPParamExpires = "Expires" + HTTPParamAccessKeyID = "OSSAccessKeyId" + HTTPParamSignature = "Signature" + HTTPParamSecurityToken = "security-token" + HTTPParamPlaylistName = "playlistName" - FilePermMode = os.FileMode(0664) // 新建文件默认权限 - - TempFilePrefix = "oss-go-temp-" // 临时文件前缀 - TempFileSuffix = ".temp" // 临时文件后缀 - - CheckpointFileSuffix = ".cp" // Checkpoint文件后缀 - - Version = "1.3.0" // Go sdk版本 + HTTPParamSignatureVersion = "x-oss-signature-version" + HTTPParamExpiresV2 = "x-oss-expires" + HTTPParamAccessKeyIDV2 = "x-oss-access-key-id" + HTTPParamSignatureV2 = "x-oss-signature" + HTTPParamAdditionalHeadersV2 = "x-oss-additional-headers" +) + +// Other constants +const ( + MaxPartSize = 5 * 1024 * 1024 * 1024 // Max part size, 5GB + MinPartSize = 100 * 1024 // Min part size, 100KB + + FilePermMode = os.FileMode(0664) // Default file permission + + TempFilePrefix = "oss-go-temp-" // Temp file prefix + TempFileSuffix = ".temp" // Temp file suffix + + CheckpointFileSuffix = ".cp" // Checkpoint file suffix + + NullVersion = "null" + + Version = "v2.1.8" // Go SDK version +) + +// FrameType +const ( + DataFrameType = 8388609 + ContinuousFrameType = 8388612 + EndFrameType = 8388613 + MetaEndFrameCSVType = 8388614 + MetaEndFrameJSONType = 8388615 +) + +// AuthVersion the version of auth +type AuthVersionType string + +const ( + // AuthV1 v1 + AuthV1 AuthVersionType = "v1" + // AuthV2 v2 + AuthV2 AuthVersionType = "v2" ) diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/crc.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/crc.go index 4f0958f42..c96694f28 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/crc.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/crc.go @@ -11,11 +11,11 @@ type digest struct { tab *crc64.Table } -// NewCRC creates a new hash.Hash64 computing the CRC-64 checksum +// NewCRC creates a new hash.Hash64 computing the CRC64 checksum // using the polynomial represented by the Table. func NewCRC(tab *crc64.Table, init uint64) hash.Hash64 { return &digest{init, tab} } -// Size returns the number of bytes Sum will return. +// Size returns the number of bytes sum will return. func (d *digest) Size() int { return crc64.Size } // BlockSize returns the hash's underlying block size. @@ -24,7 +24,7 @@ func (d *digest) Size() int { return crc64.Size } // are a multiple of the block size. func (d *digest) BlockSize() int { return 1 } -// Reset resets the Hash to its initial state. +// Reset resets the hash to its initial state. func (d *digest) Reset() { d.crc = 0 } // Write (via the embedded io.Writer interface) adds more data to the running hash. @@ -34,7 +34,7 @@ func (d *digest) Write(p []byte) (n int, err error) { return len(p), nil } -// Sum64 returns crc64 value. +// Sum64 returns CRC64 value. func (d *digest) Sum64() uint64 { return d.crc } // Sum returns hash value. @@ -42,3 +42,82 @@ func (d *digest) Sum(in []byte) []byte { s := d.Sum64() return append(in, byte(s>>56), byte(s>>48), byte(s>>40), byte(s>>32), byte(s>>24), byte(s>>16), byte(s>>8), byte(s)) } + +// gf2Dim dimension of GF(2) vectors (length of CRC) +const gf2Dim int = 64 + +func gf2MatrixTimes(mat []uint64, vec uint64) uint64 { + var sum uint64 + for i := 0; vec != 0; i++ { + if vec&1 != 0 { + sum ^= mat[i] + } + + vec >>= 1 + } + return sum +} + +func gf2MatrixSquare(square []uint64, mat []uint64) { + for n := 0; n < gf2Dim; n++ { + square[n] = gf2MatrixTimes(mat, mat[n]) + } +} + +// CRC64Combine combines CRC64 +func CRC64Combine(crc1 uint64, crc2 uint64, len2 uint64) uint64 { + var even [gf2Dim]uint64 // Even-power-of-two zeros operator + var odd [gf2Dim]uint64 // Odd-power-of-two zeros operator + + // Degenerate case + if len2 == 0 { + return crc1 + } + + // Put operator for one zero bit in odd + odd[0] = crc64.ECMA // CRC64 polynomial + var row uint64 = 1 + for n := 1; n < gf2Dim; n++ { + odd[n] = row + row <<= 1 + } + + // Put operator for two zero bits in even + gf2MatrixSquare(even[:], odd[:]) + + // Put operator for four zero bits in odd + gf2MatrixSquare(odd[:], even[:]) + + // Apply len2 zeros to crc1, first square will put the operator for one zero byte, eight zero bits, in even + for { + // Apply zeros operator for this bit of len2 + gf2MatrixSquare(even[:], odd[:]) + + if len2&1 != 0 { + crc1 = gf2MatrixTimes(even[:], crc1) + } + + len2 >>= 1 + + // If no more bits set, then done + if len2 == 0 { + break + } + + // Another iteration of the loop with odd and even swapped + gf2MatrixSquare(odd[:], even[:]) + if len2&1 != 0 { + crc1 = gf2MatrixTimes(odd[:], crc1) + } + len2 >>= 1 + + // If no more bits set, then done + if len2 == 0 { + break + } + } + + // Return combined CRC + crc1 ^= crc2 + return crc1 +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/download.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/download.go index ec3fe8b0c..90c1b633d 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/download.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/download.go @@ -5,53 +5,77 @@ import ( "encoding/base64" "encoding/json" "errors" + "fmt" + "hash" + "hash/crc64" "io" "io/ioutil" + "net/http" "os" + "path/filepath" "strconv" + "time" ) +// DownloadFile downloads files with multipart download. // -// DownloadFile 分片下载文件 +// objectKey the object key. +// filePath the local file to download from objectKey in OSS. +// partSize the part size in bytes. +// options object's constraints, check out GetObject for the reference. // -// objectKey object key。 -// filePath 本地文件。objectKey下载到文件。 -// partSize 本次上传文件片的大小,字节数。比如100 * 1024为每片100KB。 -// options Object的属性限制项。详见GetObject。 -// -// error 操作成功error为nil,非nil为错误信息。 +// error it's nil when the call succeeds, otherwise it's an error object. // func (bucket Bucket) DownloadFile(objectKey, filePath string, partSize int64, options ...Option) error { - if partSize < 1 || partSize > MaxPartSize { - return errors.New("oss: part size invalid range (1, 5GB]") + if partSize < 1 { + return errors.New("oss: part size smaller than 1") } - cpConf, err := getCpConfig(options, filePath) + uRange, err := GetRangeConfig(options) if err != nil { return err } + cpConf := getCpConfig(options) routines := getRoutines(options) - if cpConf.IsEnable { - return bucket.downloadFileWithCp(objectKey, filePath, partSize, options, cpConf.FilePath, routines) + var strVersionId string + versionId, _ := FindOption(options, "versionId", nil) + if versionId != nil { + strVersionId = versionId.(string) } - return bucket.downloadFile(objectKey, filePath, partSize, options, routines) + if cpConf != nil && cpConf.IsEnable { + cpFilePath := getDownloadCpFilePath(cpConf, bucket.BucketName, objectKey, strVersionId, filePath) + if cpFilePath != "" { + return bucket.downloadFileWithCp(objectKey, filePath, partSize, options, cpFilePath, routines, uRange) + } + } + + return bucket.downloadFile(objectKey, filePath, partSize, options, routines, uRange) } -// ----- 并发无断点的下载 ----- +func getDownloadCpFilePath(cpConf *cpConfig, srcBucket, srcObject, versionId, destFile string) string { + if cpConf.FilePath == "" && cpConf.DirPath != "" { + src := fmt.Sprintf("oss://%v/%v", srcBucket, srcObject) + absPath, _ := filepath.Abs(destFile) + cpFileName := getCpFileName(src, absPath, versionId) + cpConf.FilePath = cpConf.DirPath + string(os.PathSeparator) + cpFileName + } + return cpConf.FilePath +} -// 工作协程参数 +// downloadWorkerArg is download worker's parameters type downloadWorkerArg struct { - bucket *Bucket - key string - filePath string - options []Option - hook downloadPartHook + bucket *Bucket + key string + filePath string + options []Option + hook downloadPartHook + enableCRC bool } -// Hook用于测试 +// downloadPartHook is hook for test type downloadPartHook func(part downloadPart) error var downloadPartHooker downloadPartHook = defaultDownloadPartHook @@ -60,15 +84,15 @@ func defaultDownloadPartHook(part downloadPart) error { return nil } -// 默认ProgressListener,屏蔽GetObject的Options中ProgressListener +// defaultDownloadProgressListener defines default ProgressListener, shields the ProgressListener in options of GetObject. type defaultDownloadProgressListener struct { } -// ProgressChanged 静默处理 +// ProgressChanged no-ops func (listener *defaultDownloadProgressListener) ProgressChanged(event *ProgressEvent) { } -// 工作协程 +// downloadWorker func downloadWorker(id int, arg downloadWorkerArg, jobs <-chan downloadPart, results chan<- downloadPart, failed chan<- error, die <-chan bool) { for part := range jobs { if err := arg.hook(part); err != nil { @@ -76,13 +100,15 @@ func downloadWorker(id int, arg downloadWorkerArg, jobs <-chan downloadPart, res break } - // resolve options + // Resolve options r := Range(part.Start, part.End) p := Progress(&defaultDownloadProgressListener{}) - opts := make([]Option, len(arg.options)+2) - // append orderly, can not be reversed! + + var respHeader http.Header + opts := make([]Option, len(arg.options)+3) + // Append orderly, can not be reversed! opts = append(opts, arg.options...) - opts = append(opts, r, p) + opts = append(opts, r, p, GetResponseHeader(&respHeader)) rd, err := arg.bucket.GetObject(arg.key, opts...) if err != nil { @@ -91,6 +117,14 @@ func downloadWorker(id int, arg downloadWorkerArg, jobs <-chan downloadPart, res } defer rd.Close() + var crcCalc hash.Hash64 + if arg.enableCRC { + crcCalc = crc64.New(CrcTable()) + contentLen := part.End - part.Start + 1 + rd = ioutil.NopCloser(TeeReader(rd, crcCalc, contentLen, nil, nil)) + } + defer rd.Close() + select { case <-die: return @@ -102,25 +136,34 @@ func downloadWorker(id int, arg downloadWorkerArg, jobs <-chan downloadPart, res failed <- err break } - defer fd.Close() - _, err = fd.Seek(part.Start, os.SEEK_SET) + _, err = fd.Seek(part.Start-part.Offset, os.SEEK_SET) if err != nil { + fd.Close() failed <- err break } + startT := time.Now().UnixNano() / 1000 / 1000 / 1000 _, err = io.Copy(fd, rd) + endT := time.Now().UnixNano() / 1000 / 1000 / 1000 if err != nil { + arg.bucket.Client.Config.WriteLog(Debug, "download part error,cost:%d second,part number:%d,request id:%s,error:%s.\n", endT-startT, part.Index, GetRequestId(respHeader), err.Error()) + fd.Close() failed <- err break } + if arg.enableCRC { + part.CRC64 = crcCalc.Sum64() + } + + fd.Close() results <- part } } -// 调度协程 +// downloadScheduler func downloadScheduler(jobs chan downloadPart, parts []downloadPart) { for _, part := range parts { jobs <- part @@ -128,39 +171,34 @@ func downloadScheduler(jobs chan downloadPart, parts []downloadPart) { close(jobs) } -// 下载片 +// downloadPart defines download part type downloadPart struct { - Index int // 片序号,从0开始编号 - Start int64 // 片起始位置 - End int64 // 片结束位置 + Index int // Part number, starting from 0 + Start int64 // Start index + End int64 // End index + Offset int64 // Offset + CRC64 uint64 // CRC check value of part } -// 文件分片 -func getDownloadParts(bucket *Bucket, objectKey string, partSize int64) ([]downloadPart, error) { - meta, err := bucket.GetObjectDetailedMeta(objectKey) - if err != nil { - return nil, err - } - +// getDownloadParts gets download parts +func getDownloadParts(objectSize, partSize int64, uRange *UnpackedRange) []downloadPart { parts := []downloadPart{} - objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 0) - if err != nil { - return nil, err - } - part := downloadPart{} i := 0 - for offset := int64(0); offset < objectSize; offset += partSize { + start, end := AdjustRange(uRange, objectSize) + for offset := start; offset < end; offset += partSize { part.Index = i part.Start = offset - part.End = GetPartEnd(offset, objectSize, partSize) + part.End = GetPartEnd(offset, end, partSize) + part.Offset = start + part.CRC64 = 0 parts = append(parts, part) i++ } - return parts, nil + return parts } -// 文件大小 +// getObjectBytes gets object bytes length func getObjectBytes(parts []downloadPart) int64 { var ob int64 for _, part := range parts { @@ -169,24 +207,56 @@ func getObjectBytes(parts []downloadPart) int64 { return ob } -// 并发无断点续传的下载 -func (bucket Bucket) downloadFile(objectKey, filePath string, partSize int64, options []Option, routines int) error { - tempFilePath := filePath + TempFileSuffix - listener := getProgressListener(options) +// combineCRCInParts caculates the total CRC of continuous parts +func combineCRCInParts(dps []downloadPart) uint64 { + if dps == nil || len(dps) == 0 { + return 0 + } - // 如果文件不存在则创建,存在不清空,下载分片会重写文件内容 + crc := dps[0].CRC64 + for i := 1; i < len(dps); i++ { + crc = CRC64Combine(crc, dps[i].CRC64, (uint64)(dps[i].End-dps[i].Start+1)) + } + + return crc +} + +// downloadFile downloads file concurrently without checkpoint. +func (bucket Bucket) downloadFile(objectKey, filePath string, partSize int64, options []Option, routines int, uRange *UnpackedRange) error { + tempFilePath := filePath + TempFileSuffix + listener := GetProgressListener(options) + + // If the file does not exist, create one. If exists, the download will overwrite it. fd, err := os.OpenFile(tempFilePath, os.O_WRONLY|os.O_CREATE, FilePermMode) if err != nil { return err } fd.Close() - // 分割文件 - parts, err := getDownloadParts(&bucket, objectKey, partSize) + // Get the object detailed meta for object whole size + // must delete header:range to get whole object size + skipOptions := DeleteOption(options, HTTPHeaderRange) + meta, err := bucket.GetObjectDetailedMeta(objectKey, skipOptions...) if err != nil { return err } + objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 64) + if err != nil { + return err + } + + enableCRC := false + expectedCRC := (uint64)(0) + if bucket.GetConfig().IsEnableCRC && meta.Get(HTTPHeaderOssCRC64) != "" { + if uRange == nil || (!uRange.HasStart && !uRange.HasEnd) { + enableCRC = true + expectedCRC, _ = strconv.ParseUint(meta.Get(HTTPHeaderOssCRC64), 10, 64) + } + } + + // Get the parts of the file + parts := getDownloadParts(objectSize, partSize, uRange) jobs := make(chan downloadPart, len(parts)) results := make(chan downloadPart, len(parts)) failed := make(chan error) @@ -194,32 +264,32 @@ func (bucket Bucket) downloadFile(objectKey, filePath string, partSize int64, op var completedBytes int64 totalBytes := getObjectBytes(parts) - event := newProgressEvent(TransferStartedEvent, 0, totalBytes) + event := newProgressEvent(TransferStartedEvent, 0, totalBytes, 0) publishProgress(listener, event) - // 启动工作协程 - arg := downloadWorkerArg{&bucket, objectKey, tempFilePath, options, downloadPartHooker} + // Start the download workers + arg := downloadWorkerArg{&bucket, objectKey, tempFilePath, options, downloadPartHooker, enableCRC} for w := 1; w <= routines; w++ { go downloadWorker(w, arg, jobs, results, failed, die) } - // 并发上传分片 + // Download parts concurrently go downloadScheduler(jobs, parts) - // 等待分片下载完成 + // Waiting for parts download finished completed := 0 - ps := make([]downloadPart, len(parts)) for completed < len(parts) { select { case part := <-results: completed++ - ps[part.Index] = part - completedBytes += (part.End - part.Start + 1) - event = newProgressEvent(TransferDataEvent, completedBytes, totalBytes) + downBytes := (part.End - part.Start + 1) + completedBytes += downBytes + parts[part.Index].CRC64 = part.CRC64 + event = newProgressEvent(TransferDataEvent, completedBytes, totalBytes, downBytes) publishProgress(listener, event) case err := <-failed: close(die) - event = newProgressEvent(TransferFailedEvent, completedBytes, totalBytes) + event = newProgressEvent(TransferFailedEvent, completedBytes, totalBytes, 0) publishProgress(listener, event) return err } @@ -229,35 +299,47 @@ func (bucket Bucket) downloadFile(objectKey, filePath string, partSize int64, op } } - event = newProgressEvent(TransferCompletedEvent, completedBytes, totalBytes) + event = newProgressEvent(TransferCompletedEvent, completedBytes, totalBytes, 0) publishProgress(listener, event) + if enableCRC { + actualCRC := combineCRCInParts(parts) + err = CheckDownloadCRC(actualCRC, expectedCRC) + if err != nil { + return err + } + } + return os.Rename(tempFilePath, filePath) } -// ----- 并发有断点的下载 ----- +// ----- Concurrent download with chcekpoint ----- const downloadCpMagic = "92611BED-89E2-46B6-89E5-72F273D4B0A3" type downloadCheckpoint struct { - Magic string // magic - MD5 string // cp内容的MD5 - FilePath string // 本地文件 - Object string // key - ObjStat objectStat // 文件状态 - Parts []downloadPart // 全部分片 - PartStat []bool // 分片下载是否完成 + Magic string // Magic + MD5 string // Checkpoint content MD5 + FilePath string // Local file + Object string // Key + ObjStat objectStat // Object status + Parts []downloadPart // All download parts + PartStat []bool // Parts' download status + Start int64 // Start point of the file + End int64 // End point of the file + enableCRC bool // Whether has CRC check + CRC uint64 // CRC check value } type objectStat struct { - Size int64 // 大小 - LastModified string // 最后修改时间 - Etag string // etag + Size int64 // Object size + LastModified string // Last modified time + Etag string // Etag } -// CP数据是否有效,CP有效且Object没有更新时有效 -func (cp downloadCheckpoint) isValid(bucket *Bucket, objectKey string) (bool, error) { - // 比较CP的Magic及MD5 +// isValid flags of checkpoint data is valid. It returns true when the data is valid and the checkpoint is valid and the object is not updated. +func (cp downloadCheckpoint) isValid(meta http.Header, uRange *UnpackedRange) (bool, error) { + // Compare the CP's Magic and the MD5 cpb := cp cpb.MD5 = "" js, _ := json.Marshal(cpb) @@ -268,28 +350,30 @@ func (cp downloadCheckpoint) isValid(bucket *Bucket, objectKey string) (bool, er return false, nil } - // 确认object没有更新 - meta, err := bucket.GetObjectDetailedMeta(objectKey) + objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 64) if err != nil { return false, err } - objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 0) - if err != nil { - return false, err - } - - // 比较Object的大小/最后修改时间/etag + // Compare the object size, last modified time and etag if cp.ObjStat.Size != objectSize || cp.ObjStat.LastModified != meta.Get(HTTPHeaderLastModified) || cp.ObjStat.Etag != meta.Get(HTTPHeaderEtag) { return false, nil } + // Check the download range + if uRange != nil { + start, end := AdjustRange(uRange, objectSize) + if start != cp.Start || end != cp.End { + return false, nil + } + } + return true, nil } -// 从文件中load +// load checkpoint from local file func (cp *downloadCheckpoint) load(filePath string) error { contents, err := ioutil.ReadFile(filePath) if err != nil { @@ -300,11 +384,11 @@ func (cp *downloadCheckpoint) load(filePath string) error { return err } -// dump到文件 +// dump funciton dumps to file func (cp *downloadCheckpoint) dump(filePath string) error { bcp := *cp - // 计算MD5 + // Calculate MD5 bcp.MD5 = "" js, err := json.Marshal(bcp) if err != nil { @@ -314,17 +398,17 @@ func (cp *downloadCheckpoint) dump(filePath string) error { b64 := base64.StdEncoding.EncodeToString(sum[:]) bcp.MD5 = b64 - // 序列化 + // Serialize js, err = json.Marshal(bcp) if err != nil { return err } - // dump + // Dump return ioutil.WriteFile(filePath, js, FilePermMode) } -// 未完成的分片 +// todoParts gets unfinished parts func (cp downloadCheckpoint) todoParts() []downloadPart { dps := []downloadPart{} for i, ps := range cp.PartStat { @@ -335,7 +419,7 @@ func (cp downloadCheckpoint) todoParts() []downloadPart { return dps } -// 完成的字节数 +// getCompletedBytes gets completed size func (cp downloadCheckpoint) getCompletedBytes() int64 { var completedBytes int64 for i, part := range cp.Parts { @@ -346,20 +430,14 @@ func (cp downloadCheckpoint) getCompletedBytes() int64 { return completedBytes } -// 初始化下载任务 -func (cp *downloadCheckpoint) prepare(bucket *Bucket, objectKey, filePath string, partSize int64) error { - // cp +// prepare initiates download tasks +func (cp *downloadCheckpoint) prepare(meta http.Header, bucket *Bucket, objectKey, filePath string, partSize int64, uRange *UnpackedRange) error { + // CP cp.Magic = downloadCpMagic cp.FilePath = filePath cp.Object = objectKey - // object - meta, err := bucket.GetObjectDetailedMeta(objectKey) - if err != nil { - return err - } - - objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 0) + objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 64) if err != nil { return err } @@ -368,11 +446,15 @@ func (cp *downloadCheckpoint) prepare(bucket *Bucket, objectKey, filePath string cp.ObjStat.LastModified = meta.Get(HTTPHeaderLastModified) cp.ObjStat.Etag = meta.Get(HTTPHeaderEtag) - // parts - cp.Parts, err = getDownloadParts(bucket, objectKey, partSize) - if err != nil { - return err + if bucket.GetConfig().IsEnableCRC && meta.Get(HTTPHeaderOssCRC64) != "" { + if uRange == nil || (!uRange.HasStart && !uRange.HasEnd) { + cp.enableCRC = true + cp.CRC, _ = strconv.ParseUint(meta.Get(HTTPHeaderOssCRC64), 10, 64) + } } + + // Parts + cp.Parts = getDownloadParts(objectSize, partSize, uRange) cp.PartStat = make([]bool, len(cp.Parts)) for i := range cp.PartStat { cp.PartStat[i] = false @@ -382,39 +464,50 @@ func (cp *downloadCheckpoint) prepare(bucket *Bucket, objectKey, filePath string } func (cp *downloadCheckpoint) complete(cpFilePath, downFilepath string) error { - os.Remove(cpFilePath) - return os.Rename(downFilepath, cp.FilePath) + err := os.Rename(downFilepath, cp.FilePath) + if err != nil { + return err + } + return os.Remove(cpFilePath) } -// 并发带断点的下载 -func (bucket Bucket) downloadFileWithCp(objectKey, filePath string, partSize int64, options []Option, cpFilePath string, routines int) error { +// downloadFileWithCp downloads files with checkpoint. +func (bucket Bucket) downloadFileWithCp(objectKey, filePath string, partSize int64, options []Option, cpFilePath string, routines int, uRange *UnpackedRange) error { tempFilePath := filePath + TempFileSuffix - listener := getProgressListener(options) + listener := GetProgressListener(options) - // LOAD CP数据 + // Load checkpoint data. dcp := downloadCheckpoint{} err := dcp.load(cpFilePath) if err != nil { os.Remove(cpFilePath) } - // LOAD出错或数据无效重新初始化下载 - valid, err := dcp.isValid(&bucket, objectKey) + // Get the object detailed meta for object whole size + // must delete header:range to get whole object size + skipOptions := DeleteOption(options, HTTPHeaderRange) + meta, err := bucket.GetObjectDetailedMeta(objectKey, skipOptions...) + if err != nil { + return err + } + + // Load error or data invalid. Re-initialize the download. + valid, err := dcp.isValid(meta, uRange) if err != nil || !valid { - if err = dcp.prepare(&bucket, objectKey, filePath, partSize); err != nil { + if err = dcp.prepare(meta, &bucket, objectKey, filePath, partSize, uRange); err != nil { return err } os.Remove(cpFilePath) } - // 如果文件不存在则创建,存在不清空,下载分片会重写文件内容 + // Create the file if not exists. Otherwise the parts download will overwrite it. fd, err := os.OpenFile(tempFilePath, os.O_WRONLY|os.O_CREATE, FilePermMode) if err != nil { return err } fd.Close() - // 未完成的分片 + // Unfinished parts parts := dcp.todoParts() jobs := make(chan downloadPart, len(parts)) results := make(chan downloadPart, len(parts)) @@ -422,32 +515,34 @@ func (bucket Bucket) downloadFileWithCp(objectKey, filePath string, partSize int die := make(chan bool) completedBytes := dcp.getCompletedBytes() - event := newProgressEvent(TransferStartedEvent, completedBytes, dcp.ObjStat.Size) + event := newProgressEvent(TransferStartedEvent, completedBytes, dcp.ObjStat.Size, 0) publishProgress(listener, event) - // 启动工作协程 - arg := downloadWorkerArg{&bucket, objectKey, tempFilePath, options, downloadPartHooker} + // Start the download workers routine + arg := downloadWorkerArg{&bucket, objectKey, tempFilePath, options, downloadPartHooker, dcp.enableCRC} for w := 1; w <= routines; w++ { go downloadWorker(w, arg, jobs, results, failed, die) } - // 并发下载分片 + // Concurrently downloads parts go downloadScheduler(jobs, parts) - // 等待分片下载完成 + // Wait for the parts download finished completed := 0 for completed < len(parts) { select { case part := <-results: completed++ dcp.PartStat[part.Index] = true + dcp.Parts[part.Index].CRC64 = part.CRC64 dcp.dump(cpFilePath) - completedBytes += (part.End - part.Start + 1) - event = newProgressEvent(TransferDataEvent, completedBytes, dcp.ObjStat.Size) + downBytes := (part.End - part.Start + 1) + completedBytes += downBytes + event = newProgressEvent(TransferDataEvent, completedBytes, dcp.ObjStat.Size, downBytes) publishProgress(listener, event) case err := <-failed: close(die) - event = newProgressEvent(TransferFailedEvent, completedBytes, dcp.ObjStat.Size) + event = newProgressEvent(TransferFailedEvent, completedBytes, dcp.ObjStat.Size, 0) publishProgress(listener, event) return err } @@ -457,8 +552,16 @@ func (bucket Bucket) downloadFileWithCp(objectKey, filePath string, partSize int } } - event = newProgressEvent(TransferCompletedEvent, completedBytes, dcp.ObjStat.Size) + event = newProgressEvent(TransferCompletedEvent, completedBytes, dcp.ObjStat.Size, 0) publishProgress(listener, event) + if dcp.enableCRC { + actualCRC := combineCRCInParts(dcp.Parts) + err = CheckDownloadCRC(actualCRC, dcp.CRC) + if err != nil { + return err + } + } + return dcp.complete(cpFilePath, tempFilePath) } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/error.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/error.go index 5c06df92b..a877211fa 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/error.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/error.go @@ -10,28 +10,33 @@ import ( // ServiceError contains fields of the error response from Oss Service REST API. type ServiceError struct { XMLName xml.Name `xml:"Error"` - Code string `xml:"Code"` // OSS返回给用户的错误码 - Message string `xml:"Message"` // OSS给出的详细错误信息 - RequestID string `xml:"RequestId"` // 用于唯一标识该次请求的UUID - HostID string `xml:"HostId"` // 用于标识访问的OSS集群 - RawMessage string // OSS返回的原始消息内容 - StatusCode int // HTTP状态码 + Code string `xml:"Code"` // The error code returned from OSS to the caller + Message string `xml:"Message"` // The detail error message from OSS + RequestID string `xml:"RequestId"` // The UUID used to uniquely identify the request + HostID string `xml:"HostId"` // The OSS server cluster's Id + Endpoint string `xml:"Endpoint"` + RawMessage string // The raw messages from OSS + StatusCode int // HTTP status code } -// Implement interface error +// Error implements interface error func (e ServiceError) Error() string { - return fmt.Sprintf("oss: service returned error: StatusCode=%d, ErrorCode=%s, ErrorMessage=%s, RequestId=%s", - e.StatusCode, e.Code, e.Message, e.RequestID) + if e.Endpoint == "" { + return fmt.Sprintf("oss: service returned error: StatusCode=%d, ErrorCode=%s, ErrorMessage=\"%s\", RequestId=%s", + e.StatusCode, e.Code, e.Message, e.RequestID) + } + return fmt.Sprintf("oss: service returned error: StatusCode=%d, ErrorCode=%s, ErrorMessage=\"%s\", RequestId=%s, Endpoint=%s", + e.StatusCode, e.Code, e.Message, e.RequestID, e.Endpoint) } // UnexpectedStatusCodeError is returned when a storage service responds with neither an error // nor with an HTTP status code indicating success. type UnexpectedStatusCodeError struct { - allowed []int // 预期OSS返回HTTP状态码 - got int // OSS实际返回HTTP状态码 + allowed []int // The expected HTTP stats code returned from OSS + got int // The actual HTTP status code from OSS } -// Implement interface error +// Error implements interface error func (e UnexpectedStatusCodeError) Error() string { s := func(i int) string { return fmt.Sprintf("%d %s", i, http.StatusText(i)) } @@ -49,9 +54,9 @@ func (e UnexpectedStatusCodeError) Got() int { return e.got } -// checkRespCode returns UnexpectedStatusError if the given response code is not +// CheckRespCode returns UnexpectedStatusError if the given response code is not // one of the allowed status codes; otherwise nil. -func checkRespCode(respCode int, allowed []int) error { +func CheckRespCode(respCode int, allowed []int) error { for _, v := range allowed { if respCode == v { return nil @@ -62,19 +67,26 @@ func checkRespCode(respCode int, allowed []int) error { // CRCCheckError is returned when crc check is inconsistent between client and server type CRCCheckError struct { - clientCRC uint64 // 客户端计算的CRC64值 - serverCRC uint64 // 服务端计算的CRC64值 - operation string // 上传操作,如PutObject/AppendObject/UploadPart等 - requestID string // 本次操作的RequestID + clientCRC uint64 // Calculated CRC64 in client + serverCRC uint64 // Calculated CRC64 in server + operation string // Upload operations such as PutObject/AppendObject/UploadPart, etc + requestID string // The request id of this operation } -// Implement interface error +// Error implements interface error func (e CRCCheckError) Error() string { return fmt.Sprintf("oss: the crc of %s is inconsistent, client %d but server %d; request id is %s", e.operation, e.clientCRC, e.serverCRC, e.requestID) } -func checkCRC(resp *Response, operation string) error { +func CheckDownloadCRC(clientCRC, serverCRC uint64) error { + if clientCRC == serverCRC { + return nil + } + return CRCCheckError{clientCRC, serverCRC, "DownloadFile", ""} +} + +func CheckCRC(resp *Response, operation string) error { if resp.Headers.Get(HTTPHeaderOssCRC64) == "" || resp.ClientCRC == resp.ServerCRC { return nil } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/limit_reader_1_6.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/limit_reader_1_6.go new file mode 100644 index 000000000..943dc8fd0 --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/limit_reader_1_6.go @@ -0,0 +1,28 @@ +// +build !go1.7 + +// "golang.org/x/time/rate" is depended on golang context package go1.7 onward +// this file is only for build,not supports limit upload speed +package oss + +import ( + "fmt" + "io" +) + +const ( + perTokenBandwidthSize int = 1024 +) + +type OssLimiter struct { +} + +type LimitSpeedReader struct { + io.ReadCloser + reader io.Reader + ossLimiter *OssLimiter +} + +func GetOssLimiter(uploadSpeed int) (ossLimiter *OssLimiter, err error) { + err = fmt.Errorf("rate.Limiter is not supported below version go1.7") + return nil, err +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/limit_reader_1_7.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/limit_reader_1_7.go new file mode 100644 index 000000000..f6baf2987 --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/limit_reader_1_7.go @@ -0,0 +1,90 @@ +// +build go1.7 + +package oss + +import ( + "fmt" + "io" + "math" + "time" + + "golang.org/x/time/rate" +) + +const ( + perTokenBandwidthSize int = 1024 +) + +// OssLimiter wrapper rate.Limiter +type OssLimiter struct { + limiter *rate.Limiter +} + +// GetOssLimiter create OssLimiter +// uploadSpeed KB/s +func GetOssLimiter(uploadSpeed int) (ossLimiter *OssLimiter, err error) { + limiter := rate.NewLimiter(rate.Limit(uploadSpeed), uploadSpeed) + + // first consume the initial full token,the limiter will behave more accurately + limiter.AllowN(time.Now(), uploadSpeed) + + return &OssLimiter{ + limiter: limiter, + }, nil +} + +// LimitSpeedReader for limit bandwidth upload +type LimitSpeedReader struct { + io.ReadCloser + reader io.Reader + ossLimiter *OssLimiter +} + +// Read +func (r *LimitSpeedReader) Read(p []byte) (n int, err error) { + n = 0 + err = nil + start := 0 + burst := r.ossLimiter.limiter.Burst() + var end int + var tmpN int + var tc int + for start < len(p) { + if start+burst*perTokenBandwidthSize < len(p) { + end = start + burst*perTokenBandwidthSize + } else { + end = len(p) + } + + tmpN, err = r.reader.Read(p[start:end]) + if tmpN > 0 { + n += tmpN + start = n + } + + if err != nil { + return + } + + tc = int(math.Ceil(float64(tmpN) / float64(perTokenBandwidthSize))) + now := time.Now() + re := r.ossLimiter.limiter.ReserveN(now, tc) + if !re.OK() { + err = fmt.Errorf("LimitSpeedReader.Read() failure,ReserveN error,start:%d,end:%d,burst:%d,perTokenBandwidthSize:%d", + start, end, burst, perTokenBandwidthSize) + return + } + timeDelay := re.Delay() + time.Sleep(timeDelay) + } + return +} + +// Close ... +func (r *LimitSpeedReader) Close() error { + rc, ok := r.reader.(io.ReadCloser) + if ok { + return rc.Close() + } + return nil +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/livechannel.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/livechannel.go new file mode 100644 index 000000000..bf5ba070b --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/livechannel.go @@ -0,0 +1,257 @@ +package oss + +import ( + "bytes" + "encoding/xml" + "fmt" + "io" + "net/http" + "strconv" + "time" +) + +// +// CreateLiveChannel create a live-channel +// +// channelName the name of the channel +// config configuration of the channel +// +// CreateLiveChannelResult the result of create live-channel +// error nil if success, otherwise error +// +func (bucket Bucket) CreateLiveChannel(channelName string, config LiveChannelConfiguration) (CreateLiveChannelResult, error) { + var out CreateLiveChannelResult + + bs, err := xml.Marshal(config) + if err != nil { + return out, err + } + + buffer := new(bytes.Buffer) + buffer.Write(bs) + + params := map[string]interface{}{} + params["live"] = nil + resp, err := bucket.do("PUT", channelName, params, nil, buffer, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// +// PutLiveChannelStatus Set the status of the live-channel: enabled/disabled +// +// channelName the name of the channel +// status enabled/disabled +// +// error nil if success, otherwise error +// +func (bucket Bucket) PutLiveChannelStatus(channelName, status string) error { + params := map[string]interface{}{} + params["live"] = nil + params["status"] = status + + resp, err := bucket.do("PUT", channelName, params, nil, nil, nil) + if err != nil { + return err + } + defer resp.Body.Close() + + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// PostVodPlaylist create an playlist based on the specified playlist name, startTime and endTime +// +// channelName the name of the channel +// playlistName the name of the playlist, must end with ".m3u8" +// startTime the start time of the playlist +// endTime the endtime of the playlist +// +// error nil if success, otherwise error +// +func (bucket Bucket) PostVodPlaylist(channelName, playlistName string, startTime, endTime time.Time) error { + params := map[string]interface{}{} + params["vod"] = nil + params["startTime"] = strconv.FormatInt(startTime.Unix(), 10) + params["endTime"] = strconv.FormatInt(endTime.Unix(), 10) + + key := fmt.Sprintf("%s/%s", channelName, playlistName) + resp, err := bucket.do("POST", key, params, nil, nil, nil) + if err != nil { + return err + } + defer resp.Body.Close() + + return CheckRespCode(resp.StatusCode, []int{http.StatusOK}) +} + +// GetVodPlaylist get the playlist based on the specified channelName, startTime and endTime +// +// channelName the name of the channel +// startTime the start time of the playlist +// endTime the endtime of the playlist +// +// io.ReadCloser reader instance for reading data from response. It must be called close() after the usage and only valid when error is nil. +// error nil if success, otherwise error +// +func (bucket Bucket) GetVodPlaylist(channelName string, startTime, endTime time.Time) (io.ReadCloser, error) { + params := map[string]interface{}{} + params["vod"] = nil + params["startTime"] = strconv.FormatInt(startTime.Unix(), 10) + params["endTime"] = strconv.FormatInt(endTime.Unix(), 10) + + resp, err := bucket.do("GET", channelName, params, nil, nil, nil) + if err != nil { + return nil, err + } + + return resp.Body, nil +} + +// +// GetLiveChannelStat Get the state of the live-channel +// +// channelName the name of the channel +// +// LiveChannelStat the state of the live-channel +// error nil if success, otherwise error +// +func (bucket Bucket) GetLiveChannelStat(channelName string) (LiveChannelStat, error) { + var out LiveChannelStat + params := map[string]interface{}{} + params["live"] = nil + params["comp"] = "stat" + + resp, err := bucket.do("GET", channelName, params, nil, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// +// GetLiveChannelInfo Get the configuration info of the live-channel +// +// channelName the name of the channel +// +// LiveChannelConfiguration the configuration info of the live-channel +// error nil if success, otherwise error +// +func (bucket Bucket) GetLiveChannelInfo(channelName string) (LiveChannelConfiguration, error) { + var out LiveChannelConfiguration + params := map[string]interface{}{} + params["live"] = nil + + resp, err := bucket.do("GET", channelName, params, nil, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// +// GetLiveChannelHistory Get push records of live-channel +// +// channelName the name of the channel +// +// LiveChannelHistory push records +// error nil if success, otherwise error +// +func (bucket Bucket) GetLiveChannelHistory(channelName string) (LiveChannelHistory, error) { + var out LiveChannelHistory + params := map[string]interface{}{} + params["live"] = nil + params["comp"] = "history" + + resp, err := bucket.do("GET", channelName, params, nil, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// +// ListLiveChannel list the live-channels +// +// options Prefix: filter by the name start with the value of "Prefix" +// MaxKeys: the maximum count returned +// Marker: cursor from which starting list +// +// ListLiveChannelResult live-channel list +// error nil if success, otherwise error +// +func (bucket Bucket) ListLiveChannel(options ...Option) (ListLiveChannelResult, error) { + var out ListLiveChannelResult + + params, err := GetRawParams(options) + if err != nil { + return out, err + } + + params["live"] = nil + + resp, err := bucket.do("GET", "", params, nil, nil, nil) + if err != nil { + return out, err + } + defer resp.Body.Close() + + err = xmlUnmarshal(resp.Body, &out) + return out, err +} + +// +// DeleteLiveChannel Delete the live-channel. When a client trying to stream the live-channel, the operation will fail. it will only delete the live-channel itself and the object generated by the live-channel will not be deleted. +// +// channelName the name of the channel +// +// error nil if success, otherwise error +// +func (bucket Bucket) DeleteLiveChannel(channelName string) error { + params := map[string]interface{}{} + params["live"] = nil + + if channelName == "" { + return fmt.Errorf("invalid argument: channel name is empty") + } + + resp, err := bucket.do("DELETE", channelName, params, nil, nil, nil) + if err != nil { + return err + } + defer resp.Body.Close() + + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) +} + +// +// SignRtmpURL Generate a RTMP push-stream signature URL for the trusted user to push the RTMP stream to the live-channel. +// +// channelName the name of the channel +// playlistName the name of the playlist, must end with ".m3u8" +// expires expiration (in seconds) +// +// string singed rtmp push stream url +// error nil if success, otherwise error +// +func (bucket Bucket) SignRtmpURL(channelName, playlistName string, expires int64) (string, error) { + if expires <= 0 { + return "", fmt.Errorf("invalid argument: %d, expires must greater than 0", expires) + } + expiration := time.Now().Unix() + expires + + return bucket.Client.Conn.signRtmpURL(bucket.BucketName, channelName, playlistName, expiration), nil +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/mime.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/mime.go index e2ed9ce10..64f4dcc63 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/mime.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/mime.go @@ -7,235 +7,562 @@ import ( ) var extToMimeType = map[string]string{ - ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", - ".xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", - ".potx": "application/vnd.openxmlformats-officedocument.presentationml.template", - ".ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", - ".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation", - ".sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide", - ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - ".dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", - ".xlam": "application/vnd.ms-excel.addin.macroEnabled.12", - ".xlsb": "application/vnd.ms-excel.sheet.binary.macroEnabled.12", - ".apk": "application/vnd.android.package-archive", - ".hqx": "application/mac-binhex40", - ".cpt": "application/mac-compactpro", - ".doc": "application/msword", - ".ogg": "application/ogg", - ".pdf": "application/pdf", - ".rtf": "text/rtf", - ".mif": "application/vnd.mif", - ".xls": "application/vnd.ms-excel", - ".ppt": "application/vnd.ms-powerpoint", - ".odc": "application/vnd.oasis.opendocument.chart", - ".odb": "application/vnd.oasis.opendocument.database", - ".odf": "application/vnd.oasis.opendocument.formula", - ".odg": "application/vnd.oasis.opendocument.graphics", - ".otg": "application/vnd.oasis.opendocument.graphics-template", - ".odi": "application/vnd.oasis.opendocument.image", - ".odp": "application/vnd.oasis.opendocument.presentation", - ".otp": "application/vnd.oasis.opendocument.presentation-template", - ".ods": "application/vnd.oasis.opendocument.spreadsheet", - ".ots": "application/vnd.oasis.opendocument.spreadsheet-template", - ".odt": "application/vnd.oasis.opendocument.text", - ".odm": "application/vnd.oasis.opendocument.text-master", - ".ott": "application/vnd.oasis.opendocument.text-template", - ".oth": "application/vnd.oasis.opendocument.text-web", - ".sxw": "application/vnd.sun.xml.writer", - ".stw": "application/vnd.sun.xml.writer.template", - ".sxc": "application/vnd.sun.xml.calc", - ".stc": "application/vnd.sun.xml.calc.template", - ".sxd": "application/vnd.sun.xml.draw", - ".std": "application/vnd.sun.xml.draw.template", - ".sxi": "application/vnd.sun.xml.impress", - ".sti": "application/vnd.sun.xml.impress.template", - ".sxg": "application/vnd.sun.xml.writer.global", - ".sxm": "application/vnd.sun.xml.math", - ".sis": "application/vnd.symbian.install", - ".wbxml": "application/vnd.wap.wbxml", - ".wmlc": "application/vnd.wap.wmlc", - ".wmlsc": "application/vnd.wap.wmlscriptc", - ".bcpio": "application/x-bcpio", - ".torrent": "application/x-bittorrent", - ".bz2": "application/x-bzip2", - ".vcd": "application/x-cdlink", - ".pgn": "application/x-chess-pgn", - ".cpio": "application/x-cpio", - ".csh": "application/x-csh", - ".dvi": "application/x-dvi", - ".spl": "application/x-futuresplash", - ".gtar": "application/x-gtar", - ".hdf": "application/x-hdf", - ".jar": "application/x-java-archive", - ".jnlp": "application/x-java-jnlp-file", - ".js": "application/x-javascript", - ".ksp": "application/x-kspread", - ".chrt": "application/x-kchart", - ".kil": "application/x-killustrator", - ".latex": "application/x-latex", - ".rpm": "application/x-rpm", - ".sh": "application/x-sh", - ".shar": "application/x-shar", - ".swf": "application/x-shockwave-flash", - ".sit": "application/x-stuffit", - ".sv4cpio": "application/x-sv4cpio", - ".sv4crc": "application/x-sv4crc", - ".tar": "application/x-tar", - ".tcl": "application/x-tcl", - ".tex": "application/x-tex", - ".man": "application/x-troff-man", - ".me": "application/x-troff-me", - ".ms": "application/x-troff-ms", - ".ustar": "application/x-ustar", - ".src": "application/x-wais-source", - ".zip": "application/zip", - ".m3u": "audio/x-mpegurl", - ".ra": "audio/x-pn-realaudio", - ".wav": "audio/x-wav", - ".wma": "audio/x-ms-wma", - ".wax": "audio/x-ms-wax", - ".pdb": "chemical/x-pdb", - ".xyz": "chemical/x-xyz", - ".bmp": "image/bmp", - ".gif": "image/gif", - ".ief": "image/ief", - ".png": "image/png", - ".wbmp": "image/vnd.wap.wbmp", - ".ras": "image/x-cmu-raster", - ".pnm": "image/x-portable-anymap", - ".pbm": "image/x-portable-bitmap", - ".pgm": "image/x-portable-graymap", - ".ppm": "image/x-portable-pixmap", - ".rgb": "image/x-rgb", - ".xbm": "image/x-xbitmap", - ".xpm": "image/x-xpixmap", - ".xwd": "image/x-xwindowdump", - ".css": "text/css", - ".rtx": "text/richtext", - ".tsv": "text/tab-separated-values", - ".jad": "text/vnd.sun.j2me.app-descriptor", - ".wml": "text/vnd.wap.wml", - ".wmls": "text/vnd.wap.wmlscript", - ".etx": "text/x-setext", - ".mxu": "video/vnd.mpegurl", - ".flv": "video/x-flv", - ".wm": "video/x-ms-wm", - ".wmv": "video/x-ms-wmv", - ".wmx": "video/x-ms-wmx", - ".wvx": "video/x-ms-wvx", - ".avi": "video/x-msvideo", - ".movie": "video/x-sgi-movie", - ".ice": "x-conference/x-cooltalk", - ".3gp": "video/3gpp", - ".ai": "application/postscript", - ".aif": "audio/x-aiff", - ".aifc": "audio/x-aiff", - ".aiff": "audio/x-aiff", - ".asc": "text/plain", - ".atom": "application/atom+xml", - ".au": "audio/basic", - ".bin": "application/octet-stream", - ".cdf": "application/x-netcdf", - ".cgm": "image/cgm", - ".class": "application/octet-stream", - ".dcr": "application/x-director", - ".dif": "video/x-dv", - ".dir": "application/x-director", - ".djv": "image/vnd.djvu", - ".djvu": "image/vnd.djvu", - ".dll": "application/octet-stream", - ".dmg": "application/octet-stream", - ".dms": "application/octet-stream", - ".dtd": "application/xml-dtd", - ".dv": "video/x-dv", - ".dxr": "application/x-director", - ".eps": "application/postscript", - ".exe": "application/octet-stream", - ".ez": "application/andrew-inset", - ".gram": "application/srgs", - ".grxml": "application/srgs+xml", - ".gz": "application/x-gzip", - ".htm": "text/html", - ".html": "text/html", - ".ico": "image/x-icon", - ".ics": "text/calendar", - ".ifb": "text/calendar", - ".iges": "model/iges", - ".igs": "model/iges", - ".jp2": "image/jp2", - ".jpe": "image/jpeg", - ".jpeg": "image/jpeg", - ".jpg": "image/jpeg", - ".kar": "audio/midi", - ".lha": "application/octet-stream", - ".lzh": "application/octet-stream", - ".m4a": "audio/mp4a-latm", - ".m4p": "audio/mp4a-latm", - ".m4u": "video/vnd.mpegurl", - ".m4v": "video/x-m4v", - ".mac": "image/x-macpaint", - ".mathml": "application/mathml+xml", - ".mesh": "model/mesh", - ".mid": "audio/midi", - ".midi": "audio/midi", - ".mov": "video/quicktime", - ".mp2": "audio/mpeg", - ".mp3": "audio/mpeg", - ".mp4": "video/mp4", - ".mpe": "video/mpeg", - ".mpeg": "video/mpeg", - ".mpg": "video/mpeg", - ".mpga": "audio/mpeg", - ".msh": "model/mesh", - ".nc": "application/x-netcdf", - ".oda": "application/oda", - ".ogv": "video/ogv", - ".pct": "image/pict", - ".pic": "image/pict", - ".pict": "image/pict", - ".pnt": "image/x-macpaint", - ".pntg": "image/x-macpaint", - ".ps": "application/postscript", - ".qt": "video/quicktime", - ".qti": "image/x-quicktime", - ".qtif": "image/x-quicktime", - ".ram": "audio/x-pn-realaudio", - ".rdf": "application/rdf+xml", - ".rm": "application/vnd.rn-realmedia", - ".roff": "application/x-troff", - ".sgm": "text/sgml", - ".sgml": "text/sgml", - ".silo": "model/mesh", - ".skd": "application/x-koan", - ".skm": "application/x-koan", - ".skp": "application/x-koan", - ".skt": "application/x-koan", - ".smi": "application/smil", - ".smil": "application/smil", - ".snd": "audio/basic", - ".so": "application/octet-stream", - ".svg": "image/svg+xml", - ".t": "application/x-troff", - ".texi": "application/x-texinfo", - ".texinfo": "application/x-texinfo", - ".tif": "image/tiff", - ".tiff": "image/tiff", - ".tr": "application/x-troff", - ".txt": "text/plain", - ".vrml": "model/vrml", - ".vxml": "application/voicexml+xml", - ".webm": "video/webm", - ".wrl": "model/vrml", - ".xht": "application/xhtml+xml", - ".xhtml": "application/xhtml+xml", - ".xml": "application/xml", - ".xsl": "application/xml", - ".xslt": "application/xslt+xml", - ".xul": "application/vnd.mozilla.xul+xml", + ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + ".xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", + ".potx": "application/vnd.openxmlformats-officedocument.presentationml.template", + ".ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", + ".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation", + ".sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide", + ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + ".dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", + ".xlam": "application/vnd.ms-excel.addin.macroEnabled.12", + ".xlsb": "application/vnd.ms-excel.sheet.binary.macroEnabled.12", + ".apk": "application/vnd.android.package-archive", + ".hqx": "application/mac-binhex40", + ".cpt": "application/mac-compactpro", + ".doc": "application/msword", + ".ogg": "application/ogg", + ".pdf": "application/pdf", + ".rtf": "text/rtf", + ".mif": "application/vnd.mif", + ".xls": "application/vnd.ms-excel", + ".ppt": "application/vnd.ms-powerpoint", + ".odc": "application/vnd.oasis.opendocument.chart", + ".odb": "application/vnd.oasis.opendocument.database", + ".odf": "application/vnd.oasis.opendocument.formula", + ".odg": "application/vnd.oasis.opendocument.graphics", + ".otg": "application/vnd.oasis.opendocument.graphics-template", + ".odi": "application/vnd.oasis.opendocument.image", + ".odp": "application/vnd.oasis.opendocument.presentation", + ".otp": "application/vnd.oasis.opendocument.presentation-template", + ".ods": "application/vnd.oasis.opendocument.spreadsheet", + ".ots": "application/vnd.oasis.opendocument.spreadsheet-template", + ".odt": "application/vnd.oasis.opendocument.text", + ".odm": "application/vnd.oasis.opendocument.text-master", + ".ott": "application/vnd.oasis.opendocument.text-template", + ".oth": "application/vnd.oasis.opendocument.text-web", + ".sxw": "application/vnd.sun.xml.writer", + ".stw": "application/vnd.sun.xml.writer.template", + ".sxc": "application/vnd.sun.xml.calc", + ".stc": "application/vnd.sun.xml.calc.template", + ".sxd": "application/vnd.sun.xml.draw", + ".std": "application/vnd.sun.xml.draw.template", + ".sxi": "application/vnd.sun.xml.impress", + ".sti": "application/vnd.sun.xml.impress.template", + ".sxg": "application/vnd.sun.xml.writer.global", + ".sxm": "application/vnd.sun.xml.math", + ".sis": "application/vnd.symbian.install", + ".wbxml": "application/vnd.wap.wbxml", + ".wmlc": "application/vnd.wap.wmlc", + ".wmlsc": "application/vnd.wap.wmlscriptc", + ".bcpio": "application/x-bcpio", + ".torrent": "application/x-bittorrent", + ".bz2": "application/x-bzip2", + ".vcd": "application/x-cdlink", + ".pgn": "application/x-chess-pgn", + ".cpio": "application/x-cpio", + ".csh": "application/x-csh", + ".dvi": "application/x-dvi", + ".spl": "application/x-futuresplash", + ".gtar": "application/x-gtar", + ".hdf": "application/x-hdf", + ".jar": "application/x-java-archive", + ".jnlp": "application/x-java-jnlp-file", + ".js": "application/x-javascript", + ".ksp": "application/x-kspread", + ".chrt": "application/x-kchart", + ".kil": "application/x-killustrator", + ".latex": "application/x-latex", + ".rpm": "application/x-rpm", + ".sh": "application/x-sh", + ".shar": "application/x-shar", + ".swf": "application/x-shockwave-flash", + ".sit": "application/x-stuffit", + ".sv4cpio": "application/x-sv4cpio", + ".sv4crc": "application/x-sv4crc", + ".tar": "application/x-tar", + ".tcl": "application/x-tcl", + ".tex": "application/x-tex", + ".man": "application/x-troff-man", + ".me": "application/x-troff-me", + ".ms": "application/x-troff-ms", + ".ustar": "application/x-ustar", + ".src": "application/x-wais-source", + ".zip": "application/zip", + ".m3u": "audio/x-mpegurl", + ".ra": "audio/x-pn-realaudio", + ".wav": "audio/x-wav", + ".wma": "audio/x-ms-wma", + ".wax": "audio/x-ms-wax", + ".pdb": "chemical/x-pdb", + ".xyz": "chemical/x-xyz", + ".bmp": "image/bmp", + ".gif": "image/gif", + ".ief": "image/ief", + ".png": "image/png", + ".wbmp": "image/vnd.wap.wbmp", + ".ras": "image/x-cmu-raster", + ".pnm": "image/x-portable-anymap", + ".pbm": "image/x-portable-bitmap", + ".pgm": "image/x-portable-graymap", + ".ppm": "image/x-portable-pixmap", + ".rgb": "image/x-rgb", + ".xbm": "image/x-xbitmap", + ".xpm": "image/x-xpixmap", + ".xwd": "image/x-xwindowdump", + ".css": "text/css", + ".rtx": "text/richtext", + ".tsv": "text/tab-separated-values", + ".jad": "text/vnd.sun.j2me.app-descriptor", + ".wml": "text/vnd.wap.wml", + ".wmls": "text/vnd.wap.wmlscript", + ".etx": "text/x-setext", + ".mxu": "video/vnd.mpegurl", + ".flv": "video/x-flv", + ".wm": "video/x-ms-wm", + ".wmv": "video/x-ms-wmv", + ".wmx": "video/x-ms-wmx", + ".wvx": "video/x-ms-wvx", + ".avi": "video/x-msvideo", + ".movie": "video/x-sgi-movie", + ".ice": "x-conference/x-cooltalk", + ".3gp": "video/3gpp", + ".ai": "application/postscript", + ".aif": "audio/x-aiff", + ".aifc": "audio/x-aiff", + ".aiff": "audio/x-aiff", + ".asc": "text/plain", + ".atom": "application/atom+xml", + ".au": "audio/basic", + ".bin": "application/octet-stream", + ".cdf": "application/x-netcdf", + ".cgm": "image/cgm", + ".class": "application/octet-stream", + ".dcr": "application/x-director", + ".dif": "video/x-dv", + ".dir": "application/x-director", + ".djv": "image/vnd.djvu", + ".djvu": "image/vnd.djvu", + ".dll": "application/octet-stream", + ".dmg": "application/octet-stream", + ".dms": "application/octet-stream", + ".dtd": "application/xml-dtd", + ".dv": "video/x-dv", + ".dxr": "application/x-director", + ".eps": "application/postscript", + ".exe": "application/octet-stream", + ".ez": "application/andrew-inset", + ".gram": "application/srgs", + ".grxml": "application/srgs+xml", + ".gz": "application/x-gzip", + ".htm": "text/html", + ".html": "text/html", + ".ico": "image/x-icon", + ".ics": "text/calendar", + ".ifb": "text/calendar", + ".iges": "model/iges", + ".igs": "model/iges", + ".jp2": "image/jp2", + ".jpe": "image/jpeg", + ".jpeg": "image/jpeg", + ".jpg": "image/jpeg", + ".kar": "audio/midi", + ".lha": "application/octet-stream", + ".lzh": "application/octet-stream", + ".m4a": "audio/mp4a-latm", + ".m4p": "audio/mp4a-latm", + ".m4u": "video/vnd.mpegurl", + ".m4v": "video/x-m4v", + ".mac": "image/x-macpaint", + ".mathml": "application/mathml+xml", + ".mesh": "model/mesh", + ".mid": "audio/midi", + ".midi": "audio/midi", + ".mov": "video/quicktime", + ".mp2": "audio/mpeg", + ".mp3": "audio/mpeg", + ".mp4": "video/mp4", + ".mpe": "video/mpeg", + ".mpeg": "video/mpeg", + ".mpg": "video/mpeg", + ".mpga": "audio/mpeg", + ".msh": "model/mesh", + ".nc": "application/x-netcdf", + ".oda": "application/oda", + ".ogv": "video/ogv", + ".pct": "image/pict", + ".pic": "image/pict", + ".pict": "image/pict", + ".pnt": "image/x-macpaint", + ".pntg": "image/x-macpaint", + ".ps": "application/postscript", + ".qt": "video/quicktime", + ".qti": "image/x-quicktime", + ".qtif": "image/x-quicktime", + ".ram": "audio/x-pn-realaudio", + ".rdf": "application/rdf+xml", + ".rm": "application/vnd.rn-realmedia", + ".roff": "application/x-troff", + ".sgm": "text/sgml", + ".sgml": "text/sgml", + ".silo": "model/mesh", + ".skd": "application/x-koan", + ".skm": "application/x-koan", + ".skp": "application/x-koan", + ".skt": "application/x-koan", + ".smi": "application/smil", + ".smil": "application/smil", + ".snd": "audio/basic", + ".so": "application/octet-stream", + ".svg": "image/svg+xml", + ".t": "application/x-troff", + ".texi": "application/x-texinfo", + ".texinfo": "application/x-texinfo", + ".tif": "image/tiff", + ".tiff": "image/tiff", + ".tr": "application/x-troff", + ".txt": "text/plain", + ".vrml": "model/vrml", + ".vxml": "application/voicexml+xml", + ".webm": "video/webm", + ".wrl": "model/vrml", + ".xht": "application/xhtml+xml", + ".xhtml": "application/xhtml+xml", + ".xml": "application/xml", + ".xsl": "application/xml", + ".xslt": "application/xslt+xml", + ".xul": "application/vnd.mozilla.xul+xml", + ".webp": "image/webp", + ".323": "text/h323", + ".aab": "application/x-authoware-bin", + ".aam": "application/x-authoware-map", + ".aas": "application/x-authoware-seg", + ".acx": "application/internet-property-stream", + ".als": "audio/X-Alpha5", + ".amc": "application/x-mpeg", + ".ani": "application/octet-stream", + ".asd": "application/astound", + ".asf": "video/x-ms-asf", + ".asn": "application/astound", + ".asp": "application/x-asap", + ".asr": "video/x-ms-asf", + ".asx": "video/x-ms-asf", + ".avb": "application/octet-stream", + ".awb": "audio/amr-wb", + ".axs": "application/olescript", + ".bas": "text/plain", + ".bin ": "application/octet-stream", + ".bld": "application/bld", + ".bld2": "application/bld2", + ".bpk": "application/octet-stream", + ".c": "text/plain", + ".cal": "image/x-cals", + ".cat": "application/vnd.ms-pkiseccat", + ".ccn": "application/x-cnc", + ".cco": "application/x-cocoa", + ".cer": "application/x-x509-ca-cert", + ".cgi": "magnus-internal/cgi", + ".chat": "application/x-chat", + ".clp": "application/x-msclip", + ".cmx": "image/x-cmx", + ".co": "application/x-cult3d-object", + ".cod": "image/cis-cod", + ".conf": "text/plain", + ".cpp": "text/plain", + ".crd": "application/x-mscardfile", + ".crl": "application/pkix-crl", + ".crt": "application/x-x509-ca-cert", + ".csm": "chemical/x-csml", + ".csml": "chemical/x-csml", + ".cur": "application/octet-stream", + ".dcm": "x-lml/x-evm", + ".dcx": "image/x-dcx", + ".der": "application/x-x509-ca-cert", + ".dhtml": "text/html", + ".dot": "application/msword", + ".dwf": "drawing/x-dwf", + ".dwg": "application/x-autocad", + ".dxf": "application/x-autocad", + ".ebk": "application/x-expandedbook", + ".emb": "chemical/x-embl-dl-nucleotide", + ".embl": "chemical/x-embl-dl-nucleotide", + ".epub": "application/epub+zip", + ".eri": "image/x-eri", + ".es": "audio/echospeech", + ".esl": "audio/echospeech", + ".etc": "application/x-earthtime", + ".evm": "x-lml/x-evm", + ".evy": "application/envoy", + ".fh4": "image/x-freehand", + ".fh5": "image/x-freehand", + ".fhc": "image/x-freehand", + ".fif": "application/fractals", + ".flr": "x-world/x-vrml", + ".fm": "application/x-maker", + ".fpx": "image/x-fpx", + ".fvi": "video/isivideo", + ".gau": "chemical/x-gaussian-input", + ".gca": "application/x-gca-compressed", + ".gdb": "x-lml/x-gdb", + ".gps": "application/x-gps", + ".h": "text/plain", + ".hdm": "text/x-hdml", + ".hdml": "text/x-hdml", + ".hlp": "application/winhlp", + ".hta": "application/hta", + ".htc": "text/x-component", + ".hts": "text/html", + ".htt": "text/webviewhtml", + ".ifm": "image/gif", + ".ifs": "image/ifs", + ".iii": "application/x-iphone", + ".imy": "audio/melody", + ".ins": "application/x-internet-signup", + ".ips": "application/x-ipscript", + ".ipx": "application/x-ipix", + ".isp": "application/x-internet-signup", + ".it": "audio/x-mod", + ".itz": "audio/x-mod", + ".ivr": "i-world/i-vrml", + ".j2k": "image/j2k", + ".jam": "application/x-jam", + ".java": "text/plain", + ".jfif": "image/pipeg", + ".jpz": "image/jpeg", + ".jwc": "application/jwc", + ".kjx": "application/x-kjx", + ".lak": "x-lml/x-lak", + ".lcc": "application/fastman", + ".lcl": "application/x-digitalloca", + ".lcr": "application/x-digitalloca", + ".lgh": "application/lgh", + ".lml": "x-lml/x-lml", + ".lmlpack": "x-lml/x-lmlpack", + ".log": "text/plain", + ".lsf": "video/x-la-asf", + ".lsx": "video/x-la-asf", + ".m13": "application/x-msmediaview", + ".m14": "application/x-msmediaview", + ".m15": "audio/x-mod", + ".m3url": "audio/x-mpegurl", + ".m4b": "audio/mp4a-latm", + ".ma1": "audio/ma1", + ".ma2": "audio/ma2", + ".ma3": "audio/ma3", + ".ma5": "audio/ma5", + ".map": "magnus-internal/imagemap", + ".mbd": "application/mbedlet", + ".mct": "application/x-mascot", + ".mdb": "application/x-msaccess", + ".mdz": "audio/x-mod", + ".mel": "text/x-vmel", + ".mht": "message/rfc822", + ".mhtml": "message/rfc822", + ".mi": "application/x-mif", + ".mil": "image/x-cals", + ".mio": "audio/x-mio", + ".mmf": "application/x-skt-lbs", + ".mng": "video/x-mng", + ".mny": "application/x-msmoney", + ".moc": "application/x-mocha", + ".mocha": "application/x-mocha", + ".mod": "audio/x-mod", + ".mof": "application/x-yumekara", + ".mol": "chemical/x-mdl-molfile", + ".mop": "chemical/x-mopac-input", + ".mpa": "video/mpeg", + ".mpc": "application/vnd.mpohun.certificate", + ".mpg4": "video/mp4", + ".mpn": "application/vnd.mophun.application", + ".mpp": "application/vnd.ms-project", + ".mps": "application/x-mapserver", + ".mpv2": "video/mpeg", + ".mrl": "text/x-mrml", + ".mrm": "application/x-mrm", + ".msg": "application/vnd.ms-outlook", + ".mts": "application/metastream", + ".mtx": "application/metastream", + ".mtz": "application/metastream", + ".mvb": "application/x-msmediaview", + ".mzv": "application/metastream", + ".nar": "application/zip", + ".nbmp": "image/nbmp", + ".ndb": "x-lml/x-ndb", + ".ndwn": "application/ndwn", + ".nif": "application/x-nif", + ".nmz": "application/x-scream", + ".nokia-op-logo": "image/vnd.nok-oplogo-color", + ".npx": "application/x-netfpx", + ".nsnd": "audio/nsnd", + ".nva": "application/x-neva1", + ".nws": "message/rfc822", + ".oom": "application/x-AtlasMate-Plugin", + ".p10": "application/pkcs10", + ".p12": "application/x-pkcs12", + ".p7b": "application/x-pkcs7-certificates", + ".p7c": "application/x-pkcs7-mime", + ".p7m": "application/x-pkcs7-mime", + ".p7r": "application/x-pkcs7-certreqresp", + ".p7s": "application/x-pkcs7-signature", + ".pac": "audio/x-pac", + ".pae": "audio/x-epac", + ".pan": "application/x-pan", + ".pcx": "image/x-pcx", + ".pda": "image/x-pda", + ".pfr": "application/font-tdpfr", + ".pfx": "application/x-pkcs12", + ".pko": "application/ynd.ms-pkipko", + ".pm": "application/x-perl", + ".pma": "application/x-perfmon", + ".pmc": "application/x-perfmon", + ".pmd": "application/x-pmd", + ".pml": "application/x-perfmon", + ".pmr": "application/x-perfmon", + ".pmw": "application/x-perfmon", + ".pnz": "image/png", + ".pot,": "application/vnd.ms-powerpoint", + ".pps": "application/vnd.ms-powerpoint", + ".pqf": "application/x-cprplayer", + ".pqi": "application/cprplayer", + ".prc": "application/x-prc", + ".prf": "application/pics-rules", + ".prop": "text/plain", + ".proxy": "application/x-ns-proxy-autoconfig", + ".ptlk": "application/listenup", + ".pub": "application/x-mspublisher", + ".pvx": "video/x-pv-pvx", + ".qcp": "audio/vnd.qcelp", + ".r3t": "text/vnd.rn-realtext3d", + ".rar": "application/octet-stream", + ".rc": "text/plain", + ".rf": "image/vnd.rn-realflash", + ".rlf": "application/x-richlink", + ".rmf": "audio/x-rmf", + ".rmi": "audio/mid", + ".rmm": "audio/x-pn-realaudio", + ".rmvb": "audio/x-pn-realaudio", + ".rnx": "application/vnd.rn-realplayer", + ".rp": "image/vnd.rn-realpix", + ".rt": "text/vnd.rn-realtext", + ".rte": "x-lml/x-gps", + ".rtg": "application/metastream", + ".rv": "video/vnd.rn-realvideo", + ".rwc": "application/x-rogerwilco", + ".s3m": "audio/x-mod", + ".s3z": "audio/x-mod", + ".sca": "application/x-supercard", + ".scd": "application/x-msschedule", + ".sct": "text/scriptlet", + ".sdf": "application/e-score", + ".sea": "application/x-stuffit", + ".setpay": "application/set-payment-initiation", + ".setreg": "application/set-registration-initiation", + ".shtml": "text/html", + ".shtm": "text/html", + ".shw": "application/presentations", + ".si6": "image/si6", + ".si7": "image/vnd.stiwap.sis", + ".si9": "image/vnd.lgtwap.sis", + ".slc": "application/x-salsa", + ".smd": "audio/x-smd", + ".smp": "application/studiom", + ".smz": "audio/x-smd", + ".spc": "application/x-pkcs7-certificates", + ".spr": "application/x-sprite", + ".sprite": "application/x-sprite", + ".sdp": "application/sdp", + ".spt": "application/x-spt", + ".sst": "application/vnd.ms-pkicertstore", + ".stk": "application/hyperstudio", + ".stl": "application/vnd.ms-pkistl", + ".stm": "text/html", + ".svf": "image/vnd", + ".svh": "image/svh", + ".svr": "x-world/x-svr", + ".swfl": "application/x-shockwave-flash", + ".tad": "application/octet-stream", + ".talk": "text/x-speech", + ".taz": "application/x-tar", + ".tbp": "application/x-timbuktu", + ".tbt": "application/x-timbuktu", + ".tgz": "application/x-compressed", + ".thm": "application/vnd.eri.thm", + ".tki": "application/x-tkined", + ".tkined": "application/x-tkined", + ".toc": "application/toc", + ".toy": "image/toy", + ".trk": "x-lml/x-gps", + ".trm": "application/x-msterminal", + ".tsi": "audio/tsplayer", + ".tsp": "application/dsptype", + ".ttf": "application/octet-stream", + ".ttz": "application/t-time", + ".uls": "text/iuls", + ".ult": "audio/x-mod", + ".uu": "application/x-uuencode", + ".uue": "application/x-uuencode", + ".vcf": "text/x-vcard", + ".vdo": "video/vdo", + ".vib": "audio/vib", + ".viv": "video/vivo", + ".vivo": "video/vivo", + ".vmd": "application/vocaltec-media-desc", + ".vmf": "application/vocaltec-media-file", + ".vmi": "application/x-dreamcast-vms-info", + ".vms": "application/x-dreamcast-vms", + ".vox": "audio/voxware", + ".vqe": "audio/x-twinvq-plugin", + ".vqf": "audio/x-twinvq", + ".vql": "audio/x-twinvq", + ".vre": "x-world/x-vream", + ".vrt": "x-world/x-vrt", + ".vrw": "x-world/x-vream", + ".vts": "workbook/formulaone", + ".wcm": "application/vnd.ms-works", + ".wdb": "application/vnd.ms-works", + ".web": "application/vnd.xara", + ".wi": "image/wavelet", + ".wis": "application/x-InstallShield", + ".wks": "application/vnd.ms-works", + ".wmd": "application/x-ms-wmd", + ".wmf": "application/x-msmetafile", + ".wmlscript": "text/vnd.wap.wmlscript", + ".wmz": "application/x-ms-wmz", + ".wpng": "image/x-up-wpng", + ".wps": "application/vnd.ms-works", + ".wpt": "x-lml/x-gps", + ".wri": "application/x-mswrite", + ".wrz": "x-world/x-vrml", + ".ws": "text/vnd.wap.wmlscript", + ".wsc": "application/vnd.wap.wmlscriptc", + ".wv": "video/wavelet", + ".wxl": "application/x-wxl", + ".x-gzip": "application/x-gzip", + ".xaf": "x-world/x-vrml", + ".xar": "application/vnd.xara", + ".xdm": "application/x-xdma", + ".xdma": "application/x-xdma", + ".xdw": "application/vnd.fujixerox.docuworks", + ".xhtm": "application/xhtml+xml", + ".xla": "application/vnd.ms-excel", + ".xlc": "application/vnd.ms-excel", + ".xll": "application/x-excel", + ".xlm": "application/vnd.ms-excel", + ".xlt": "application/vnd.ms-excel", + ".xlw": "application/vnd.ms-excel", + ".xm": "audio/x-mod", + ".xmz": "audio/x-mod", + ".xof": "x-world/x-vrml", + ".xpi": "application/x-xpinstall", + ".xsit": "text/xml", + ".yz1": "application/x-yz1", + ".z": "application/x-compress", + ".zac": "application/x-zaurus-zac", + ".json": "application/json", } // TypeByExtension returns the MIME type associated with the file extension ext. -// 获取文件类型,选项ContentType使用 +// gets the file's MIME type for HTTP header Content-Type func TypeByExtension(filePath string) string { typ := mime.TypeByExtension(path.Ext(filePath)) if typ == "" { diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/model.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/model.go index 7c71b0181..b0b4a5027 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/model.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/model.go @@ -6,7 +6,7 @@ import ( "net/http" ) -// Response Http response from oss +// Response defines HTTP response from OSS type Response struct { StatusCode int Headers http.Header @@ -15,38 +15,47 @@ type Response struct { ServerCRC uint64 } -// PutObjectRequest The request of DoPutObject +func (r *Response) Read(p []byte) (n int, err error) { + return r.Body.Read(p) +} + +// Close close http reponse body +func (r *Response) Close() error { + return r.Body.Close() +} + +// PutObjectRequest is the request of DoPutObject type PutObjectRequest struct { ObjectKey string Reader io.Reader } -// GetObjectRequest The request of DoGetObject +// GetObjectRequest is the request of DoGetObject type GetObjectRequest struct { ObjectKey string } -// GetObjectResult The result of DoGetObject +// GetObjectResult is the result of DoGetObject type GetObjectResult struct { Response *Response ClientCRC hash.Hash64 ServerCRC uint64 } -// AppendObjectRequest The requtest of DoAppendObject +// AppendObjectRequest is the requtest of DoAppendObject type AppendObjectRequest struct { ObjectKey string Reader io.Reader Position int64 } -// AppendObjectResult The result of DoAppendObject +// AppendObjectResult is the result of DoAppendObject type AppendObjectResult struct { NextPosition int64 CRC uint64 } -// UploadPartRequest The request of DoUploadPart +// UploadPartRequest is the request of DoUploadPart type UploadPartRequest struct { InitResult *InitiateMultipartUploadResult Reader io.Reader @@ -54,7 +63,7 @@ type UploadPartRequest struct { PartNumber int } -// UploadPartResult The result of DoUploadPart +// UploadPartResult is the result of DoUploadPart type UploadPartResult struct { Part UploadPart } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/multicopy.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/multicopy.go index a33b48870..56ed8cadf 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/multicopy.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/multicopy.go @@ -5,22 +5,22 @@ import ( "encoding/base64" "encoding/json" "errors" + "fmt" "io/ioutil" + "net/http" "os" - "path/filepath" "strconv" ) +// CopyFile is multipart copy object // -// CopyFile 分片复制文件 +// srcBucketName source bucket name +// srcObjectKey source object name +// destObjectKey target object name in the form of bucketname.objectkey +// partSize the part size in byte. +// options object's contraints. Check out function InitiateMultipartUpload. // -// srcBucketName 源Bucket名称。 -// srcObjectKey 源Object名称。 -// destObjectKey 目标Object名称。目标Bucket名称为Bucket.BucketName。 -// partSize 复制文件片的大小,字节数。比如100 * 1024为每片100KB。 -// options Object的属性限制项。详见InitiateMultipartUpload。 -// -// error 操作成功error为nil,非nil为错误信息。 +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) CopyFile(srcBucketName, srcObjectKey, destObjectKey string, partSize int64, options ...Option) error { destBucketName := bucket.BucketName @@ -28,25 +28,39 @@ func (bucket Bucket) CopyFile(srcBucketName, srcObjectKey, destObjectKey string, return errors.New("oss: part size invalid range (1024KB, 5GB]") } - cpConf, err := getCpConfig(options, filepath.Base(destObjectKey)) - if err != nil { - return err - } - + cpConf := getCpConfig(options) routines := getRoutines(options) - if cpConf.IsEnable { - return bucket.copyFileWithCp(srcBucketName, srcObjectKey, destBucketName, destObjectKey, - partSize, options, cpConf.FilePath, routines) + var strVersionId string + versionId, _ := FindOption(options, "versionId", nil) + if versionId != nil { + strVersionId = versionId.(string) + } + + if cpConf != nil && cpConf.IsEnable { + cpFilePath := getCopyCpFilePath(cpConf, srcBucketName, srcObjectKey, destBucketName, destObjectKey, strVersionId) + if cpFilePath != "" { + return bucket.copyFileWithCp(srcBucketName, srcObjectKey, destBucketName, destObjectKey, partSize, options, cpFilePath, routines) + } } return bucket.copyFile(srcBucketName, srcObjectKey, destBucketName, destObjectKey, partSize, options, routines) } -// ----- 并发无断点的下载 ----- +func getCopyCpFilePath(cpConf *cpConfig, srcBucket, srcObject, destBucket, destObject, versionId string) string { + if cpConf.FilePath == "" && cpConf.DirPath != "" { + dest := fmt.Sprintf("oss://%v/%v", destBucket, destObject) + src := fmt.Sprintf("oss://%v/%v", srcBucket, srcObject) + cpFileName := getCpFileName(src, dest, versionId) + cpConf.FilePath = cpConf.DirPath + string(os.PathSeparator) + cpFileName + } + return cpConf.FilePath +} -// 工作协程参数 +// ----- Concurrently copy without checkpoint --------- + +// copyWorkerArg defines the copy worker arguments type copyWorkerArg struct { bucket *Bucket imur InitiateMultipartUploadResult @@ -56,7 +70,7 @@ type copyWorkerArg struct { hook copyPartHook } -// Hook用于测试 +// copyPartHook is the hook for testing purpose type copyPartHook func(part copyPart) error var copyPartHooker copyPartHook = defaultCopyPartHook @@ -65,7 +79,7 @@ func defaultCopyPartHook(part copyPart) error { return nil } -// 工作协程 +// copyWorker copies worker func copyWorker(id int, arg copyWorkerArg, jobs <-chan copyPart, results chan<- UploadPart, failed chan<- error, die <-chan bool) { for chunk := range jobs { if err := arg.hook(chunk); err != nil { @@ -88,7 +102,7 @@ func copyWorker(id int, arg copyWorkerArg, jobs <-chan copyPart, results chan<- } } -// 调度协程 +// copyScheduler func copyScheduler(jobs chan copyPart, parts []copyPart) { for _, part := range parts { jobs <- part @@ -96,26 +110,16 @@ func copyScheduler(jobs chan copyPart, parts []copyPart) { close(jobs) } -// 分片 +// copyPart structure type copyPart struct { - Number int // 片序号[1, 10000] - Start int64 // 片起始位置 - End int64 // 片结束位置 + Number int // Part number (from 1 to 10,000) + Start int64 // The start index in the source file. + End int64 // The end index in the source file } -// 文件分片 -func getCopyParts(bucket *Bucket, objectKey string, partSize int64) ([]copyPart, error) { - meta, err := bucket.GetObjectDetailedMeta(objectKey) - if err != nil { - return nil, err - } - +// getCopyParts calculates copy parts +func getCopyParts(objectSize, partSize int64) []copyPart { parts := []copyPart{} - objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 0) - if err != nil { - return nil, err - } - part := copyPart{} i := 0 for offset := int64(0); offset < objectSize; offset += partSize { @@ -125,10 +129,10 @@ func getCopyParts(bucket *Bucket, objectKey string, partSize int64) ([]copyPart, parts = append(parts, part) i++ } - return parts, nil + return parts } -// 获取源文件大小 +// getSrcObjectBytes gets the source file size func getSrcObjectBytes(parts []copyPart) int64 { var ob int64 for _, part := range parts { @@ -137,20 +141,32 @@ func getSrcObjectBytes(parts []copyPart) int64 { return ob } -// 并发无断点续传的下载 +// copyFile is a concurrently copy without checkpoint func (bucket Bucket) copyFile(srcBucketName, srcObjectKey, destBucketName, destObjectKey string, partSize int64, options []Option, routines int) error { descBucket, err := bucket.Client.Bucket(destBucketName) srcBucket, err := bucket.Client.Bucket(srcBucketName) - listener := getProgressListener(options) + listener := GetProgressListener(options) - // 分割文件 - parts, err := getCopyParts(srcBucket, srcObjectKey, partSize) + // choice valid options + headerOptions := ChoiceHeadObjectOption(options) + partOptions := ChoiceTransferPartOption(options) + completeOptions := ChoiceCompletePartOption(options) + abortOptions := ChoiceAbortPartOption(options) + + meta, err := srcBucket.GetObjectDetailedMeta(srcObjectKey, headerOptions...) if err != nil { return err } - // 初始化上传任务 + objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 0) + if err != nil { + return err + } + + // Get copy parts + parts := getCopyParts(objectSize, partSize) + // Initialize the multipart upload imur, err := descBucket.InitiateMultipartUpload(destObjectKey, options...) if err != nil { return err @@ -163,19 +179,19 @@ func (bucket Bucket) copyFile(srcBucketName, srcObjectKey, destBucketName, destO var completedBytes int64 totalBytes := getSrcObjectBytes(parts) - event := newProgressEvent(TransferStartedEvent, 0, totalBytes) + event := newProgressEvent(TransferStartedEvent, 0, totalBytes, 0) publishProgress(listener, event) - // 启动工作协程 - arg := copyWorkerArg{descBucket, imur, srcBucketName, srcObjectKey, options, copyPartHooker} + // Start to copy workers + arg := copyWorkerArg{descBucket, imur, srcBucketName, srcObjectKey, partOptions, copyPartHooker} for w := 1; w <= routines; w++ { go copyWorker(w, arg, jobs, results, failed, die) } - // 并发上传分片 + // Start the scheduler go copyScheduler(jobs, parts) - // 等待分片下载完成 + // Wait for the parts finished. completed := 0 ups := make([]UploadPart, len(parts)) for completed < len(parts) { @@ -183,13 +199,14 @@ func (bucket Bucket) copyFile(srcBucketName, srcObjectKey, destBucketName, destO case part := <-results: completed++ ups[part.PartNumber-1] = part - completedBytes += (parts[part.PartNumber-1].End - parts[part.PartNumber-1].Start + 1) - event = newProgressEvent(TransferDataEvent, completedBytes, totalBytes) + copyBytes := (parts[part.PartNumber-1].End - parts[part.PartNumber-1].Start + 1) + completedBytes += copyBytes + event = newProgressEvent(TransferDataEvent, completedBytes, totalBytes, copyBytes) publishProgress(listener, event) case err := <-failed: close(die) - descBucket.AbortMultipartUpload(imur) - event = newProgressEvent(TransferFailedEvent, completedBytes, totalBytes) + descBucket.AbortMultipartUpload(imur, abortOptions...) + event = newProgressEvent(TransferFailedEvent, completedBytes, totalBytes, 0) publishProgress(listener, event) return err } @@ -199,39 +216,39 @@ func (bucket Bucket) copyFile(srcBucketName, srcObjectKey, destBucketName, destO } } - event = newProgressEvent(TransferCompletedEvent, completedBytes, totalBytes) + event = newProgressEvent(TransferCompletedEvent, completedBytes, totalBytes, 0) publishProgress(listener, event) - // 提交任务 - _, err = descBucket.CompleteMultipartUpload(imur, ups) + // Complete the multipart upload + _, err = descBucket.CompleteMultipartUpload(imur, ups, completeOptions...) if err != nil { - bucket.AbortMultipartUpload(imur) + bucket.AbortMultipartUpload(imur, abortOptions...) return err } return nil } -// ----- 并发有断点的下载 ----- +// ----- Concurrently copy with checkpoint ----- const copyCpMagic = "84F1F18C-FF1D-403B-A1D8-9DEB5F65910A" type copyCheckpoint struct { - Magic string // magic - MD5 string // cp内容的MD5 - SrcBucketName string // 源Bucket - SrcObjectKey string // 源Object - DestBucketName string // 目标Bucket - DestObjectKey string // 目标Bucket - CopyID string // copy id - ObjStat objectStat // 文件状态 - Parts []copyPart // 全部分片 - CopyParts []UploadPart // 分片上传成功后的返回值 - PartStat []bool // 分片下载是否完成 + Magic string // Magic + MD5 string // CP content MD5 + SrcBucketName string // Source bucket + SrcObjectKey string // Source object + DestBucketName string // Target bucket + DestObjectKey string // Target object + CopyID string // Copy ID + ObjStat objectStat // Object stat + Parts []copyPart // Copy parts + CopyParts []UploadPart // The uploaded parts + PartStat []bool // The part status } -// CP数据是否有效,CP有效且Object没有更新时有效 -func (cp copyCheckpoint) isValid(bucket *Bucket, objectKey string) (bool, error) { - // 比较CP的Magic及MD5 +// isValid checks if the data is valid which means CP is valid and object is not updated. +func (cp copyCheckpoint) isValid(meta http.Header) (bool, error) { + // Compare CP's magic number and the MD5. cpb := cp cpb.MD5 = "" js, _ := json.Marshal(cpb) @@ -242,18 +259,12 @@ func (cp copyCheckpoint) isValid(bucket *Bucket, objectKey string) (bool, error) return false, nil } - // 确认object没有更新 - meta, err := bucket.GetObjectDetailedMeta(objectKey) + objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 64) if err != nil { return false, err } - objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 0) - if err != nil { - return false, err - } - - // 比较Object的大小/最后修改时间/etag + // Compare the object size and last modified time and etag. if cp.ObjStat.Size != objectSize || cp.ObjStat.LastModified != meta.Get(HTTPHeaderLastModified) || cp.ObjStat.Etag != meta.Get(HTTPHeaderEtag) { @@ -263,7 +274,7 @@ func (cp copyCheckpoint) isValid(bucket *Bucket, objectKey string) (bool, error) return true, nil } -// 从文件中load +// load loads from the checkpoint file func (cp *copyCheckpoint) load(filePath string) error { contents, err := ioutil.ReadFile(filePath) if err != nil { @@ -274,17 +285,17 @@ func (cp *copyCheckpoint) load(filePath string) error { return err } -// 更新分片状态 +// update updates the parts status func (cp *copyCheckpoint) update(part UploadPart) { cp.CopyParts[part.PartNumber-1] = part cp.PartStat[part.PartNumber-1] = true } -// dump到文件 +// dump dumps the CP to the file func (cp *copyCheckpoint) dump(filePath string) error { bcp := *cp - // 计算MD5 + // Calculate MD5 bcp.MD5 = "" js, err := json.Marshal(bcp) if err != nil { @@ -294,17 +305,17 @@ func (cp *copyCheckpoint) dump(filePath string) error { b64 := base64.StdEncoding.EncodeToString(sum[:]) bcp.MD5 = b64 - // 序列化 + // Serialization js, err = json.Marshal(bcp) if err != nil { return err } - // dump + // Dump return ioutil.WriteFile(filePath, js, FilePermMode) } -// 未完成的分片 +// todoParts returns unfinished parts func (cp copyCheckpoint) todoParts() []copyPart { dps := []copyPart{} for i, ps := range cp.PartStat { @@ -315,7 +326,7 @@ func (cp copyCheckpoint) todoParts() []copyPart { return dps } -// 完成的字节数 +// getCompletedBytes returns finished bytes count func (cp copyCheckpoint) getCompletedBytes() int64 { var completedBytes int64 for i, part := range cp.Parts { @@ -326,23 +337,17 @@ func (cp copyCheckpoint) getCompletedBytes() int64 { return completedBytes } -// 初始化下载任务 -func (cp *copyCheckpoint) prepare(srcBucket *Bucket, srcObjectKey string, destBucket *Bucket, destObjectKey string, +// prepare initializes the multipart upload +func (cp *copyCheckpoint) prepare(meta http.Header, srcBucket *Bucket, srcObjectKey string, destBucket *Bucket, destObjectKey string, partSize int64, options []Option) error { - // cp + // CP cp.Magic = copyCpMagic cp.SrcBucketName = srcBucket.BucketName cp.SrcObjectKey = srcObjectKey cp.DestBucketName = destBucket.BucketName cp.DestObjectKey = destObjectKey - // object - meta, err := srcBucket.GetObjectDetailedMeta(srcObjectKey) - if err != nil { - return err - } - - objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 0) + objectSize, err := strconv.ParseInt(meta.Get(HTTPHeaderContentLength), 10, 64) if err != nil { return err } @@ -351,18 +356,15 @@ func (cp *copyCheckpoint) prepare(srcBucket *Bucket, srcObjectKey string, destBu cp.ObjStat.LastModified = meta.Get(HTTPHeaderLastModified) cp.ObjStat.Etag = meta.Get(HTTPHeaderEtag) - // parts - cp.Parts, err = getCopyParts(srcBucket, srcObjectKey, partSize) - if err != nil { - return err - } + // Parts + cp.Parts = getCopyParts(objectSize, partSize) cp.PartStat = make([]bool, len(cp.Parts)) for i := range cp.PartStat { cp.PartStat[i] = false } cp.CopyParts = make([]UploadPart, len(cp.Parts)) - // init copy + // Init copy imur, err := destBucket.InitiateMultipartUpload(destObjectKey, options...) if err != nil { return err @@ -372,10 +374,10 @@ func (cp *copyCheckpoint) prepare(srcBucket *Bucket, srcObjectKey string, destBu return nil } -func (cp *copyCheckpoint) complete(bucket *Bucket, parts []UploadPart, cpFilePath string) error { +func (cp *copyCheckpoint) complete(bucket *Bucket, parts []UploadPart, cpFilePath string, options []Option) error { imur := InitiateMultipartUploadResult{Bucket: cp.DestBucketName, Key: cp.DestObjectKey, UploadID: cp.CopyID} - _, err := bucket.CompleteMultipartUpload(imur, parts) + _, err := bucket.CompleteMultipartUpload(imur, parts, options...) if err != nil { return err } @@ -383,30 +385,40 @@ func (cp *copyCheckpoint) complete(bucket *Bucket, parts []UploadPart, cpFilePat return err } -// 并发带断点的下载 +// copyFileWithCp is concurrently copy with checkpoint func (bucket Bucket) copyFileWithCp(srcBucketName, srcObjectKey, destBucketName, destObjectKey string, partSize int64, options []Option, cpFilePath string, routines int) error { descBucket, err := bucket.Client.Bucket(destBucketName) srcBucket, err := bucket.Client.Bucket(srcBucketName) - listener := getProgressListener(options) + listener := GetProgressListener(options) - // LOAD CP数据 + // Load CP data ccp := copyCheckpoint{} err = ccp.load(cpFilePath) if err != nil { os.Remove(cpFilePath) } - // LOAD出错或数据无效重新初始化下载 - valid, err := ccp.isValid(srcBucket, srcObjectKey) + // choice valid options + headerOptions := ChoiceHeadObjectOption(options) + partOptions := ChoiceTransferPartOption(options) + completeOptions := ChoiceCompletePartOption(options) + + meta, err := srcBucket.GetObjectDetailedMeta(srcObjectKey, headerOptions...) + if err != nil { + return err + } + + // Load error or the CP data is invalid---reinitialize + valid, err := ccp.isValid(meta) if err != nil || !valid { - if err = ccp.prepare(srcBucket, srcObjectKey, descBucket, destObjectKey, partSize, options); err != nil { + if err = ccp.prepare(meta, srcBucket, srcObjectKey, descBucket, destObjectKey, partSize, options); err != nil { return err } os.Remove(cpFilePath) } - // 未完成的分片 + // Unfinished parts parts := ccp.todoParts() imur := InitiateMultipartUploadResult{ Bucket: destBucketName, @@ -419,19 +431,19 @@ func (bucket Bucket) copyFileWithCp(srcBucketName, srcObjectKey, destBucketName, die := make(chan bool) completedBytes := ccp.getCompletedBytes() - event := newProgressEvent(TransferStartedEvent, completedBytes, ccp.ObjStat.Size) + event := newProgressEvent(TransferStartedEvent, completedBytes, ccp.ObjStat.Size, 0) publishProgress(listener, event) - // 启动工作协程 - arg := copyWorkerArg{descBucket, imur, srcBucketName, srcObjectKey, options, copyPartHooker} + // Start the worker coroutines + arg := copyWorkerArg{descBucket, imur, srcBucketName, srcObjectKey, partOptions, copyPartHooker} for w := 1; w <= routines; w++ { go copyWorker(w, arg, jobs, results, failed, die) } - // 并发下载分片 + // Start the scheduler go copyScheduler(jobs, parts) - // 等待分片下载完成 + // Wait for the parts completed. completed := 0 for completed < len(parts) { select { @@ -439,12 +451,13 @@ func (bucket Bucket) copyFileWithCp(srcBucketName, srcObjectKey, destBucketName, completed++ ccp.update(part) ccp.dump(cpFilePath) - completedBytes += (parts[part.PartNumber-1].End - parts[part.PartNumber-1].Start + 1) - event = newProgressEvent(TransferDataEvent, completedBytes, ccp.ObjStat.Size) + copyBytes := (parts[part.PartNumber-1].End - parts[part.PartNumber-1].Start + 1) + completedBytes += copyBytes + event = newProgressEvent(TransferDataEvent, completedBytes, ccp.ObjStat.Size, copyBytes) publishProgress(listener, event) case err := <-failed: close(die) - event = newProgressEvent(TransferFailedEvent, completedBytes, ccp.ObjStat.Size) + event = newProgressEvent(TransferFailedEvent, completedBytes, ccp.ObjStat.Size, 0) publishProgress(listener, event) return err } @@ -454,8 +467,8 @@ func (bucket Bucket) copyFileWithCp(srcBucketName, srcObjectKey, destBucketName, } } - event = newProgressEvent(TransferCompletedEvent, completedBytes, ccp.ObjStat.Size) + event = newProgressEvent(TransferCompletedEvent, completedBytes, ccp.ObjStat.Size, 0) publishProgress(listener, event) - return ccp.complete(descBucket, ccp.CopyParts, cpFilePath) + return ccp.complete(descBucket, ccp.CopyParts, cpFilePath, completeOptions) } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/multipart.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/multipart.go index d06c79160..9e7141971 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/multipart.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/multipart.go @@ -5,26 +5,31 @@ import ( "encoding/xml" "io" "net/http" + "net/url" "os" "sort" "strconv" ) +// InitiateMultipartUpload initializes multipart upload // -// InitiateMultipartUpload 初始化分片上传任务。 +// objectKey object name +// options the object constricts for upload. The valid options are CacheControl, ContentDisposition, ContentEncoding, Expires, +// ServerSideEncryption, Meta, check out the following link: +// https://help.aliyun.com/document_detail/oss/api-reference/multipart-upload/InitiateMultipartUpload.html // -// objectKey Object名称。 -// options 上传时可以指定Object的属性,可选属性有CacheControl、ContentDisposition、ContentEncoding、Expires、 -// ServerSideEncryption、Meta,具体含义请参考 -// https://help.aliyun.com/document_detail/oss/api-reference/multipart-upload/InitiateMultipartUpload.html -// -// InitiateMultipartUploadResult 初始化后操作成功的返回值,用于后面的UploadPartFromFile、UploadPartCopy等操作。error为nil时有效。 -// error 操作成功error为nil,非nil为错误信息。 +// InitiateMultipartUploadResult the return value of the InitiateMultipartUpload, which is used for calls later on such as UploadPartFromFile,UploadPartCopy. +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) InitiateMultipartUpload(objectKey string, options ...Option) (InitiateMultipartUploadResult, error) { var imur InitiateMultipartUploadResult - opts := addContentType(options, objectKey) - resp, err := bucket.do("POST", objectKey, "uploads", "uploads", opts, nil, nil) + opts := AddContentType(options, objectKey) + params, _ := GetRawParams(options) + paramKeys := []string{"sequential", "withHashContext", "x-oss-enable-md5", "x-oss-enable-sha1", "x-oss-enable-sha256"} + ConvertEmptyValueToNil(params, paramKeys) + params["uploads"] = nil + + resp, err := bucket.do("POST", objectKey, params, opts, nil, nil) if err != nil { return imur, err } @@ -34,23 +39,20 @@ func (bucket Bucket) InitiateMultipartUpload(objectKey string, options ...Option return imur, err } +// UploadPart uploads parts // -// UploadPart 上传分片。 +// After initializing a Multipart Upload, the upload Id and object key could be used for uploading the parts. +// Each part has its part number (ranges from 1 to 10,000). And for each upload Id, the part number identifies the position of the part in the whole file. +// And thus with the same part number and upload Id, another part upload will overwrite the data. +// Except the last one, minimal part size is 100KB. There's no limit on the last part size. // -// 初始化一个Multipart Upload之后,可以根据指定的Object名和Upload ID来分片(Part)上传数据。 -// 每一个上传的Part都有一个标识它的号码(part number,范围是1~10000)。对于同一个Upload ID, -// 该号码不但唯一标识这一片数据,也标识了这片数据在整个文件内的相对位置。如果您用同一个part号码,上传了新的数据, -// 那么OSS上已有的这个号码的Part数据将被覆盖。除了最后一片Part以外,其他的part最小为100KB; -// 最后一片Part没有大小限制。 +// imur the returned value of InitiateMultipartUpload. +// reader io.Reader the reader for the part's data. +// size the part size. +// partNumber the part number (ranges from 1 to 10,000). Invalid part number will lead to InvalidArgument error. // -// imur InitiateMultipartUpload成功后的返回值。 -// reader io.Reader 需要分片上传的reader。 -// size 本次上传片Part的大小。 -// partNumber 本次上传片(Part)的编号,范围是1~10000。如果超出范围,OSS将返回InvalidArgument错误。 -// -// UploadPart 上传成功的返回值,两个成员PartNumber、ETag。PartNumber片编号,即传入参数partNumber; -// ETag及上传数据的MD5。error为nil时有效。 -// error 操作成功error为nil,非nil为错误信息。 +// UploadPart the return value of the upload part. It consists of PartNumber and ETag. It's valid when error is nil. +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) UploadPart(imur InitiateMultipartUploadResult, reader io.Reader, partSize int64, partNumber int, options ...Option) (UploadPart, error) { @@ -66,18 +68,16 @@ func (bucket Bucket) UploadPart(imur InitiateMultipartUploadResult, reader io.Re return result.Part, err } +// UploadPartFromFile uploads part from the file. // -// UploadPartFromFile 上传分片。 +// imur the return value of a successful InitiateMultipartUpload. +// filePath the local file path to upload. +// startPosition the start position in the local file. +// partSize the part size. +// partNumber the part number (from 1 to 10,000) // -// imur InitiateMultipartUpload成功后的返回值。 -// filePath 需要分片上传的本地文件。 -// startPosition 本次上传文件片的起始位置。 -// partSize 本次上传文件片的大小。 -// partNumber 本次上传文件片的编号,范围是1~10000。 -// -// UploadPart 上传成功的返回值,两个成员PartNumber、ETag。PartNumber片编号,传入参数partNumber; -// ETag上传数据的MD5。error为nil时有效。 -// error 操作成功error为nil,非nil为错误信息。 +// UploadPart the return value consists of PartNumber and ETag. +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) UploadPartFromFile(imur InitiateMultipartUploadResult, filePath string, startPosition, partSize int64, partNumber int, options ...Option) (UploadPart, error) { @@ -101,19 +101,20 @@ func (bucket Bucket) UploadPartFromFile(imur InitiateMultipartUploadResult, file return result.Part, err } +// DoUploadPart does the actual part upload. // -// DoUploadPart 上传分片。 +// request part upload request // -// request 上传分片请求。 -// -// UploadPartResult 上传分片请求返回值。 -// error 操作无错误为nil,非nil为错误信息。 +// UploadPartResult the result of uploading part. +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) DoUploadPart(request *UploadPartRequest, options []Option) (*UploadPartResult, error) { - listener := getProgressListener(options) - params := "partNumber=" + strconv.Itoa(request.PartNumber) + "&uploadId=" + request.InitResult.UploadID - opts := []Option{ContentLength(request.PartSize)} - resp, err := bucket.do("PUT", request.InitResult.Key, params, params, opts, + listener := GetProgressListener(options) + options = append(options, ContentLength(request.PartSize)) + params := map[string]interface{}{} + params["partNumber"] = strconv.Itoa(request.PartNumber) + params["uploadId"] = request.InitResult.UploadID + resp, err := bucket.do("PUT", request.InitResult.Key, params, options, &io.LimitedReader{R: request.Reader, N: request.PartSize}, listener) if err != nil { return &UploadPartResult{}, err @@ -125,8 +126,8 @@ func (bucket Bucket) DoUploadPart(request *UploadPartRequest, options []Option) PartNumber: request.PartNumber, } - if bucket.getConfig().IsEnableCRC { - err = checkCRC(resp, "DoUploadPart") + if bucket.GetConfig().IsEnableCRC { + err = CheckCRC(resp, "DoUploadPart") if err != nil { return &UploadPartResult{part}, err } @@ -135,32 +136,44 @@ func (bucket Bucket) DoUploadPart(request *UploadPartRequest, options []Option) return &UploadPartResult{part}, nil } +// UploadPartCopy uploads part copy // -// UploadPartCopy 拷贝分片。 +// imur the return value of InitiateMultipartUpload +// copySrc source Object name +// startPosition the part's start index in the source file +// partSize the part size +// partNumber the part number, ranges from 1 to 10,000. If it exceeds the range OSS returns InvalidArgument error. +// options the constraints of source object for the copy. The copy happens only when these contraints are met. Otherwise it returns error. +// CopySourceIfNoneMatch, CopySourceIfModifiedSince CopySourceIfUnmodifiedSince, check out the following link for the detail +// https://help.aliyun.com/document_detail/oss/api-reference/multipart-upload/UploadPartCopy.html // -// imur InitiateMultipartUpload成功后的返回值。 -// copySrc 源Object名称。 -// startPosition 本次拷贝片(Part)在源Object的起始位置。 -// partSize 本次拷贝片的大小。 -// partNumber 本次拷贝片的编号,范围是1~10000。如果超出范围,OSS将返回InvalidArgument错误。 -// options copy时源Object的限制条件,满足限制条件时copy,不满足时返回错误。可选条件有CopySourceIfMatch、 -// CopySourceIfNoneMatch、CopySourceIfModifiedSince CopySourceIfUnmodifiedSince,具体含义请参看 -// https://help.aliyun.com/document_detail/oss/api-reference/multipart-upload/UploadPartCopy.html -// -// UploadPart 上传成功的返回值,两个成员PartNumber、ETag。PartNumber片(Part)编号,即传入参数partNumber; -// ETag及上传数据的MD5。error为nil时有效。 -// error 操作成功error为nil,非nil为错误信息。 +// UploadPart the return value consists of PartNumber and ETag. +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) UploadPartCopy(imur InitiateMultipartUploadResult, srcBucketName, srcObjectKey string, startPosition, partSize int64, partNumber int, options ...Option) (UploadPart, error) { var out UploadPartCopyResult var part UploadPart + var opts []Option + + //first find version id + versionIdKey := "versionId" + versionId, _ := FindOption(options, versionIdKey, nil) + if versionId == nil { + opts = []Option{CopySource(srcBucketName, url.QueryEscape(srcObjectKey)), + CopySourceRange(startPosition, partSize)} + } else { + opts = []Option{CopySourceVersion(srcBucketName, url.QueryEscape(srcObjectKey), versionId.(string)), + CopySourceRange(startPosition, partSize)} + options = DeleteOption(options, versionIdKey) + } - opts := []Option{CopySource(srcBucketName, srcObjectKey), - CopySourceRange(startPosition, partSize)} opts = append(opts, options...) - params := "partNumber=" + strconv.Itoa(partNumber) + "&uploadId=" + imur.UploadID - resp, err := bucket.do("PUT", imur.Key, params, params, opts, nil, nil) + + params := map[string]interface{}{} + params["partNumber"] = strconv.Itoa(partNumber) + params["uploadId"] = imur.UploadID + resp, err := bucket.do("PUT", imur.Key, params, opts, nil, nil) if err != nil { return part, err } @@ -176,20 +189,19 @@ func (bucket Bucket) UploadPartCopy(imur InitiateMultipartUploadResult, srcBucke return part, nil } +// CompleteMultipartUpload completes the multipart upload. // -// CompleteMultipartUpload 提交分片上传任务。 +// imur the return value of InitiateMultipartUpload. +// parts the array of return value of UploadPart/UploadPartFromFile/UploadPartCopy. // -// imur InitiateMultipartUpload的返回值。 -// parts UploadPart/UploadPartFromFile/UploadPartCopy返回值组成的数组。 -// -// CompleteMultipartUploadResponse 操作成功后的返回值。error为nil时有效。 -// error 操作成功error为nil,非nil为错误信息。 +// CompleteMultipartUploadResponse the return value when the call succeeds. Only valid when the error is nil. +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) CompleteMultipartUpload(imur InitiateMultipartUploadResult, - parts []UploadPart) (CompleteMultipartUploadResult, error) { + parts []UploadPart, options ...Option) (CompleteMultipartUploadResult, error) { var out CompleteMultipartUploadResult - sort.Sort(uploadParts(parts)) + sort.Sort(UploadParts(parts)) cxml := completeMultipartUploadXML{} cxml.Part = parts bs, err := xml.Marshal(cxml) @@ -199,8 +211,9 @@ func (bucket Bucket) CompleteMultipartUpload(imur InitiateMultipartUploadResult, buffer := new(bytes.Buffer) buffer.Write(bs) - params := "uploadId=" + imur.UploadID - resp, err := bucket.do("POST", imur.Key, params, params, nil, buffer, nil) + params := map[string]interface{}{} + params["uploadId"] = imur.UploadID + resp, err := bucket.do("POST", imur.Key, params, options, buffer, nil) if err != nil { return out, err } @@ -210,63 +223,74 @@ func (bucket Bucket) CompleteMultipartUpload(imur InitiateMultipartUploadResult, return out, err } +// AbortMultipartUpload aborts the multipart upload. // -// AbortMultipartUpload 取消分片上传任务。 +// imur the return value of InitiateMultipartUpload. // -// imur InitiateMultipartUpload的返回值。 +// error it's nil if the operation succeeds, otherwise it's an error object. // -// error 操作成功error为nil,非nil为错误信息。 -// -func (bucket Bucket) AbortMultipartUpload(imur InitiateMultipartUploadResult) error { - params := "uploadId=" + imur.UploadID - resp, err := bucket.do("DELETE", imur.Key, params, params, nil, nil, nil) +func (bucket Bucket) AbortMultipartUpload(imur InitiateMultipartUploadResult, options ...Option) error { + params := map[string]interface{}{} + params["uploadId"] = imur.UploadID + resp, err := bucket.do("DELETE", imur.Key, params, options, nil, nil) if err != nil { return err } defer resp.Body.Close() - return checkRespCode(resp.StatusCode, []int{http.StatusNoContent}) + return CheckRespCode(resp.StatusCode, []int{http.StatusNoContent}) } +// ListUploadedParts lists the uploaded parts. // -// ListUploadedParts 列出指定上传任务已经上传的分片。 +// imur the return value of InitiateMultipartUpload. // -// imur InitiateMultipartUpload的返回值。 +// ListUploadedPartsResponse the return value if it succeeds, only valid when error is nil. +// error it's nil if the operation succeeds, otherwise it's an error object. // -// ListUploadedPartsResponse 操作成功后的返回值,成员UploadedParts已经上传/拷贝的片。error为nil时该返回值有效。 -// error 操作成功error为nil,非nil为错误信息。 -// -func (bucket Bucket) ListUploadedParts(imur InitiateMultipartUploadResult) (ListUploadedPartsResult, error) { +func (bucket Bucket) ListUploadedParts(imur InitiateMultipartUploadResult, options ...Option) (ListUploadedPartsResult, error) { var out ListUploadedPartsResult - params := "uploadId=" + imur.UploadID - resp, err := bucket.do("GET", imur.Key, params, params, nil, nil, nil) + options = append(options, EncodingType("url")) + + params := map[string]interface{}{} + params, err := GetRawParams(options) + if err != nil { + return out, err + } + + params["uploadId"] = imur.UploadID + resp, err := bucket.do("GET", imur.Key, params, options, nil, nil) if err != nil { return out, err } defer resp.Body.Close() err = xmlUnmarshal(resp.Body, &out) + if err != nil { + return out, err + } + err = decodeListUploadedPartsResult(&out) return out, err } +// ListMultipartUploads lists all ongoing multipart upload tasks // -// ListMultipartUploads 列出所有未上传完整的multipart任务列表。 +// options listObject's filter. Prefix specifies the returned object's prefix; KeyMarker specifies the returned object's start point in lexicographic order; +// MaxKeys specifies the max entries to return; Delimiter is the character for grouping object keys. // -// options ListObject的筛选行为。Prefix返回object的前缀,KeyMarker返回object的起始位置,MaxUploads最大数目默认1000, -// Delimiter用于对Object名字进行分组的字符,所有名字包含指定的前缀且第一次出现delimiter字符之间的object。 -// -// ListMultipartUploadResponse 操作成功后的返回值,error为nil时该返回值有效。 -// error 操作成功error为nil,非nil为错误信息。 +// ListMultipartUploadResponse the return value if it succeeds, only valid when error is nil. +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) ListMultipartUploads(options ...Option) (ListMultipartUploadResult, error) { var out ListMultipartUploadResult options = append(options, EncodingType("url")) - params, err := handleParams(options) + params, err := GetRawParams(options) if err != nil { return out, err } + params["uploads"] = nil - resp, err := bucket.do("GET", "", "uploads&"+params, "uploads", nil, nil, nil) + resp, err := bucket.do("GET", "", params, options, nil, nil) if err != nil { return out, err } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/option.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/option.go index 8ad932a87..a8d5dc39d 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/option.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/option.go @@ -1,21 +1,20 @@ package oss import ( - "bytes" "fmt" "net/http" "net/url" - "sort" "strconv" + "strings" "time" ) type optionType string const ( - optionParam optionType = "HTTPParameter" // URL参数 - optionHTTP optionType = "HTTPHeader" // HTTP头 - optionArg optionType = "FuncArgument" // 函数参数 + optionParam optionType = "HTTPParameter" // URL parameter + optionHTTP optionType = "HTTPHeader" // HTTP header + optionArg optionType = "FuncArgument" // Function argument ) const ( @@ -24,6 +23,10 @@ const ( checkpointConfig = "x-cp-config" initCRC64 = "init-crc64" progressListener = "x-progress-listener" + storageClass = "storage-class" + responseHeader = "x-response-header" + redundancyType = "redundancy-type" + objectHashFunc = "object-hash-func" ) type ( @@ -32,7 +35,7 @@ type ( Type optionType } - // Option http option + // Option HTTP option Option func(map[string]optionValue) error ) @@ -66,6 +69,11 @@ func ContentEncoding(value string) Option { return setHeader(HTTPHeaderContentEncoding, value) } +// ContentLanguage is an option to set Content-Language header +func ContentLanguage(value string) Option { + return setHeader(HTTPHeaderContentLanguage, value) +} + // ContentMD5 is an option to set Content-MD5 header func ContentMD5(value string) Option { return setHeader(HTTPHeaderContentMD5, value) @@ -86,6 +94,11 @@ func Range(start, end int64) Option { return setHeader(HTTPHeaderRange, fmt.Sprintf("bytes=%d-%d", start, end)) } +// NormalizedRange is an option to set Range header, such as 1024-2048 or 1024- or -2048 +func NormalizedRange(nr string) Option { + return setHeader(HTTPHeaderRange, fmt.Sprintf("bytes=%s", strings.TrimSpace(nr))) +} + // AcceptEncoding is an option to set Accept-Encoding header func AcceptEncoding(value string) Option { return setHeader(HTTPHeaderAcceptEncoding, value) @@ -116,6 +129,11 @@ func CopySource(sourceBucket, sourceObject string) Option { return setHeader(HTTPHeaderOssCopySource, "/"+sourceBucket+"/"+sourceObject) } +// CopySourceVersion is an option to set X-Oss-Copy-Source header,include versionId +func CopySourceVersion(sourceBucket, sourceObject string, versionId string) Option { + return setHeader(HTTPHeaderOssCopySource, "/"+sourceBucket+"/"+sourceObject+"?"+"versionId="+versionId) +} + // CopySourceRange is an option to set X-Oss-Copy-Source header func CopySourceRange(startPosition, partSize int64) Option { val := "bytes=" + strconv.FormatInt(startPosition, 10) + "-" + @@ -153,16 +171,142 @@ func ServerSideEncryption(value string) Option { return setHeader(HTTPHeaderOssServerSideEncryption, value) } +// ServerSideEncryptionKeyID is an option to set X-Oss-Server-Side-Encryption-Key-Id header +func ServerSideEncryptionKeyID(value string) Option { + return setHeader(HTTPHeaderOssServerSideEncryptionKeyID, value) +} + +// ServerSideDataEncryption is an option to set X-Oss-Server-Side-Data-Encryption header +func ServerSideDataEncryption(value string) Option { + return setHeader(HTTPHeaderOssServerSideDataEncryption, value) +} + +// SSECAlgorithm is an option to set X-Oss-Server-Side-Encryption-Customer-Algorithm header +func SSECAlgorithm(value string) Option { + return setHeader(HTTPHeaderSSECAlgorithm, value) +} + +// SSECKey is an option to set X-Oss-Server-Side-Encryption-Customer-Key header +func SSECKey(value string) Option { + return setHeader(HTTPHeaderSSECKey, value) +} + +// SSECKeyMd5 is an option to set X-Oss-Server-Side-Encryption-Customer-Key-Md5 header +func SSECKeyMd5(value string) Option { + return setHeader(HTTPHeaderSSECKeyMd5, value) +} + // ObjectACL is an option to set X-Oss-Object-Acl header func ObjectACL(acl ACLType) Option { return setHeader(HTTPHeaderOssObjectACL, string(acl)) } +// symlinkTarget is an option to set X-Oss-Symlink-Target +func symlinkTarget(targetObjectKey string) Option { + return setHeader(HTTPHeaderOssSymlinkTarget, targetObjectKey) +} + // Origin is an option to set Origin header func Origin(value string) Option { return setHeader(HTTPHeaderOrigin, value) } +// ObjectStorageClass is an option to set the storage class of object +func ObjectStorageClass(storageClass StorageClassType) Option { + return setHeader(HTTPHeaderOssStorageClass, string(storageClass)) +} + +// Callback is an option to set callback values +func Callback(callback string) Option { + return setHeader(HTTPHeaderOssCallback, callback) +} + +// CallbackVar is an option to set callback user defined values +func CallbackVar(callbackVar string) Option { + return setHeader(HTTPHeaderOssCallbackVar, callbackVar) +} + +// RequestPayer is an option to set payer who pay for the request +func RequestPayer(payerType PayerType) Option { + return setHeader(HTTPHeaderOssRequester, strings.ToLower(string(payerType))) +} + +// RequestPayerParam is an option to set payer who pay for the request +func RequestPayerParam(payerType PayerType) Option { + return addParam(strings.ToLower(HTTPHeaderOssRequester), strings.ToLower(string(payerType))) +} + +// SetTagging is an option to set object tagging +func SetTagging(tagging Tagging) Option { + if len(tagging.Tags) == 0 { + return nil + } + + taggingValue := "" + for index, tag := range tagging.Tags { + if index != 0 { + taggingValue += "&" + } + taggingValue += url.QueryEscape(tag.Key) + "=" + url.QueryEscape(tag.Value) + } + return setHeader(HTTPHeaderOssTagging, taggingValue) +} + +// TaggingDirective is an option to set X-Oss-Metadata-Directive header +func TaggingDirective(directive TaggingDirectiveType) Option { + return setHeader(HTTPHeaderOssTaggingDirective, string(directive)) +} + +// ACReqMethod is an option to set Access-Control-Request-Method header +func ACReqMethod(value string) Option { + return setHeader(HTTPHeaderACReqMethod, value) +} + +// ACReqHeaders is an option to set Access-Control-Request-Headers header +func ACReqHeaders(value string) Option { + return setHeader(HTTPHeaderACReqHeaders, value) +} + +// TrafficLimitHeader is an option to set X-Oss-Traffic-Limit +func TrafficLimitHeader(value int64) Option { + return setHeader(HTTPHeaderOssTrafficLimit, strconv.FormatInt(value, 10)) +} + +// UserAgentHeader is an option to set HTTPHeaderUserAgent +func UserAgentHeader(ua string) Option { + return setHeader(HTTPHeaderUserAgent, ua) +} + +// ForbidOverWrite is an option to set X-Oss-Forbid-Overwrite +func ForbidOverWrite(forbidWrite bool) Option { + if forbidWrite { + return setHeader(HTTPHeaderOssForbidOverWrite, "true") + } else { + return setHeader(HTTPHeaderOssForbidOverWrite, "false") + } +} + +// RangeBehavior is an option to set Range value, such as "standard" +func RangeBehavior(value string) Option { + return setHeader(HTTPHeaderOssRangeBehavior, value) +} + +func PartHashCtxHeader(value string) Option { + return setHeader(HTTPHeaderOssHashCtx, value) +} + +func PartMd5CtxHeader(value string) Option { + return setHeader(HTTPHeaderOssMd5Ctx, value) +} + +func PartHashCtxParam(value string) Option { + return addParam("x-oss-hash-ctx", value) +} + +func PartMd5CtxParam(value string) Option { + return addParam("x-oss-md5-ctx", value) +} + // Delimiter is an option to set delimiler parameter func Delimiter(value string) Option { return addParam("delimiter", value) @@ -198,33 +342,135 @@ func KeyMarker(value string) Option { return addParam("key-marker", value) } +// VersionIdMarker is an option to set version-id-marker parameter +func VersionIdMarker(value string) Option { + return addParam("version-id-marker", value) +} + +// VersionId is an option to set versionId parameter +func VersionId(value string) Option { + return addParam("versionId", value) +} + +// TagKey is an option to set tag key parameter +func TagKey(value string) Option { + return addParam("tag-key", value) +} + +// TagValue is an option to set tag value parameter +func TagValue(value string) Option { + return addParam("tag-value", value) +} + // UploadIDMarker is an option to set upload-id-marker parameter func UploadIDMarker(value string) Option { return addParam("upload-id-marker", value) } -// DeleteObjectsQuiet DeleteObjects详细(verbose)模式或简单(quiet)模式,默认详细模式。 +// MaxParts is an option to set max-parts parameter +func MaxParts(value int) Option { + return addParam("max-parts", strconv.Itoa(value)) +} + +// PartNumberMarker is an option to set part-number-marker parameter +func PartNumberMarker(value int) Option { + return addParam("part-number-marker", strconv.Itoa(value)) +} + +// Sequential is an option to set sequential parameter for InitiateMultipartUpload +func Sequential() Option { + return addParam("sequential", "") +} + +// WithHashContext is an option to set withHashContext parameter for InitiateMultipartUpload +func WithHashContext() Option { + return addParam("withHashContext", "") +} + +// EnableMd5 is an option to set x-oss-enable-md5 parameter for InitiateMultipartUpload +func EnableMd5() Option { + return addParam("x-oss-enable-md5", "") +} + +// EnableSha1 is an option to set x-oss-enable-sha1 parameter for InitiateMultipartUpload +func EnableSha1() Option { + return addParam("x-oss-enable-sha1", "") +} + +// EnableSha256 is an option to set x-oss-enable-sha256 parameter for InitiateMultipartUpload +func EnableSha256() Option { + return addParam("x-oss-enable-sha256", "") +} + +// ListType is an option to set List-type parameter for ListObjectsV2 +func ListType(value int) Option { + return addParam("list-type", strconv.Itoa(value)) +} + +// StartAfter is an option to set start-after parameter for ListObjectsV2 +func StartAfter(value string) Option { + return addParam("start-after", value) +} + +// ContinuationToken is an option to set Continuation-token parameter for ListObjectsV2 +func ContinuationToken(value string) Option { + if value == "" { + return addParam("continuation-token", nil) + } + return addParam("continuation-token", value) +} + +// FetchOwner is an option to set Fetch-owner parameter for ListObjectsV2 +func FetchOwner(value bool) Option { + if value { + return addParam("fetch-owner", "true") + } + return addParam("fetch-owner", "false") +} + +// DeleteObjectsQuiet false:DeleteObjects in verbose mode; true:DeleteObjects in quite mode. Default is false. func DeleteObjectsQuiet(isQuiet bool) Option { return addArg(deleteObjectsQuiet, isQuiet) } -// 断点续传配置,包括是否启用、cp文件 +// StorageClass bucket storage class +func StorageClass(value StorageClassType) Option { + return addArg(storageClass, value) +} + +// RedundancyType bucket data redundancy type +func RedundancyType(value DataRedundancyType) Option { + return addArg(redundancyType, value) +} + +// RedundancyType bucket data redundancy type +func ObjectHashFunc(value ObjecthashFuncType) Option { + return addArg(objectHashFunc, value) +} + +// Checkpoint configuration type cpConfig struct { IsEnable bool FilePath string + DirPath string } -// Checkpoint DownloadFile/UploadFile是否开启checkpoint及checkpoint文件路径 +// Checkpoint sets the isEnable flag and checkpoint file path for DownloadFile/UploadFile. func Checkpoint(isEnable bool, filePath string) Option { - return addArg(checkpointConfig, &cpConfig{isEnable, filePath}) + return addArg(checkpointConfig, &cpConfig{IsEnable: isEnable, FilePath: filePath}) } -// Routines DownloadFile/UploadFile并发数 +// CheckpointDir sets the isEnable flag and checkpoint dir path for DownloadFile/UploadFile. +func CheckpointDir(isEnable bool, dirPath string) Option { + return addArg(checkpointConfig, &cpConfig{IsEnable: isEnable, DirPath: dirPath}) +} + +// Routines DownloadFile/UploadFile routine count func Routines(n int) Option { return addArg(routineNum, n) } -// InitCRC AppendObject CRC的校验的初始值 +// InitCRC Init AppendObject CRC func InitCRC(initCRC uint64) Option { return addArg(initCRC64, initCRC) } @@ -234,6 +480,61 @@ func Progress(listener ProgressListener) Option { return addArg(progressListener, listener) } +// GetResponseHeader for get response http header +func GetResponseHeader(respHeader *http.Header) Option { + return addArg(responseHeader, respHeader) +} + +// ResponseContentType is an option to set response-content-type param +func ResponseContentType(value string) Option { + return addParam("response-content-type", value) +} + +// ResponseContentLanguage is an option to set response-content-language param +func ResponseContentLanguage(value string) Option { + return addParam("response-content-language", value) +} + +// ResponseExpires is an option to set response-expires param +func ResponseExpires(value string) Option { + return addParam("response-expires", value) +} + +// ResponseCacheControl is an option to set response-cache-control param +func ResponseCacheControl(value string) Option { + return addParam("response-cache-control", value) +} + +// ResponseContentDisposition is an option to set response-content-disposition param +func ResponseContentDisposition(value string) Option { + return addParam("response-content-disposition", value) +} + +// ResponseContentEncoding is an option to set response-content-encoding param +func ResponseContentEncoding(value string) Option { + return addParam("response-content-encoding", value) +} + +// Process is an option to set x-oss-process param +func Process(value string) Option { + return addParam("x-oss-process", value) +} + +// TrafficLimitParam is a option to set x-oss-traffic-limit +func TrafficLimitParam(value int64) Option { + return addParam("x-oss-traffic-limit", strconv.FormatInt(value, 10)) +} + +// SetHeader Allow users to set personalized http headers +func SetHeader(key string, value interface{}) Option { + return setHeader(key, value) +} + +// AddParam Allow users to set personalized http params +func AddParam(key string, value interface{}) Option { + return addParam(key, value) +} + func setHeader(key string, value interface{}) Option { return func(params map[string]optionValue) error { if value == nil { @@ -282,43 +583,30 @@ func handleOptions(headers map[string]string, options []Option) error { return nil } -func handleParams(options []Option) (string, error) { - // option +func GetRawParams(options []Option) (map[string]interface{}, error) { + // Option params := map[string]optionValue{} for _, option := range options { if option != nil { if err := option(params); err != nil { - return "", err + return nil, err } } } - // sort - var buf bytes.Buffer - keys := make([]string, 0, len(params)) + paramsm := map[string]interface{}{} + // Serialize for k, v := range params { if v.Type == optionParam { - keys = append(keys, k) + vs := params[k] + paramsm[k] = vs.Value.(string) } } - sort.Strings(keys) - // serialize - for _, k := range keys { - vs := params[k] - prefix := url.QueryEscape(k) + "=" - - if buf.Len() > 0 { - buf.WriteByte('&') - } - buf.WriteString(prefix) - buf.WriteString(url.QueryEscape(vs.Value.(string))) - } - - return buf.String(), nil + return paramsm, nil } -func findOption(options []Option, param string, defaultVal interface{}) (interface{}, error) { +func FindOption(options []Option, param string, defaultVal interface{}) (interface{}, error) { params := map[string]optionValue{} for _, option := range options { if option != nil { @@ -334,7 +622,7 @@ func findOption(options []Option, param string, defaultVal interface{}) (interfa return defaultVal, nil } -func isOptionSet(options []Option, option string) (bool, interface{}, error) { +func IsOptionSet(options []Option, option string) (bool, interface{}, error) { params := map[string]optionValue{} for _, option := range options { if option != nil { @@ -349,3 +637,44 @@ func isOptionSet(options []Option, option string) (bool, interface{}, error) { } return false, nil, nil } + +func DeleteOption(options []Option, strKey string) []Option { + var outOption []Option + params := map[string]optionValue{} + for _, option := range options { + if option != nil { + option(params) + _, exist := params[strKey] + if !exist { + outOption = append(outOption, option) + } else { + delete(params, strKey) + } + } + } + return outOption +} + +func GetRequestId(header http.Header) string { + return header.Get("x-oss-request-id") +} + +func GetVersionId(header http.Header) string { + return header.Get("x-oss-version-id") +} + +func GetCopySrcVersionId(header http.Header) string { + return header.Get("x-oss-copy-source-version-id") +} + +func GetDeleteMark(header http.Header) bool { + value := header.Get("x-oss-delete-marker") + if strings.ToUpper(value) == "TRUE" { + return true + } + return false +} + +func GetQosDelayTime(header http.Header) string { + return header.Get("x-oss-qos-delay-time") +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/progress.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/progress.go index 0ea897f03..9f3aa9f61 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/progress.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/progress.go @@ -1,8 +1,10 @@ package oss -import "io" +import ( + "io" +) -// ProgressEventType transfer progress event type +// ProgressEventType defines transfer progress event type type ProgressEventType int const ( @@ -16,24 +18,26 @@ const ( TransferFailedEvent ) -// ProgressEvent progress event +// ProgressEvent defines progress event type ProgressEvent struct { ConsumedBytes int64 TotalBytes int64 + RwBytes int64 EventType ProgressEventType } -// ProgressListener listen progress change +// ProgressListener listens progress change type ProgressListener interface { ProgressChanged(event *ProgressEvent) } -// -------------------- private -------------------- +// -------------------- Private -------------------- -func newProgressEvent(eventType ProgressEventType, consumed, total int64) *ProgressEvent { +func newProgressEvent(eventType ProgressEventType, consumed, total int64, rwBytes int64) *ProgressEvent { return &ProgressEvent{ ConsumedBytes: consumed, TotalBytes: total, + RwBytes: rwBytes, EventType: eventType} } @@ -62,7 +66,7 @@ type teeReader struct { // corresponding writes to w. There is no internal buffering - // the write must complete before the read completes. // Any error encountered while writing is reported as a read error. -func TeeReader(reader io.Reader, writer io.Writer, totalBytes int64, listener ProgressListener, tracker *readerTracker) io.Reader { +func TeeReader(reader io.Reader, writer io.Writer, totalBytes int64, listener ProgressListener, tracker *readerTracker) io.ReadCloser { return &teeReader{ reader: reader, writer: writer, @@ -76,26 +80,26 @@ func TeeReader(reader io.Reader, writer io.Writer, totalBytes int64, listener Pr func (t *teeReader) Read(p []byte) (n int, err error) { n, err = t.reader.Read(p) - // read encountered error + // Read encountered error if err != nil && err != io.EOF { - event := newProgressEvent(TransferFailedEvent, t.consumedBytes, t.totalBytes) + event := newProgressEvent(TransferFailedEvent, t.consumedBytes, t.totalBytes, 0) publishProgress(t.listener, event) } if n > 0 { t.consumedBytes += int64(n) - // crc + // CRC if t.writer != nil { if n, err := t.writer.Write(p[:n]); err != nil { return n, err } } - // progress + // Progress if t.listener != nil { - event := newProgressEvent(TransferDataEvent, t.consumedBytes, t.totalBytes) + event := newProgressEvent(TransferDataEvent, t.consumedBytes, t.totalBytes, int64(n)) publishProgress(t.listener, event) } - // track + // Track if t.tracker != nil { t.tracker.completedBytes = t.consumedBytes } @@ -103,3 +107,10 @@ func (t *teeReader) Read(p []byte) (n int, err error) { return } + +func (t *teeReader) Close() error { + if rc, ok := t.reader.(io.ReadCloser); ok { + return rc.Close() + } + return nil +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/redirect_1_6.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/redirect_1_6.go new file mode 100644 index 000000000..d09bc5ebd --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/redirect_1_6.go @@ -0,0 +1,11 @@ +// +build !go1.7 + +package oss + +import "net/http" + +// http.ErrUseLastResponse only is defined go1.7 onward + +func disableHTTPRedirect(client *http.Client) { + +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/redirect_1_7.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/redirect_1_7.go new file mode 100644 index 000000000..5b0bb8674 --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/redirect_1_7.go @@ -0,0 +1,12 @@ +// +build go1.7 + +package oss + +import "net/http" + +// http.ErrUseLastResponse only is defined go1.7 onward +func disableHTTPRedirect(client *http.Client) { + client.CheckRedirect = func(req *http.Request, via []*http.Request) error { + return http.ErrUseLastResponse + } +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/select_object.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/select_object.go new file mode 100644 index 000000000..2e0da4637 --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/select_object.go @@ -0,0 +1,197 @@ +package oss + +import ( + "bytes" + "encoding/xml" + "hash/crc32" + "io" + "io/ioutil" + "net/http" + "os" + "strings" +) + +// CreateSelectCsvObjectMeta is Creating csv object meta +// +// key the object key. +// csvMeta the csv file meta +// options the options for create csv Meta of the object. +// +// MetaEndFrameCSV the csv file meta info +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) CreateSelectCsvObjectMeta(key string, csvMeta CsvMetaRequest, options ...Option) (MetaEndFrameCSV, error) { + var endFrame MetaEndFrameCSV + params := map[string]interface{}{} + params["x-oss-process"] = "csv/meta" + + csvMeta.encodeBase64() + bs, err := xml.Marshal(csvMeta) + if err != nil { + return endFrame, err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + + resp, err := bucket.DoPostSelectObject(key, params, buffer, options...) + if err != nil { + return endFrame, err + } + defer resp.Body.Close() + + _, err = ioutil.ReadAll(resp) + + return resp.Frame.MetaEndFrameCSV, err +} + +// CreateSelectJsonObjectMeta is Creating json object meta +// +// key the object key. +// csvMeta the json file meta +// options the options for create json Meta of the object. +// +// MetaEndFrameJSON the json file meta info +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) CreateSelectJsonObjectMeta(key string, jsonMeta JsonMetaRequest, options ...Option) (MetaEndFrameJSON, error) { + var endFrame MetaEndFrameJSON + params := map[string]interface{}{} + params["x-oss-process"] = "json/meta" + + bs, err := xml.Marshal(jsonMeta) + if err != nil { + return endFrame, err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + + resp, err := bucket.DoPostSelectObject(key, params, buffer, options...) + if err != nil { + return endFrame, err + } + defer resp.Body.Close() + + _, err = ioutil.ReadAll(resp) + + return resp.Frame.MetaEndFrameJSON, err +} + +// SelectObject is the select object api, approve csv and json file. +// +// key the object key. +// selectReq the request data for select object +// options the options for select file of the object. +// +// o.ReadCloser reader instance for reading data from response. It must be called close() after the usage and only valid when error is nil. +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) SelectObject(key string, selectReq SelectRequest, options ...Option) (io.ReadCloser, error) { + params := map[string]interface{}{} + if selectReq.InputSerializationSelect.JsonBodyInput.JsonIsEmpty() { + params["x-oss-process"] = "csv/select" // default select csv file + } else { + params["x-oss-process"] = "json/select" + } + selectReq.encodeBase64() + bs, err := xml.Marshal(selectReq) + if err != nil { + return nil, err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + resp, err := bucket.DoPostSelectObject(key, params, buffer, options...) + if err != nil { + return nil, err + } + if selectReq.OutputSerializationSelect.EnablePayloadCrc != nil && *selectReq.OutputSerializationSelect.EnablePayloadCrc == true { + resp.Frame.EnablePayloadCrc = true + } + resp.Frame.OutputRawData = strings.ToUpper(resp.Headers.Get("x-oss-select-output-raw")) == "TRUE" + + return resp, err +} + +// DoPostSelectObject is the SelectObject/CreateMeta api, approve csv and json file. +// +// key the object key. +// params the resource of oss approve csv/meta, json/meta, csv/select, json/select. +// buf the request data trans to buffer. +// options the options for select file of the object. +// +// SelectObjectResponse the response of select object. +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) DoPostSelectObject(key string, params map[string]interface{}, buf *bytes.Buffer, options ...Option) (*SelectObjectResponse, error) { + resp, err := bucket.do("POST", key, params, options, buf, nil) + if err != nil { + return nil, err + } + + result := &SelectObjectResponse{ + Body: resp.Body, + StatusCode: resp.StatusCode, + Frame: SelectObjectResult{}, + } + result.Headers = resp.Headers + // result.Frame = SelectObjectResult{} + result.ReadTimeOut = bucket.GetConfig().Timeout + + // Progress + listener := GetProgressListener(options) + + // CRC32 + crcCalc := crc32.NewIEEE() + result.WriterForCheckCrc32 = crcCalc + result.Body = TeeReader(resp.Body, nil, 0, listener, nil) + + err = CheckRespCode(resp.StatusCode, []int{http.StatusPartialContent, http.StatusOK}) + + return result, err +} + +// SelectObjectIntoFile is the selectObject to file api +// +// key the object key. +// fileName saving file's name to localstation. +// selectReq the request data for select object +// options the options for select file of the object. +// +// error it's nil if no error, otherwise it's an error object. +// +func (bucket Bucket) SelectObjectIntoFile(key, fileName string, selectReq SelectRequest, options ...Option) error { + tempFilePath := fileName + TempFileSuffix + + params := map[string]interface{}{} + if selectReq.InputSerializationSelect.JsonBodyInput.JsonIsEmpty() { + params["x-oss-process"] = "csv/select" // default select csv file + } else { + params["x-oss-process"] = "json/select" + } + selectReq.encodeBase64() + bs, err := xml.Marshal(selectReq) + if err != nil { + return err + } + buffer := new(bytes.Buffer) + buffer.Write(bs) + resp, err := bucket.DoPostSelectObject(key, params, buffer, options...) + if err != nil { + return err + } + defer resp.Close() + + // If the local file does not exist, create a new one. If it exists, overwrite it. + fd, err := os.OpenFile(tempFilePath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, FilePermMode) + if err != nil { + return err + } + + // Copy the data to the local file path. + _, err = io.Copy(fd, resp) + fd.Close() + if err != nil { + return err + } + + return os.Rename(tempFilePath, fileName) +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/select_object_type.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/select_object_type.go new file mode 100644 index 000000000..8b75782f3 --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/select_object_type.go @@ -0,0 +1,364 @@ +package oss + +import ( + "bytes" + "encoding/binary" + "fmt" + "hash" + "hash/crc32" + "io" + "net/http" + "time" +) + +// The adapter class for Select object's response. +// The response consists of frames. Each frame has the following format: + +// Type | Payload Length | Header Checksum | Payload | Payload Checksum + +// |<4-->| <--4 bytes------><---4 bytes-------><-n/a-----><--4 bytes---------> +// And we have three kind of frames. +// Data Frame: +// Type:8388609 +// Payload: Offset | Data +// <-8 bytes> + +// Continuous Frame +// Type:8388612 +// Payload: Offset (8-bytes) + +// End Frame +// Type:8388613 +// Payload: Offset | total scanned bytes | http status code | error message +// <-- 8bytes--><-----8 bytes--------><---4 bytes-------><---variabe---> + +// SelectObjectResponse defines HTTP response from OSS SelectObject +type SelectObjectResponse struct { + StatusCode int + Headers http.Header + Body io.ReadCloser + Frame SelectObjectResult + ReadTimeOut uint + ClientCRC32 uint32 + ServerCRC32 uint32 + WriterForCheckCrc32 hash.Hash32 + Finish bool +} + +func (sr *SelectObjectResponse) Read(p []byte) (n int, err error) { + n, err = sr.readFrames(p) + return +} + +// Close http reponse body +func (sr *SelectObjectResponse) Close() error { + return sr.Body.Close() +} + +// PostSelectResult is the request of SelectObject +type PostSelectResult struct { + Response *SelectObjectResponse +} + +// readFrames is read Frame +func (sr *SelectObjectResponse) readFrames(p []byte) (int, error) { + var nn int + var err error + var checkValid bool + if sr.Frame.OutputRawData == true { + nn, err = sr.Body.Read(p) + return nn, err + } + + if sr.Finish { + return 0, io.EOF + } + + for { + // if this Frame is Readed, then not reading Header + if sr.Frame.OpenLine != true { + err = sr.analysisHeader() + if err != nil { + return nn, err + } + } + + if sr.Frame.FrameType == DataFrameType { + n, err := sr.analysisData(p[nn:]) + if err != nil { + return nn, err + } + nn += n + + // if this Frame is readed all data, then empty the Frame to read it with next frame + if sr.Frame.ConsumedBytesLength == sr.Frame.PayloadLength-8 { + checkValid, err = sr.checkPayloadSum() + if err != nil || !checkValid { + return nn, fmt.Errorf("%s", err.Error()) + } + sr.emptyFrame() + } + + if nn == len(p) { + return nn, nil + } + } else if sr.Frame.FrameType == ContinuousFrameType { + checkValid, err = sr.checkPayloadSum() + if err != nil || !checkValid { + return nn, fmt.Errorf("%s", err.Error()) + } + } else if sr.Frame.FrameType == EndFrameType { + err = sr.analysisEndFrame() + if err != nil { + return nn, err + } + checkValid, err = sr.checkPayloadSum() + if checkValid { + sr.Finish = true + } + return nn, err + } else if sr.Frame.FrameType == MetaEndFrameCSVType { + err = sr.analysisMetaEndFrameCSV() + if err != nil { + return nn, err + } + checkValid, err = sr.checkPayloadSum() + if checkValid { + sr.Finish = true + } + return nn, err + } else if sr.Frame.FrameType == MetaEndFrameJSONType { + err = sr.analysisMetaEndFrameJSON() + if err != nil { + return nn, err + } + checkValid, err = sr.checkPayloadSum() + if checkValid { + sr.Finish = true + } + return nn, err + } + } + return nn, nil +} + +type chanReadIO struct { + readLen int + err error +} + +func (sr *SelectObjectResponse) readLen(p []byte, timeOut time.Duration) (int, error) { + r := sr.Body + ch := make(chan chanReadIO, 1) + defer close(ch) + go func(p []byte) { + var needReadLength int + readChan := chanReadIO{} + needReadLength = len(p) + for { + n, err := r.Read(p[readChan.readLen:needReadLength]) + readChan.readLen += n + if err != nil { + readChan.err = err + ch <- readChan + return + } + + if readChan.readLen == needReadLength { + break + } + } + ch <- readChan + }(p) + + select { + case <-time.After(time.Second * timeOut): + return 0, fmt.Errorf("requestId: %s, readLen timeout, timeout is %d(second),need read:%d", sr.Headers.Get(HTTPHeaderOssRequestID), timeOut, len(p)) + case result := <-ch: + return result.readLen, result.err + } +} + +// analysisHeader is reading selectObject response body's header +func (sr *SelectObjectResponse) analysisHeader() error { + headFrameByte := make([]byte, 20) + _, err := sr.readLen(headFrameByte, time.Duration(sr.ReadTimeOut)) + if err != nil { + return fmt.Errorf("requestId: %s, Read response frame header failure,err:%s", sr.Headers.Get(HTTPHeaderOssRequestID), err.Error()) + } + + frameTypeByte := headFrameByte[0:4] + sr.Frame.Version = frameTypeByte[0] + frameTypeByte[0] = 0 + bytesToInt(frameTypeByte, &sr.Frame.FrameType) + + if sr.Frame.FrameType != DataFrameType && sr.Frame.FrameType != ContinuousFrameType && + sr.Frame.FrameType != EndFrameType && sr.Frame.FrameType != MetaEndFrameCSVType && sr.Frame.FrameType != MetaEndFrameJSONType { + return fmt.Errorf("requestId: %s, Unexpected frame type: %d", sr.Headers.Get(HTTPHeaderOssRequestID), sr.Frame.FrameType) + } + + payloadLengthByte := headFrameByte[4:8] + bytesToInt(payloadLengthByte, &sr.Frame.PayloadLength) + headCheckSumByte := headFrameByte[8:12] + bytesToInt(headCheckSumByte, &sr.Frame.HeaderCheckSum) + byteOffset := headFrameByte[12:20] + bytesToInt(byteOffset, &sr.Frame.Offset) + sr.Frame.OpenLine = true + + err = sr.writerCheckCrc32(byteOffset) + return err +} + +// analysisData is reading the DataFrameType data of selectObject response body +func (sr *SelectObjectResponse) analysisData(p []byte) (int, error) { + var needReadLength int32 + lenP := int32(len(p)) + restByteLength := sr.Frame.PayloadLength - 8 - sr.Frame.ConsumedBytesLength + if lenP <= restByteLength { + needReadLength = lenP + } else { + needReadLength = restByteLength + } + n, err := sr.readLen(p[:needReadLength], time.Duration(sr.ReadTimeOut)) + if err != nil { + return n, fmt.Errorf("read frame data error,%s", err.Error()) + } + sr.Frame.ConsumedBytesLength += int32(n) + err = sr.writerCheckCrc32(p[:n]) + return n, err +} + +// analysisEndFrame is reading the EndFrameType data of selectObject response body +func (sr *SelectObjectResponse) analysisEndFrame() error { + var eF EndFrame + payLoadBytes := make([]byte, sr.Frame.PayloadLength-8) + _, err := sr.readLen(payLoadBytes, time.Duration(sr.ReadTimeOut)) + if err != nil { + return fmt.Errorf("read end frame error:%s", err.Error()) + } + bytesToInt(payLoadBytes[0:8], &eF.TotalScanned) + bytesToInt(payLoadBytes[8:12], &eF.HTTPStatusCode) + errMsgLength := sr.Frame.PayloadLength - 20 + eF.ErrorMsg = string(payLoadBytes[12 : errMsgLength+12]) + sr.Frame.EndFrame.TotalScanned = eF.TotalScanned + sr.Frame.EndFrame.HTTPStatusCode = eF.HTTPStatusCode + sr.Frame.EndFrame.ErrorMsg = eF.ErrorMsg + err = sr.writerCheckCrc32(payLoadBytes) + return err +} + +// analysisMetaEndFrameCSV is reading the MetaEndFrameCSVType data of selectObject response body +func (sr *SelectObjectResponse) analysisMetaEndFrameCSV() error { + var mCF MetaEndFrameCSV + payLoadBytes := make([]byte, sr.Frame.PayloadLength-8) + _, err := sr.readLen(payLoadBytes, time.Duration(sr.ReadTimeOut)) + if err != nil { + return fmt.Errorf("read meta end csv frame error:%s", err.Error()) + } + + bytesToInt(payLoadBytes[0:8], &mCF.TotalScanned) + bytesToInt(payLoadBytes[8:12], &mCF.Status) + bytesToInt(payLoadBytes[12:16], &mCF.SplitsCount) + bytesToInt(payLoadBytes[16:24], &mCF.RowsCount) + bytesToInt(payLoadBytes[24:28], &mCF.ColumnsCount) + errMsgLength := sr.Frame.PayloadLength - 36 + mCF.ErrorMsg = string(payLoadBytes[28 : errMsgLength+28]) + sr.Frame.MetaEndFrameCSV.ErrorMsg = mCF.ErrorMsg + sr.Frame.MetaEndFrameCSV.TotalScanned = mCF.TotalScanned + sr.Frame.MetaEndFrameCSV.Status = mCF.Status + sr.Frame.MetaEndFrameCSV.SplitsCount = mCF.SplitsCount + sr.Frame.MetaEndFrameCSV.RowsCount = mCF.RowsCount + sr.Frame.MetaEndFrameCSV.ColumnsCount = mCF.ColumnsCount + err = sr.writerCheckCrc32(payLoadBytes) + return err +} + +// analysisMetaEndFrameJSON is reading the MetaEndFrameJSONType data of selectObject response body +func (sr *SelectObjectResponse) analysisMetaEndFrameJSON() error { + var mJF MetaEndFrameJSON + payLoadBytes := make([]byte, sr.Frame.PayloadLength-8) + _, err := sr.readLen(payLoadBytes, time.Duration(sr.ReadTimeOut)) + if err != nil { + return fmt.Errorf("read meta end json frame error:%s", err.Error()) + } + + bytesToInt(payLoadBytes[0:8], &mJF.TotalScanned) + bytesToInt(payLoadBytes[8:12], &mJF.Status) + bytesToInt(payLoadBytes[12:16], &mJF.SplitsCount) + bytesToInt(payLoadBytes[16:24], &mJF.RowsCount) + errMsgLength := sr.Frame.PayloadLength - 32 + mJF.ErrorMsg = string(payLoadBytes[24 : errMsgLength+24]) + sr.Frame.MetaEndFrameJSON.ErrorMsg = mJF.ErrorMsg + sr.Frame.MetaEndFrameJSON.TotalScanned = mJF.TotalScanned + sr.Frame.MetaEndFrameJSON.Status = mJF.Status + sr.Frame.MetaEndFrameJSON.SplitsCount = mJF.SplitsCount + sr.Frame.MetaEndFrameJSON.RowsCount = mJF.RowsCount + + err = sr.writerCheckCrc32(payLoadBytes) + return err +} + +func (sr *SelectObjectResponse) checkPayloadSum() (bool, error) { + payLoadChecksumByte := make([]byte, 4) + n, err := sr.readLen(payLoadChecksumByte, time.Duration(sr.ReadTimeOut)) + if n == 4 { + bytesToInt(payLoadChecksumByte, &sr.Frame.PayloadChecksum) + sr.ServerCRC32 = sr.Frame.PayloadChecksum + sr.ClientCRC32 = sr.WriterForCheckCrc32.Sum32() + if sr.Frame.EnablePayloadCrc == true && sr.ServerCRC32 != 0 && sr.ServerCRC32 != sr.ClientCRC32 { + return false, fmt.Errorf("RequestId: %s, Unexpected frame type: %d, client %d but server %d", + sr.Headers.Get(HTTPHeaderOssRequestID), sr.Frame.FrameType, sr.ClientCRC32, sr.ServerCRC32) + } + return true, err + } + return false, fmt.Errorf("RequestId:%s, read checksum error:%s", sr.Headers.Get(HTTPHeaderOssRequestID), err.Error()) +} + +func (sr *SelectObjectResponse) writerCheckCrc32(p []byte) (err error) { + err = nil + if sr.Frame.EnablePayloadCrc == true { + _, err = sr.WriterForCheckCrc32.Write(p) + } + return err +} + +// emptyFrame is emptying SelectObjectResponse Frame information +func (sr *SelectObjectResponse) emptyFrame() { + crcCalc := crc32.NewIEEE() + sr.WriterForCheckCrc32 = crcCalc + sr.Finish = false + + sr.Frame.ConsumedBytesLength = 0 + sr.Frame.OpenLine = false + sr.Frame.Version = byte(0) + sr.Frame.FrameType = 0 + sr.Frame.PayloadLength = 0 + sr.Frame.HeaderCheckSum = 0 + sr.Frame.Offset = 0 + sr.Frame.Data = "" + + sr.Frame.EndFrame.TotalScanned = 0 + sr.Frame.EndFrame.HTTPStatusCode = 0 + sr.Frame.EndFrame.ErrorMsg = "" + + sr.Frame.MetaEndFrameCSV.TotalScanned = 0 + sr.Frame.MetaEndFrameCSV.Status = 0 + sr.Frame.MetaEndFrameCSV.SplitsCount = 0 + sr.Frame.MetaEndFrameCSV.RowsCount = 0 + sr.Frame.MetaEndFrameCSV.ColumnsCount = 0 + sr.Frame.MetaEndFrameCSV.ErrorMsg = "" + + sr.Frame.MetaEndFrameJSON.TotalScanned = 0 + sr.Frame.MetaEndFrameJSON.Status = 0 + sr.Frame.MetaEndFrameJSON.SplitsCount = 0 + sr.Frame.MetaEndFrameJSON.RowsCount = 0 + sr.Frame.MetaEndFrameJSON.ErrorMsg = "" + + sr.Frame.PayloadChecksum = 0 +} + +// bytesToInt byte's array trans to int +func bytesToInt(b []byte, ret interface{}) { + binBuf := bytes.NewBuffer(b) + binary.Read(binBuf, binary.BigEndian, ret) +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/transport_1_6.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/transport_1_6.go new file mode 100644 index 000000000..795ca8bb3 --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/transport_1_6.go @@ -0,0 +1,34 @@ +// +build !go1.7 + +package oss + +import ( + "net" + "net/http" + "time" +) + +func newTransport(conn *Conn, config *Config) *http.Transport { + httpTimeOut := conn.config.HTTPTimeout + httpMaxConns := conn.config.HTTPMaxConns + // New Transport + transport := &http.Transport{ + Dial: func(netw, addr string) (net.Conn, error) { + d := net.Dialer{ + Timeout: httpTimeOut.ConnectTimeout, + KeepAlive: 30 * time.Second, + } + if config.LocalAddr != nil { + d.LocalAddr = config.LocalAddr + } + conn, err := d.Dial(netw, addr) + if err != nil { + return nil, err + } + return newTimeoutConn(conn, httpTimeOut.ReadWriteTimeout, httpTimeOut.LongTimeout), nil + }, + MaxIdleConnsPerHost: httpMaxConns.MaxIdleConnsPerHost, + ResponseHeaderTimeout: httpTimeOut.HeaderTimeout, + } + return transport +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/transport_1_7.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/transport_1_7.go new file mode 100644 index 000000000..757543bc4 --- /dev/null +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/transport_1_7.go @@ -0,0 +1,36 @@ +// +build go1.7 + +package oss + +import ( + "net" + "net/http" + "time" +) + +func newTransport(conn *Conn, config *Config) *http.Transport { + httpTimeOut := conn.config.HTTPTimeout + httpMaxConns := conn.config.HTTPMaxConns + // New Transport + transport := &http.Transport{ + Dial: func(netw, addr string) (net.Conn, error) { + d := net.Dialer{ + Timeout: httpTimeOut.ConnectTimeout, + KeepAlive: 30 * time.Second, + } + if config.LocalAddr != nil { + d.LocalAddr = config.LocalAddr + } + conn, err := d.Dial(netw, addr) + if err != nil { + return nil, err + } + return newTimeoutConn(conn, httpTimeOut.ReadWriteTimeout, httpTimeOut.LongTimeout), nil + }, + MaxIdleConns: httpMaxConns.MaxIdleConns, + MaxIdleConnsPerHost: httpMaxConns.MaxIdleConnsPerHost, + IdleConnTimeout: httpTimeOut.IdleConnTimeout, + ResponseHeaderTimeout: httpTimeOut.HeaderTimeout, + } + return transport +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/type.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/type.go index b60564538..e80d2db5d 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/type.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/type.go @@ -1,304 +1,485 @@ package oss import ( + "encoding/base64" "encoding/xml" + "fmt" "net/url" "time" ) -// ListBucketsResult ListBuckets请求返回的结果 +// ListBucketsResult defines the result object from ListBuckets request type ListBucketsResult struct { XMLName xml.Name `xml:"ListAllMyBucketsResult"` - Prefix string `xml:"Prefix"` // 本次查询结果的前缀 - Marker string `xml:"Marker"` // 标明查询的起点,未全部返回时有此节点 - MaxKeys int `xml:"MaxKeys"` // 返回结果的最大数目,未全部返回时有此节点 - IsTruncated bool `xml:"IsTruncated"` // 所有的结果是否已经全部返回 - NextMarker string `xml:"NextMarker"` // 表示下一次查询的起点 - Owner Owner `xml:"Owner"` // 拥有者信息 - Buckets []BucketProperties `xml:"Buckets>Bucket"` // Bucket列表 + Prefix string `xml:"Prefix"` // The prefix in this query + Marker string `xml:"Marker"` // The marker filter + MaxKeys int `xml:"MaxKeys"` // The max entry count to return. This information is returned when IsTruncated is true. + IsTruncated bool `xml:"IsTruncated"` // Flag true means there's remaining buckets to return. + NextMarker string `xml:"NextMarker"` // The marker filter for the next list call + Owner Owner `xml:"Owner"` // The owner information + Buckets []BucketProperties `xml:"Buckets>Bucket"` // The bucket list } -// BucketProperties Bucket信息 +// BucketProperties defines bucket properties type BucketProperties struct { XMLName xml.Name `xml:"Bucket"` - Name string `xml:"Name"` // Bucket名称 - Location string `xml:"Location"` // Bucket所在的数据中心 - CreationDate time.Time `xml:"CreationDate"` // Bucket创建时间 + Name string `xml:"Name"` // Bucket name + Location string `xml:"Location"` // Bucket datacenter + CreationDate time.Time `xml:"CreationDate"` // Bucket create time + StorageClass string `xml:"StorageClass"` // Bucket storage class } -// GetBucketACLResult GetBucketACL请求返回的结果 +// GetBucketACLResult defines GetBucketACL request's result type GetBucketACLResult struct { XMLName xml.Name `xml:"AccessControlPolicy"` - ACL string `xml:"AccessControlList>Grant"` // Bucket权限 - Owner Owner `xml:"Owner"` // Bucket拥有者信息 + ACL string `xml:"AccessControlList>Grant"` // Bucket ACL + Owner Owner `xml:"Owner"` // Bucket owner } -// LifecycleConfiguration Bucket的Lifecycle配置 +// LifecycleConfiguration is the Bucket Lifecycle configuration type LifecycleConfiguration struct { XMLName xml.Name `xml:"LifecycleConfiguration"` Rules []LifecycleRule `xml:"Rule"` } -// LifecycleRule Lifecycle规则 +// LifecycleRule defines Lifecycle rules type LifecycleRule struct { - XMLName xml.Name `xml:"Rule"` - ID string `xml:"ID"` // 规则唯一的ID - Prefix string `xml:"Prefix"` // 规则所适用Object的前缀 - Status string `xml:"Status"` // 规则是否生效 - Expiration LifecycleExpiration `xml:"Expiration"` // 规则的过期属性 + XMLName xml.Name `xml:"Rule"` + ID string `xml:"ID,omitempty"` // The rule ID + Prefix string `xml:"Prefix"` // The object key prefix + Status string `xml:"Status"` // The rule status (enabled or not) + Tags []Tag `xml:"Tag,omitempty"` // the tags property + Expiration *LifecycleExpiration `xml:"Expiration,omitempty"` // The expiration property + Transitions []LifecycleTransition `xml:"Transition,omitempty"` // The transition property + AbortMultipartUpload *LifecycleAbortMultipartUpload `xml:"AbortMultipartUpload,omitempty"` // The AbortMultipartUpload property + NonVersionExpiration *LifecycleVersionExpiration `xml:"NoncurrentVersionExpiration,omitempty"` + // Deprecated: Use NonVersionTransitions instead. + NonVersionTransition *LifecycleVersionTransition `xml:"-"` // NonVersionTransition is not suggested to use + NonVersionTransitions []LifecycleVersionTransition `xml:"NoncurrentVersionTransition,omitempty"` } -// LifecycleExpiration 规则的过期属性 +// LifecycleExpiration defines the rule's expiration property type LifecycleExpiration struct { - XMLName xml.Name `xml:"Expiration"` - Days int `xml:"Days,omitempty"` // 最后修改时间过后多少天生效 - Date time.Time `xml:"Date,omitempty"` // 指定规则何时生效 + XMLName xml.Name `xml:"Expiration"` + Days int `xml:"Days,omitempty"` // Relative expiration time: The expiration time in days after the last modified time + Date string `xml:"Date,omitempty"` // Absolute expiration time: The expiration time in date, not recommended + CreatedBeforeDate string `xml:"CreatedBeforeDate,omitempty"` // objects created before the date will be expired + ExpiredObjectDeleteMarker *bool `xml:"ExpiredObjectDeleteMarker,omitempty"` // Specifies whether the expired delete tag is automatically deleted } -type lifecycleXML struct { - XMLName xml.Name `xml:"LifecycleConfiguration"` - Rules []lifecycleRule `xml:"Rule"` +// LifecycleTransition defines the rule's transition propery +type LifecycleTransition struct { + XMLName xml.Name `xml:"Transition"` + Days int `xml:"Days,omitempty"` // Relative transition time: The transition time in days after the last modified time + CreatedBeforeDate string `xml:"CreatedBeforeDate,omitempty"` // objects created before the date will be expired + StorageClass StorageClassType `xml:"StorageClass,omitempty"` // Specifies the target storage type } -type lifecycleRule struct { - XMLName xml.Name `xml:"Rule"` - ID string `xml:"ID"` - Prefix string `xml:"Prefix"` - Status string `xml:"Status"` - Expiration lifecycleExpiration `xml:"Expiration"` +// LifecycleAbortMultipartUpload defines the rule's abort multipart upload propery +type LifecycleAbortMultipartUpload struct { + XMLName xml.Name `xml:"AbortMultipartUpload"` + Days int `xml:"Days,omitempty"` // Relative expiration time: The expiration time in days after the last modified time + CreatedBeforeDate string `xml:"CreatedBeforeDate,omitempty"` // objects created before the date will be expired } -type lifecycleExpiration struct { - XMLName xml.Name `xml:"Expiration"` - Days int `xml:"Days,omitempty"` - Date string `xml:"Date,omitempty"` +// LifecycleVersionExpiration defines the rule's NoncurrentVersionExpiration propery +type LifecycleVersionExpiration struct { + XMLName xml.Name `xml:"NoncurrentVersionExpiration"` + NoncurrentDays int `xml:"NoncurrentDays,omitempty"` // How many days after the Object becomes a non-current version } -const expirationDateFormat = "2006-01-02T15:04:05.000Z" - -func convLifecycleRule(rules []LifecycleRule) []lifecycleRule { - rs := []lifecycleRule{} - for _, rule := range rules { - r := lifecycleRule{} - r.ID = rule.ID - r.Prefix = rule.Prefix - r.Status = rule.Status - if rule.Expiration.Date.IsZero() { - r.Expiration.Days = rule.Expiration.Days - } else { - r.Expiration.Date = rule.Expiration.Date.Format(expirationDateFormat) - } - rs = append(rs, r) - } - return rs +// LifecycleVersionTransition defines the rule's NoncurrentVersionTransition propery +type LifecycleVersionTransition struct { + XMLName xml.Name `xml:"NoncurrentVersionTransition"` + NoncurrentDays int `xml:"NoncurrentDays,omitempty"` // How many days after the Object becomes a non-current version + StorageClass StorageClassType `xml:"StorageClass,omitempty"` } -// BuildLifecycleRuleByDays 指定过期天数构建Lifecycle规则 +const iso8601DateFormat = "2006-01-02T15:04:05.000Z" + +// BuildLifecycleRuleByDays builds a lifecycle rule objects will expiration in days after the last modified time func BuildLifecycleRuleByDays(id, prefix string, status bool, days int) LifecycleRule { var statusStr = "Enabled" if !status { statusStr = "Disabled" } return LifecycleRule{ID: id, Prefix: prefix, Status: statusStr, - Expiration: LifecycleExpiration{Days: days}} + Expiration: &LifecycleExpiration{Days: days}} } -// BuildLifecycleRuleByDate 指定过期时间构建Lifecycle规则 +// BuildLifecycleRuleByDate builds a lifecycle rule objects will expiration in specified date func BuildLifecycleRuleByDate(id, prefix string, status bool, year, month, day int) LifecycleRule { var statusStr = "Enabled" if !status { statusStr = "Disabled" } - date := time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC) + date := time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC).Format(iso8601DateFormat) return LifecycleRule{ID: id, Prefix: prefix, Status: statusStr, - Expiration: LifecycleExpiration{Date: date}} + Expiration: &LifecycleExpiration{Date: date}} } -// GetBucketLifecycleResult GetBucketLifecycle请求请求结果 +// ValidateLifecycleRule Determine if a lifecycle rule is valid, if it is invalid, it will return an error. +func verifyLifecycleRules(rules []LifecycleRule) error { + if len(rules) == 0 { + return fmt.Errorf("invalid rules, the length of rules is zero") + } + for k, rule := range rules { + if rule.Status != "Enabled" && rule.Status != "Disabled" { + return fmt.Errorf("invalid rule, the value of status must be Enabled or Disabled") + } + + abortMPU := rule.AbortMultipartUpload + if abortMPU != nil { + if (abortMPU.Days != 0 && abortMPU.CreatedBeforeDate != "") || (abortMPU.Days == 0 && abortMPU.CreatedBeforeDate == "") { + return fmt.Errorf("invalid abort multipart upload lifecycle, must be set one of CreatedBeforeDate and Days") + } + } + + transitions := rule.Transitions + if len(transitions) > 0 { + for _, transition := range transitions { + if (transition.Days != 0 && transition.CreatedBeforeDate != "") || (transition.Days == 0 && transition.CreatedBeforeDate == "") { + return fmt.Errorf("invalid transition lifecycle, must be set one of CreatedBeforeDate and Days") + } + } + } + + // NonVersionTransition is not suggested to use + // to keep compatible + if rule.NonVersionTransition != nil && len(rule.NonVersionTransitions) > 0 { + return fmt.Errorf("NonVersionTransition and NonVersionTransitions cannot both have values") + } else if rule.NonVersionTransition != nil { + rules[k].NonVersionTransitions = append(rules[k].NonVersionTransitions, *rule.NonVersionTransition) + } + } + + return nil +} + +// GetBucketLifecycleResult defines GetBucketLifecycle's result object type GetBucketLifecycleResult LifecycleConfiguration -// RefererXML Referer配置 +// RefererXML defines Referer configuration type RefererXML struct { XMLName xml.Name `xml:"RefererConfiguration"` - AllowEmptyReferer bool `xml:"AllowEmptyReferer"` // 是否允许referer字段为空的请求访问 - RefererList []string `xml:"RefererList>Referer"` // referer访问白名单 + AllowEmptyReferer bool `xml:"AllowEmptyReferer"` // Allow empty referrer + RefererList []string `xml:"RefererList>Referer"` // Referer whitelist } -// GetBucketRefererResult GetBucketReferer请教返回结果 +// GetBucketRefererResult defines result object for GetBucketReferer request type GetBucketRefererResult RefererXML -// LoggingXML Logging配置 +// LoggingXML defines logging configuration type LoggingXML struct { XMLName xml.Name `xml:"BucketLoggingStatus"` - LoggingEnabled LoggingEnabled `xml:"LoggingEnabled"` // 访问日志信息容器 + LoggingEnabled LoggingEnabled `xml:"LoggingEnabled"` // The logging configuration information } type loggingXMLEmpty struct { XMLName xml.Name `xml:"BucketLoggingStatus"` } -// LoggingEnabled 访问日志信息容器 +// LoggingEnabled defines the logging configuration information type LoggingEnabled struct { XMLName xml.Name `xml:"LoggingEnabled"` - TargetBucket string `xml:"TargetBucket"` //存放访问日志的Bucket - TargetPrefix string `xml:"TargetPrefix"` //保存访问日志的文件前缀 + TargetBucket string `xml:"TargetBucket"` // The bucket name for storing the log files + TargetPrefix string `xml:"TargetPrefix"` // The log file prefix } -// GetBucketLoggingResult GetBucketLogging请求返回结果 +// GetBucketLoggingResult defines the result from GetBucketLogging request type GetBucketLoggingResult LoggingXML -// WebsiteXML Website配置 +// WebsiteXML defines Website configuration type WebsiteXML struct { XMLName xml.Name `xml:"WebsiteConfiguration"` - IndexDocument IndexDocument `xml:"IndexDocument"` // 目录URL时添加的索引文件 - ErrorDocument ErrorDocument `xml:"ErrorDocument"` // 404错误时使用的文件 + IndexDocument IndexDocument `xml:"IndexDocument,omitempty"` // The index page + ErrorDocument ErrorDocument `xml:"ErrorDocument,omitempty"` // The error page + RoutingRules []RoutingRule `xml:"RoutingRules>RoutingRule,omitempty"` // The routing Rule list } -// IndexDocument 目录URL时添加的索引文件 +// IndexDocument defines the index page info type IndexDocument struct { XMLName xml.Name `xml:"IndexDocument"` - Suffix string `xml:"Suffix"` // 目录URL时添加的索引文件名 + Suffix string `xml:"Suffix"` // The file name for the index page } -// ErrorDocument 404错误时使用的文件 +// ErrorDocument defines the 404 error page info type ErrorDocument struct { XMLName xml.Name `xml:"ErrorDocument"` - Key string `xml:"Key"` // 404错误时使用的文件名 + Key string `xml:"Key"` // 404 error file name } -// GetBucketWebsiteResult GetBucketWebsite请求返回结果 +// RoutingRule defines the routing rules +type RoutingRule struct { + XMLName xml.Name `xml:"RoutingRule"` + RuleNumber int `xml:"RuleNumber,omitempty"` // The routing number + Condition Condition `xml:"Condition,omitempty"` // The routing condition + Redirect Redirect `xml:"Redirect,omitempty"` // The routing redirect + +} + +// Condition defines codition in the RoutingRule +type Condition struct { + XMLName xml.Name `xml:"Condition"` + KeyPrefixEquals string `xml:"KeyPrefixEquals,omitempty"` // Matching objcet prefix + HTTPErrorCodeReturnedEquals int `xml:"HttpErrorCodeReturnedEquals,omitempty"` // The rule is for Accessing to the specified object + IncludeHeader []IncludeHeader `xml:"IncludeHeader"` // The rule is for request which include header +} + +// IncludeHeader defines includeHeader in the RoutingRule's Condition +type IncludeHeader struct { + XMLName xml.Name `xml:"IncludeHeader"` + Key string `xml:"Key,omitempty"` // The Include header key + Equals string `xml:"Equals,omitempty"` // The Include header value +} + +// Redirect defines redirect in the RoutingRule +type Redirect struct { + XMLName xml.Name `xml:"Redirect"` + RedirectType string `xml:"RedirectType,omitempty"` // The redirect type, it have Mirror,External,Internal,AliCDN + PassQueryString *bool `xml:"PassQueryString"` // Whether to send the specified request's parameters, true or false + MirrorURL string `xml:"MirrorURL,omitempty"` // Mirror of the website address back to the source. + MirrorPassQueryString *bool `xml:"MirrorPassQueryString"` // To Mirror of the website Whether to send the specified request's parameters, true or false + MirrorFollowRedirect *bool `xml:"MirrorFollowRedirect"` // Redirect the location, if the mirror return 3XX + MirrorCheckMd5 *bool `xml:"MirrorCheckMd5"` // Check the mirror is MD5. + MirrorHeaders MirrorHeaders `xml:"MirrorHeaders,omitempty"` // Mirror headers + Protocol string `xml:"Protocol,omitempty"` // The redirect Protocol + HostName string `xml:"HostName,omitempty"` // The redirect HostName + ReplaceKeyPrefixWith string `xml:"ReplaceKeyPrefixWith,omitempty"` // object name'Prefix replace the value + HttpRedirectCode int `xml:"HttpRedirectCode,omitempty"` // THe redirect http code + ReplaceKeyWith string `xml:"ReplaceKeyWith,omitempty"` // object name replace the value +} + +// MirrorHeaders defines MirrorHeaders in the Redirect +type MirrorHeaders struct { + XMLName xml.Name `xml:"MirrorHeaders"` + PassAll *bool `xml:"PassAll"` // Penetrating all of headers to source website. + Pass []string `xml:"Pass"` // Penetrating some of headers to source website. + Remove []string `xml:"Remove"` // Prohibit passthrough some of headers to source website + Set []MirrorHeaderSet `xml:"Set"` // Setting some of headers send to source website +} + +// MirrorHeaderSet defines Set for Redirect's MirrorHeaders +type MirrorHeaderSet struct { + XMLName xml.Name `xml:"Set"` + Key string `xml:"Key,omitempty"` // The mirror header key + Value string `xml:"Value,omitempty"` // The mirror header value +} + +// GetBucketWebsiteResult defines the result from GetBucketWebsite request. type GetBucketWebsiteResult WebsiteXML -// CORSXML CORS配置 +// CORSXML defines CORS configuration type CORSXML struct { XMLName xml.Name `xml:"CORSConfiguration"` - CORSRules []CORSRule `xml:"CORSRule"` // CORS规则列表 + CORSRules []CORSRule `xml:"CORSRule"` // CORS rules } -// CORSRule CORS规则 +// CORSRule defines CORS rules type CORSRule struct { XMLName xml.Name `xml:"CORSRule"` - AllowedOrigin []string `xml:"AllowedOrigin"` // 允许的来源,默认通配符"*" - AllowedMethod []string `xml:"AllowedMethod"` // 允许的方法 - AllowedHeader []string `xml:"AllowedHeader"` // 允许的请求头 - ExposeHeader []string `xml:"ExposeHeader"` // 允许的响应头 - MaxAgeSeconds int `xml:"MaxAgeSeconds"` // 最大的缓存时间 + AllowedOrigin []string `xml:"AllowedOrigin"` // Allowed origins. By default it's wildcard '*' + AllowedMethod []string `xml:"AllowedMethod"` // Allowed methods + AllowedHeader []string `xml:"AllowedHeader"` // Allowed headers + ExposeHeader []string `xml:"ExposeHeader"` // Allowed response headers + MaxAgeSeconds int `xml:"MaxAgeSeconds"` // Max cache ages in seconds } -// GetBucketCORSResult GetBucketCORS请求返回的结果 +// GetBucketCORSResult defines the result from GetBucketCORS request. type GetBucketCORSResult CORSXML -// GetBucketInfoResult GetBucketInfo请求返回结果 +// GetBucketInfoResult defines the result from GetBucketInfo request. type GetBucketInfoResult struct { - XMLName xml.Name `xml:"BucketInfo"` - BucketInfo BucketInfo `xml:"Bucket"` + XMLName xml.Name `xml:"BucketInfo"` + BucketInfo BucketInfo `xml:"Bucket"` } -// BucketInfo Bucket信息 +// BucketInfo defines Bucket information type BucketInfo struct { XMLName xml.Name `xml:"Bucket"` - Name string `xml:"Name"` // Bucket名称 - Location string `xml:"Location"` // Bucket所在的数据中心 - CreationDate time.Time `xml:"CreationDate"` // Bucket创建时间 - ExtranetEndpoint string `xml:"ExtranetEndpoint"` // Bucket访问的外网域名 - IntranetEndpoint string `xml:"IntranetEndpoint"` // Bucket访问的内网域名 - ACL string `xml:"AccessControlList>Grant"` // Bucket权限 - Owner Owner `xml:"Owner"` // Bucket拥有者信息 + Name string `xml:"Name"` // Bucket name + Location string `xml:"Location"` // Bucket datacenter + CreationDate time.Time `xml:"CreationDate"` // Bucket creation time + ExtranetEndpoint string `xml:"ExtranetEndpoint"` // Bucket external endpoint + IntranetEndpoint string `xml:"IntranetEndpoint"` // Bucket internal endpoint + ACL string `xml:"AccessControlList>Grant"` // Bucket ACL + RedundancyType string `xml:"DataRedundancyType"` // Bucket DataRedundancyType + Owner Owner `xml:"Owner"` // Bucket owner + StorageClass string `xml:"StorageClass"` // Bucket storage class + SseRule SSERule `xml:"ServerSideEncryptionRule"` // Bucket ServerSideEncryptionRule + Versioning string `xml:"Versioning"` // Bucket Versioning } -// ListObjectsResult ListObjects请求返回结果 +type SSERule struct { + XMLName xml.Name `xml:"ServerSideEncryptionRule"` // Bucket ServerSideEncryptionRule + KMSMasterKeyID string `xml:"KMSMasterKeyID,omitempty"` // Bucket KMSMasterKeyID + SSEAlgorithm string `xml:"SSEAlgorithm,omitempty"` // Bucket SSEAlgorithm + KMSDataEncryption string `xml:"KMSDataEncryption,omitempty"` //Bucket KMSDataEncryption +} + +// ListObjectsResult defines the result from ListObjects request type ListObjectsResult struct { XMLName xml.Name `xml:"ListBucketResult"` - Prefix string `xml:"Prefix"` // 本次查询结果的开始前缀 - Marker string `xml:"Marker"` // 这次查询的起点 - MaxKeys int `xml:"MaxKeys"` // 请求返回结果的最大数目 - Delimiter string `xml:"Delimiter"` // 对Object名字进行分组的字符 - IsTruncated bool `xml:"IsTruncated"` // 是否所有的结果都已经返回 - NextMarker string `xml:"NextMarker"` // 下一次查询的起点 - Objects []ObjectProperties `xml:"Contents"` // Object类别 - CommonPrefixes []string `xml:"CommonPrefixes>Prefix"` // 以delimiter结尾并有共同前缀的Object的集合 + Prefix string `xml:"Prefix"` // The object prefix + Marker string `xml:"Marker"` // The marker filter. + MaxKeys int `xml:"MaxKeys"` // Max keys to return + Delimiter string `xml:"Delimiter"` // The delimiter for grouping objects' name + IsTruncated bool `xml:"IsTruncated"` // Flag indicates if all results are returned (when it's false) + NextMarker string `xml:"NextMarker"` // The start point of the next query + Objects []ObjectProperties `xml:"Contents"` // Object list + CommonPrefixes []string `xml:"CommonPrefixes>Prefix"` // You can think of commonprefixes as "folders" whose names end with the delimiter } -// ObjectProperties Objecct属性 +// ObjectProperties defines Objecct properties type ObjectProperties struct { XMLName xml.Name `xml:"Contents"` - Key string `xml:"Key"` // Object的Key - Type string `xml:"Type"` // Object Type - Size int64 `xml:"Size"` // Object的长度字节数 - ETag string `xml:"ETag"` // 标示Object的内容 - Owner Owner `xml:"Owner"` // 保存Object拥有者信息的容器 - LastModified time.Time `xml:"LastModified"` // Object最后修改时间 - StorageClass string `xml:"StorageClass"` // Object的存储类型,目前只能是Standard + Key string `xml:"Key"` // Object key + Type string `xml:"Type"` // Object type + Size int64 `xml:"Size"` // Object size + ETag string `xml:"ETag"` // Object ETag + Owner Owner `xml:"Owner"` // Object owner information + LastModified time.Time `xml:"LastModified"` // Object last modified time + StorageClass string `xml:"StorageClass"` // Object storage class (Standard, IA, Archive) } -// Owner Bucket/Object的owner +// ListObjectsResultV2 defines the result from ListObjectsV2 request +type ListObjectsResultV2 struct { + XMLName xml.Name `xml:"ListBucketResult"` + Prefix string `xml:"Prefix"` // The object prefix + StartAfter string `xml:"StartAfter"` // the input StartAfter + ContinuationToken string `xml:"ContinuationToken"` // the input ContinuationToken + MaxKeys int `xml:"MaxKeys"` // Max keys to return + Delimiter string `xml:"Delimiter"` // The delimiter for grouping objects' name + IsTruncated bool `xml:"IsTruncated"` // Flag indicates if all results are returned (when it's false) + NextContinuationToken string `xml:"NextContinuationToken"` // The start point of the next NextContinuationToken + Objects []ObjectProperties `xml:"Contents"` // Object list + CommonPrefixes []string `xml:"CommonPrefixes>Prefix"` // You can think of commonprefixes as "folders" whose names end with the delimiter +} + +// ListObjectVersionsResult defines the result from ListObjectVersions request +type ListObjectVersionsResult struct { + XMLName xml.Name `xml:"ListVersionsResult"` + Name string `xml:"Name"` // The Bucket Name + Owner Owner `xml:"Owner"` // The owner of bucket + Prefix string `xml:"Prefix"` // The object prefix + KeyMarker string `xml:"KeyMarker"` // The start marker filter. + VersionIdMarker string `xml:"VersionIdMarker"` // The start VersionIdMarker filter. + MaxKeys int `xml:"MaxKeys"` // Max keys to return + Delimiter string `xml:"Delimiter"` // The delimiter for grouping objects' name + IsTruncated bool `xml:"IsTruncated"` // Flag indicates if all results are returned (when it's false) + NextKeyMarker string `xml:"NextKeyMarker"` // The start point of the next query + NextVersionIdMarker string `xml:"NextVersionIdMarker"` // The start point of the next query + CommonPrefixes []string `xml:"CommonPrefixes>Prefix"` // You can think of commonprefixes as "folders" whose names end with the delimiter + ObjectDeleteMarkers []ObjectDeleteMarkerProperties `xml:"DeleteMarker"` // DeleteMarker list + ObjectVersions []ObjectVersionProperties `xml:"Version"` // version list +} + +type ObjectDeleteMarkerProperties struct { + XMLName xml.Name `xml:"DeleteMarker"` + Key string `xml:"Key"` // The Object Key + VersionId string `xml:"VersionId"` // The Object VersionId + IsLatest bool `xml:"IsLatest"` // is current version or not + LastModified time.Time `xml:"LastModified"` // Object last modified time + Owner Owner `xml:"Owner"` // bucket owner element +} + +type ObjectVersionProperties struct { + XMLName xml.Name `xml:"Version"` + Key string `xml:"Key"` // The Object Key + VersionId string `xml:"VersionId"` // The Object VersionId + IsLatest bool `xml:"IsLatest"` // is latest version or not + LastModified time.Time `xml:"LastModified"` // Object last modified time + Type string `xml:"Type"` // Object type + Size int64 `xml:"Size"` // Object size + ETag string `xml:"ETag"` // Object ETag + StorageClass string `xml:"StorageClass"` // Object storage class (Standard, IA, Archive) + Owner Owner `xml:"Owner"` // bucket owner element +} + +// Owner defines Bucket/Object's owner type Owner struct { XMLName xml.Name `xml:"Owner"` - ID string `xml:"ID"` // 用户ID - DisplayName string `xml:"DisplayName"` // Owner名字 + ID string `xml:"ID"` // Owner ID + DisplayName string `xml:"DisplayName"` // Owner's display name } -// CopyObjectResult CopyObject请求返回的结果 +// CopyObjectResult defines result object of CopyObject type CopyObjectResult struct { XMLName xml.Name `xml:"CopyObjectResult"` - LastModified time.Time `xml:"LastModified"` // 新Object最后更新时间 - ETag string `xml:"ETag"` // 新Object的ETag值 + LastModified time.Time `xml:"LastModified"` // New object's last modified time. + ETag string `xml:"ETag"` // New object's ETag } -// GetObjectACLResult GetObjectACL请求返回的结果 +// GetObjectACLResult defines result of GetObjectACL request type GetObjectACLResult GetBucketACLResult type deleteXML struct { XMLName xml.Name `xml:"Delete"` - Objects []DeleteObject `xml:"Object"` // 删除的所有Object - Quiet bool `xml:"Quiet"` // 安静响应模式 + Objects []DeleteObject `xml:"Object"` // Objects to delete + Quiet bool `xml:"Quiet"` // Flag of quiet mode. } -// DeleteObject 删除的Object +// DeleteObject defines the struct for deleting object type DeleteObject struct { - XMLName xml.Name `xml:"Object"` - Key string `xml:"Key"` // Object名称 + XMLName xml.Name `xml:"Object"` + Key string `xml:"Key"` // Object name + VersionId string `xml:"VersionId,omitempty"` // Object VersionId } -// DeleteObjectsResult DeleteObjects请求返回结果 +// DeleteObjectsResult defines result of DeleteObjects request type DeleteObjectsResult struct { - XMLName xml.Name `xml:"DeleteResult"` - DeletedObjects []string `xml:"Deleted>Key"` // 删除的Object列表 + XMLName xml.Name + DeletedObjects []string // Deleted object key list } -// InitiateMultipartUploadResult InitiateMultipartUpload请求返回结果 +// DeleteObjectsResult_inner defines result of DeleteObjects request +type DeleteObjectVersionsResult struct { + XMLName xml.Name `xml:"DeleteResult"` + DeletedObjectsDetail []DeletedKeyInfo `xml:"Deleted"` // Deleted object detail info +} + +// DeleteKeyInfo defines object delete info +type DeletedKeyInfo struct { + XMLName xml.Name `xml:"Deleted"` + Key string `xml:"Key"` // Object key + VersionId string `xml:"VersionId"` // VersionId + DeleteMarker bool `xml:"DeleteMarker"` // Object DeleteMarker + DeleteMarkerVersionId string `xml:"DeleteMarkerVersionId"` // Object DeleteMarkerVersionId +} + +// InitiateMultipartUploadResult defines result of InitiateMultipartUpload request type InitiateMultipartUploadResult struct { XMLName xml.Name `xml:"InitiateMultipartUploadResult"` - Bucket string `xml:"Bucket"` // Bucket名称 - Key string `xml:"Key"` // 上传Object名称 - UploadID string `xml:"UploadId"` // 生成的UploadId + Bucket string `xml:"Bucket"` // Bucket name + Key string `xml:"Key"` // Object name to upload + UploadID string `xml:"UploadId"` // Generated UploadId } -// UploadPart 上传/拷贝的分片 +// UploadPart defines the upload/copy part type UploadPart struct { XMLName xml.Name `xml:"Part"` - PartNumber int `xml:"PartNumber"` // Part编号 - ETag string `xml:"ETag"` // ETag缓存码 + PartNumber int `xml:"PartNumber"` // Part number + ETag string `xml:"ETag"` // ETag value of the part's data } -type uploadParts []UploadPart +type UploadParts []UploadPart -func (slice uploadParts) Len() int { +func (slice UploadParts) Len() int { return len(slice) } -func (slice uploadParts) Less(i, j int) bool { +func (slice UploadParts) Less(i, j int) bool { return slice[i].PartNumber < slice[j].PartNumber } -func (slice uploadParts) Swap(i, j int) { +func (slice UploadParts) Swap(i, j int) { slice[i], slice[j] = slice[j], slice[i] } -// UploadPartCopyResult 拷贝分片请求返回的结果 +// UploadPartCopyResult defines result object of multipart copy request. type UploadPartCopyResult struct { XMLName xml.Name `xml:"CopyPartResult"` - LastModified time.Time `xml:"LastModified"` // 最后修改时间 + LastModified time.Time `xml:"LastModified"` // Last modified time ETag string `xml:"ETag"` // ETag } @@ -307,65 +488,73 @@ type completeMultipartUploadXML struct { Part []UploadPart `xml:"Part"` } -// CompleteMultipartUploadResult 提交分片上传任务返回结果 +// CompleteMultipartUploadResult defines result object of CompleteMultipartUploadRequest type CompleteMultipartUploadResult struct { XMLName xml.Name `xml:"CompleteMultipartUploadResult"` - Location string `xml:"Location"` // Object的URL - Bucket string `xml:"Bucket"` // Bucket名称 - ETag string `xml:"ETag"` // Object的ETag - Key string `xml:"Key"` // Object的名字 + Location string `xml:"Location"` // Object URL + Bucket string `xml:"Bucket"` // Bucket name + ETag string `xml:"ETag"` // Object ETag + Key string `xml:"Key"` // Object name } -// ListUploadedPartsResult ListUploadedParts请求返回结果 +// ListUploadedPartsResult defines result object of ListUploadedParts type ListUploadedPartsResult struct { XMLName xml.Name `xml:"ListPartsResult"` - Bucket string `xml:"Bucket"` // Bucket名称 - Key string `xml:"Key"` // Object名称 - UploadID string `xml:"UploadId"` // 上传Id - NextPartNumberMarker string `xml:"NextPartNumberMarker"` // 下一个Part的位置 - MaxParts int `xml:"MaxParts"` // 最大Part个数 - IsTruncated bool `xml:"IsTruncated"` // 是否完全上传完成 - UploadedParts []UploadedPart `xml:"Part"` // 已完成的Part + Bucket string `xml:"Bucket"` // Bucket name + Key string `xml:"Key"` // Object name + UploadID string `xml:"UploadId"` // Upload ID + NextPartNumberMarker string `xml:"NextPartNumberMarker"` // Next part number + MaxParts int `xml:"MaxParts"` // Max parts count + IsTruncated bool `xml:"IsTruncated"` // Flag indicates all entries returned.false: all entries returned. + UploadedParts []UploadedPart `xml:"Part"` // Uploaded parts } -// UploadedPart 该任务已经上传的分片 +// UploadedPart defines uploaded part type UploadedPart struct { XMLName xml.Name `xml:"Part"` - PartNumber int `xml:"PartNumber"` // Part编号 - LastModified time.Time `xml:"LastModified"` // 最后一次修改时间 - ETag string `xml:"ETag"` // ETag缓存码 - Size int `xml:"Size"` // Part大小 + PartNumber int `xml:"PartNumber"` // Part number + LastModified time.Time `xml:"LastModified"` // Last modified time + ETag string `xml:"ETag"` // ETag cache + Size int `xml:"Size"` // Part size } -// ListMultipartUploadResult ListMultipartUpload请求返回结果 +// ListMultipartUploadResult defines result object of ListMultipartUpload type ListMultipartUploadResult struct { XMLName xml.Name `xml:"ListMultipartUploadsResult"` - Bucket string `xml:"Bucket"` // Bucket名称 - Delimiter string `xml:"Delimiter"` // 分组分割符 - Prefix string `xml:"Prefix"` // 筛选前缀 - KeyMarker string `xml:"KeyMarker"` // 起始Object位置 - UploadIDMarker string `xml:"UploadIdMarker"` // 起始UploadId位置 - NextKeyMarker string `xml:"NextKeyMarker"` // 如果没有全部返回,标明接下去的KeyMarker位置 - NextUploadIDMarker string `xml:"NextUploadIdMarker"` // 如果没有全部返回,标明接下去的UploadId位置 - MaxUploads int `xml:"MaxUploads"` // 返回最大Upload数目 - IsTruncated bool `xml:"IsTruncated"` // 是否完全返回 - Uploads []UncompletedUpload `xml:"Upload"` // 未完成上传的MultipartUpload - CommonPrefixes []string `xml:"CommonPrefixes>Prefix"` // 所有名字包含指定的前缀且第一次出现delimiter字符之间的object作为一组的分组结果 + Bucket string `xml:"Bucket"` // Bucket name + Delimiter string `xml:"Delimiter"` // Delimiter for grouping object. + Prefix string `xml:"Prefix"` // Object prefix + KeyMarker string `xml:"KeyMarker"` // Object key marker + UploadIDMarker string `xml:"UploadIdMarker"` // UploadId marker + NextKeyMarker string `xml:"NextKeyMarker"` // Next key marker, if not all entries returned. + NextUploadIDMarker string `xml:"NextUploadIdMarker"` // Next uploadId marker, if not all entries returned. + MaxUploads int `xml:"MaxUploads"` // Max uploads to return + IsTruncated bool `xml:"IsTruncated"` // Flag indicates all entries are returned. + Uploads []UncompletedUpload `xml:"Upload"` // Ongoing uploads (not completed, not aborted) + CommonPrefixes []string `xml:"CommonPrefixes>Prefix"` // Common prefixes list. } -// UncompletedUpload 未完成的Upload任务 +// UncompletedUpload structure wraps an uncompleted upload task type UncompletedUpload struct { XMLName xml.Name `xml:"Upload"` - Key string `xml:"Key"` // Object名称 - UploadID string `xml:"UploadId"` // 对应UploadId - Initiated time.Time `xml:"Initiated"` // 初始化时间,格式2012-02-23T04:18:23.000Z + Key string `xml:"Key"` // Object name + UploadID string `xml:"UploadId"` // The UploadId + Initiated time.Time `xml:"Initiated"` // Initialization time in the format such as 2012-02-23T04:18:23.000Z } -// 解析URL编码 -func decodeDeleteObjectsResult(result *DeleteObjectsResult) error { +// ProcessObjectResult defines result object of ProcessObject +type ProcessObjectResult struct { + Bucket string `json:"bucket"` + FileSize int `json:"fileSize"` + Object string `json:"object"` + Status string `json:"status"` +} + +// decodeDeleteObjectsResult decodes deleting objects result in URL encoding +func decodeDeleteObjectsResult(result *DeleteObjectVersionsResult) error { var err error - for i := 0; i < len(result.DeletedObjects); i++ { - result.DeletedObjects[i], err = url.QueryUnescape(result.DeletedObjects[i]) + for i := 0; i < len(result.DeletedObjectsDetail); i++ { + result.DeletedObjectsDetail[i].Key, err = url.QueryUnescape(result.DeletedObjectsDetail[i].Key) if err != nil { return err } @@ -373,7 +562,7 @@ func decodeDeleteObjectsResult(result *DeleteObjectsResult) error { return nil } -// 解析URL编码 +// decodeListObjectsResult decodes list objects result in URL encoding func decodeListObjectsResult(result *ListObjectsResult) error { var err error result.Prefix, err = url.QueryUnescape(result.Prefix) @@ -407,7 +596,118 @@ func decodeListObjectsResult(result *ListObjectsResult) error { return nil } -// 解析URL编码 +// decodeListObjectsResult decodes list objects result in URL encoding +func decodeListObjectsResultV2(result *ListObjectsResultV2) error { + var err error + result.Prefix, err = url.QueryUnescape(result.Prefix) + if err != nil { + return err + } + result.StartAfter, err = url.QueryUnescape(result.StartAfter) + if err != nil { + return err + } + result.Delimiter, err = url.QueryUnescape(result.Delimiter) + if err != nil { + return err + } + result.NextContinuationToken, err = url.QueryUnescape(result.NextContinuationToken) + if err != nil { + return err + } + for i := 0; i < len(result.Objects); i++ { + result.Objects[i].Key, err = url.QueryUnescape(result.Objects[i].Key) + if err != nil { + return err + } + } + for i := 0; i < len(result.CommonPrefixes); i++ { + result.CommonPrefixes[i], err = url.QueryUnescape(result.CommonPrefixes[i]) + if err != nil { + return err + } + } + return nil +} + +// decodeListObjectVersionsResult decodes list version objects result in URL encoding +func decodeListObjectVersionsResult(result *ListObjectVersionsResult) error { + var err error + + // decode:Delimiter + result.Delimiter, err = url.QueryUnescape(result.Delimiter) + if err != nil { + return err + } + + // decode Prefix + result.Prefix, err = url.QueryUnescape(result.Prefix) + if err != nil { + return err + } + + // decode KeyMarker + result.KeyMarker, err = url.QueryUnescape(result.KeyMarker) + if err != nil { + return err + } + + // decode VersionIdMarker + result.VersionIdMarker, err = url.QueryUnescape(result.VersionIdMarker) + if err != nil { + return err + } + + // decode NextKeyMarker + result.NextKeyMarker, err = url.QueryUnescape(result.NextKeyMarker) + if err != nil { + return err + } + + // decode NextVersionIdMarker + result.NextVersionIdMarker, err = url.QueryUnescape(result.NextVersionIdMarker) + if err != nil { + return err + } + + // decode CommonPrefixes + for i := 0; i < len(result.CommonPrefixes); i++ { + result.CommonPrefixes[i], err = url.QueryUnescape(result.CommonPrefixes[i]) + if err != nil { + return err + } + } + + // decode deleteMarker + for i := 0; i < len(result.ObjectDeleteMarkers); i++ { + result.ObjectDeleteMarkers[i].Key, err = url.QueryUnescape(result.ObjectDeleteMarkers[i].Key) + if err != nil { + return err + } + } + + // decode ObjectVersions + for i := 0; i < len(result.ObjectVersions); i++ { + result.ObjectVersions[i].Key, err = url.QueryUnescape(result.ObjectVersions[i].Key) + if err != nil { + return err + } + } + + return nil +} + +// decodeListUploadedPartsResult decodes +func decodeListUploadedPartsResult(result *ListUploadedPartsResult) error { + var err error + result.Key, err = url.QueryUnescape(result.Key) + if err != nil { + return err + } + return nil +} + +// decodeListMultipartUploadResult decodes list multipart upload result in URL encoding func decodeListMultipartUploadResult(result *ListMultipartUploadResult) error { var err error result.Prefix, err = url.QueryUnescape(result.Prefix) @@ -440,3 +740,515 @@ func decodeListMultipartUploadResult(result *ListMultipartUploadResult) error { } return nil } + +// createBucketConfiguration defines the configuration for creating a bucket. +type createBucketConfiguration struct { + XMLName xml.Name `xml:"CreateBucketConfiguration"` + StorageClass StorageClassType `xml:"StorageClass,omitempty"` + DataRedundancyType DataRedundancyType `xml:"DataRedundancyType,omitempty"` + ObjectHashFunction ObjecthashFuncType `xml:"ObjectHashFunction,omitempty"` +} + +// LiveChannelConfiguration defines the configuration for live-channel +type LiveChannelConfiguration struct { + XMLName xml.Name `xml:"LiveChannelConfiguration"` + Description string `xml:"Description,omitempty"` //Description of live-channel, up to 128 bytes + Status string `xml:"Status,omitempty"` //Specify the status of livechannel + Target LiveChannelTarget `xml:"Target"` //target configuration of live-channel + // use point instead of struct to avoid omit empty snapshot + Snapshot *LiveChannelSnapshot `xml:"Snapshot,omitempty"` //snapshot configuration of live-channel +} + +// LiveChannelTarget target configuration of live-channel +type LiveChannelTarget struct { + XMLName xml.Name `xml:"Target"` + Type string `xml:"Type"` //the type of object, only supports HLS + FragDuration int `xml:"FragDuration,omitempty"` //the length of each ts object (in seconds), in the range [1,100] + FragCount int `xml:"FragCount,omitempty"` //the number of ts objects in the m3u8 object, in the range of [1,100] + PlaylistName string `xml:"PlaylistName,omitempty"` //the name of m3u8 object, which must end with ".m3u8" and the length range is [6,128] +} + +// LiveChannelSnapshot snapshot configuration of live-channel +type LiveChannelSnapshot struct { + XMLName xml.Name `xml:"Snapshot"` + RoleName string `xml:"RoleName,omitempty"` //The role of snapshot operations, it sholud has write permission of DestBucket and the permission to send messages to the NotifyTopic. + DestBucket string `xml:"DestBucket,omitempty"` //Bucket the snapshots will be written to. should be the same owner as the source bucket. + NotifyTopic string `xml:"NotifyTopic,omitempty"` //Topics of MNS for notifying users of high frequency screenshot operation results + Interval int `xml:"Interval,omitempty"` //interval of snapshots, threre is no snapshot if no I-frame during the interval time +} + +// CreateLiveChannelResult the result of crete live-channel +type CreateLiveChannelResult struct { + XMLName xml.Name `xml:"CreateLiveChannelResult"` + PublishUrls []string `xml:"PublishUrls>Url"` //push urls list + PlayUrls []string `xml:"PlayUrls>Url"` //play urls list +} + +// LiveChannelStat the result of get live-channel state +type LiveChannelStat struct { + XMLName xml.Name `xml:"LiveChannelStat"` + Status string `xml:"Status"` //Current push status of live-channel: Disabled,Live,Idle + ConnectedTime time.Time `xml:"ConnectedTime"` //The time when the client starts pushing, format: ISO8601 + RemoteAddr string `xml:"RemoteAddr"` //The ip address of the client + Video LiveChannelVideo `xml:"Video"` //Video stream information + Audio LiveChannelAudio `xml:"Audio"` //Audio stream information +} + +// LiveChannelVideo video stream information +type LiveChannelVideo struct { + XMLName xml.Name `xml:"Video"` + Width int `xml:"Width"` //Width (unit: pixels) + Height int `xml:"Height"` //Height (unit: pixels) + FrameRate int `xml:"FrameRate"` //FramRate + Bandwidth int `xml:"Bandwidth"` //Bandwidth (unit: B/s) +} + +// LiveChannelAudio audio stream information +type LiveChannelAudio struct { + XMLName xml.Name `xml:"Audio"` + SampleRate int `xml:"SampleRate"` //SampleRate + Bandwidth int `xml:"Bandwidth"` //Bandwidth (unit: B/s) + Codec string `xml:"Codec"` //Encoding forma +} + +// LiveChannelHistory the result of GetLiveChannelHistory, at most return up to lastest 10 push records +type LiveChannelHistory struct { + XMLName xml.Name `xml:"LiveChannelHistory"` + Record []LiveRecord `xml:"LiveRecord"` //push records list +} + +// LiveRecord push recode +type LiveRecord struct { + XMLName xml.Name `xml:"LiveRecord"` + StartTime time.Time `xml:"StartTime"` //StartTime, format: ISO8601 + EndTime time.Time `xml:"EndTime"` //EndTime, format: ISO8601 + RemoteAddr string `xml:"RemoteAddr"` //The ip address of remote client +} + +// ListLiveChannelResult the result of ListLiveChannel +type ListLiveChannelResult struct { + XMLName xml.Name `xml:"ListLiveChannelResult"` + Prefix string `xml:"Prefix"` //Filter by the name start with the value of "Prefix" + Marker string `xml:"Marker"` //cursor from which starting list + MaxKeys int `xml:"MaxKeys"` //The maximum count returned. the default value is 100. it cannot be greater than 1000. + IsTruncated bool `xml:"IsTruncated"` //Indicates whether all results have been returned, "true" indicates partial results returned while "false" indicates all results have been returned + NextMarker string `xml:"NextMarker"` //NextMarker indicate the Marker value of the next request + LiveChannel []LiveChannelInfo `xml:"LiveChannel"` //The infomation of live-channel +} + +// LiveChannelInfo the infomation of live-channel +type LiveChannelInfo struct { + XMLName xml.Name `xml:"LiveChannel"` + Name string `xml:"Name"` //The name of live-channel + Description string `xml:"Description"` //Description of live-channel + Status string `xml:"Status"` //Status: disabled or enabled + LastModified time.Time `xml:"LastModified"` //Last modification time, format: ISO8601 + PublishUrls []string `xml:"PublishUrls>Url"` //push urls list + PlayUrls []string `xml:"PlayUrls>Url"` //play urls list +} + +// Tag a tag for the object +type Tag struct { + XMLName xml.Name `xml:"Tag"` + Key string `xml:"Key"` + Value string `xml:"Value"` +} + +// Tagging tagset for the object +type Tagging struct { + XMLName xml.Name `xml:"Tagging"` + Tags []Tag `xml:"TagSet>Tag,omitempty"` +} + +// for GetObjectTagging return value +type GetObjectTaggingResult Tagging + +// VersioningConfig for the bucket +type VersioningConfig struct { + XMLName xml.Name `xml:"VersioningConfiguration"` + Status string `xml:"Status"` +} + +type GetBucketVersioningResult VersioningConfig + +// Server Encryption rule for the bucket +type ServerEncryptionRule struct { + XMLName xml.Name `xml:"ServerSideEncryptionRule"` + SSEDefault SSEDefaultRule `xml:"ApplyServerSideEncryptionByDefault"` +} + +// Server Encryption deafult rule for the bucket +type SSEDefaultRule struct { + XMLName xml.Name `xml:"ApplyServerSideEncryptionByDefault"` + SSEAlgorithm string `xml:"SSEAlgorithm,omitempty"` + KMSMasterKeyID string `xml:"KMSMasterKeyID,omitempty"` + KMSDataEncryption string `xml:"KMSDataEncryption,,omitempty"` +} + +type GetBucketEncryptionResult ServerEncryptionRule +type GetBucketTaggingResult Tagging + +type BucketStat struct { + XMLName xml.Name `xml:"BucketStat"` + Storage int64 `xml:"Storage"` + ObjectCount int64 `xml:"ObjectCount"` + MultipartUploadCount int64 `xml:"MultipartUploadCount"` +} +type GetBucketStatResult BucketStat + +// RequestPaymentConfiguration define the request payment configuration +type RequestPaymentConfiguration struct { + XMLName xml.Name `xml:"RequestPaymentConfiguration"` + Payer string `xml:"Payer,omitempty"` +} + +// BucketQoSConfiguration define QoS configuration +type BucketQoSConfiguration struct { + XMLName xml.Name `xml:"QoSConfiguration"` + TotalUploadBandwidth *int `xml:"TotalUploadBandwidth"` // Total upload bandwidth + IntranetUploadBandwidth *int `xml:"IntranetUploadBandwidth"` // Intranet upload bandwidth + ExtranetUploadBandwidth *int `xml:"ExtranetUploadBandwidth"` // Extranet upload bandwidth + TotalDownloadBandwidth *int `xml:"TotalDownloadBandwidth"` // Total download bandwidth + IntranetDownloadBandwidth *int `xml:"IntranetDownloadBandwidth"` // Intranet download bandwidth + ExtranetDownloadBandwidth *int `xml:"ExtranetDownloadBandwidth"` // Extranet download bandwidth + TotalQPS *int `xml:"TotalQps"` // Total Qps + IntranetQPS *int `xml:"IntranetQps"` // Intranet Qps + ExtranetQPS *int `xml:"ExtranetQps"` // Extranet Qps +} + +// UserQoSConfiguration define QoS and Range configuration +type UserQoSConfiguration struct { + XMLName xml.Name `xml:"QoSConfiguration"` + Region string `xml:"Region,omitempty"` // Effective area of Qos configuration + BucketQoSConfiguration +} + +////////////////////////////////////////////////////////////// +/////////////////// Select OBject //////////////////////////// +////////////////////////////////////////////////////////////// + +type CsvMetaRequest struct { + XMLName xml.Name `xml:"CsvMetaRequest"` + InputSerialization InputSerialization `xml:"InputSerialization"` + OverwriteIfExists *bool `xml:"OverwriteIfExists,omitempty"` +} + +// encodeBase64 encode base64 of the CreateSelectObjectMeta api request params +func (meta *CsvMetaRequest) encodeBase64() { + meta.InputSerialization.CSV.RecordDelimiter = + base64.StdEncoding.EncodeToString([]byte(meta.InputSerialization.CSV.RecordDelimiter)) + meta.InputSerialization.CSV.FieldDelimiter = + base64.StdEncoding.EncodeToString([]byte(meta.InputSerialization.CSV.FieldDelimiter)) + meta.InputSerialization.CSV.QuoteCharacter = + base64.StdEncoding.EncodeToString([]byte(meta.InputSerialization.CSV.QuoteCharacter)) +} + +type JsonMetaRequest struct { + XMLName xml.Name `xml:"JsonMetaRequest"` + InputSerialization InputSerialization `xml:"InputSerialization"` + OverwriteIfExists *bool `xml:"OverwriteIfExists,omitempty"` +} + +type InputSerialization struct { + XMLName xml.Name `xml:"InputSerialization"` + CSV CSV `xml:CSV,omitempty` + JSON JSON `xml:JSON,omitempty` + CompressionType string `xml:"CompressionType,omitempty"` +} +type CSV struct { + XMLName xml.Name `xml:"CSV"` + RecordDelimiter string `xml:"RecordDelimiter,omitempty"` + FieldDelimiter string `xml:"FieldDelimiter,omitempty"` + QuoteCharacter string `xml:"QuoteCharacter,omitempty"` +} + +type JSON struct { + XMLName xml.Name `xml:"JSON"` + JSONType string `xml:"Type,omitempty"` +} + +// SelectRequest is for the SelectObject request params of json file +type SelectRequest struct { + XMLName xml.Name `xml:"SelectRequest"` + Expression string `xml:"Expression"` + InputSerializationSelect InputSerializationSelect `xml:"InputSerialization"` + OutputSerializationSelect OutputSerializationSelect `xml:"OutputSerialization"` + SelectOptions SelectOptions `xml:"Options,omitempty"` +} +type InputSerializationSelect struct { + XMLName xml.Name `xml:"InputSerialization"` + CsvBodyInput CSVSelectInput `xml:CSV,omitempty` + JsonBodyInput JSONSelectInput `xml:JSON,omitempty` + CompressionType string `xml:"CompressionType,omitempty"` +} +type CSVSelectInput struct { + XMLName xml.Name `xml:"CSV"` + FileHeaderInfo string `xml:"FileHeaderInfo,omitempty"` + RecordDelimiter string `xml:"RecordDelimiter,omitempty"` + FieldDelimiter string `xml:"FieldDelimiter,omitempty"` + QuoteCharacter string `xml:"QuoteCharacter,omitempty"` + CommentCharacter string `xml:"CommentCharacter,omitempty"` + Range string `xml:"Range,omitempty"` + SplitRange string +} +type JSONSelectInput struct { + XMLName xml.Name `xml:"JSON"` + JSONType string `xml:"Type,omitempty"` + Range string `xml:"Range,omitempty"` + ParseJSONNumberAsString *bool `xml:"ParseJsonNumberAsString"` + SplitRange string +} + +func (jsonInput *JSONSelectInput) JsonIsEmpty() bool { + if jsonInput.JSONType != "" { + return false + } + return true +} + +type OutputSerializationSelect struct { + XMLName xml.Name `xml:"OutputSerialization"` + CsvBodyOutput CSVSelectOutput `xml:CSV,omitempty` + JsonBodyOutput JSONSelectOutput `xml:JSON,omitempty` + OutputRawData *bool `xml:"OutputRawData,omitempty"` + KeepAllColumns *bool `xml:"KeepAllColumns,omitempty"` + EnablePayloadCrc *bool `xml:"EnablePayloadCrc,omitempty"` + OutputHeader *bool `xml:"OutputHeader,omitempty"` +} +type CSVSelectOutput struct { + XMLName xml.Name `xml:"CSV"` + RecordDelimiter string `xml:"RecordDelimiter,omitempty"` + FieldDelimiter string `xml:"FieldDelimiter,omitempty"` +} +type JSONSelectOutput struct { + XMLName xml.Name `xml:"JSON"` + RecordDelimiter string `xml:"RecordDelimiter,omitempty"` +} + +func (selectReq *SelectRequest) encodeBase64() { + if selectReq.InputSerializationSelect.JsonBodyInput.JsonIsEmpty() { + selectReq.csvEncodeBase64() + } else { + selectReq.jsonEncodeBase64() + } +} + +// csvEncodeBase64 encode base64 of the SelectObject api request params +func (selectReq *SelectRequest) csvEncodeBase64() { + selectReq.Expression = base64.StdEncoding.EncodeToString([]byte(selectReq.Expression)) + selectReq.InputSerializationSelect.CsvBodyInput.RecordDelimiter = + base64.StdEncoding.EncodeToString([]byte(selectReq.InputSerializationSelect.CsvBodyInput.RecordDelimiter)) + selectReq.InputSerializationSelect.CsvBodyInput.FieldDelimiter = + base64.StdEncoding.EncodeToString([]byte(selectReq.InputSerializationSelect.CsvBodyInput.FieldDelimiter)) + selectReq.InputSerializationSelect.CsvBodyInput.QuoteCharacter = + base64.StdEncoding.EncodeToString([]byte(selectReq.InputSerializationSelect.CsvBodyInput.QuoteCharacter)) + selectReq.InputSerializationSelect.CsvBodyInput.CommentCharacter = + base64.StdEncoding.EncodeToString([]byte(selectReq.InputSerializationSelect.CsvBodyInput.CommentCharacter)) + selectReq.OutputSerializationSelect.CsvBodyOutput.FieldDelimiter = + base64.StdEncoding.EncodeToString([]byte(selectReq.OutputSerializationSelect.CsvBodyOutput.FieldDelimiter)) + selectReq.OutputSerializationSelect.CsvBodyOutput.RecordDelimiter = + base64.StdEncoding.EncodeToString([]byte(selectReq.OutputSerializationSelect.CsvBodyOutput.RecordDelimiter)) + + // handle Range + if selectReq.InputSerializationSelect.CsvBodyInput.Range != "" { + selectReq.InputSerializationSelect.CsvBodyInput.Range = "line-range=" + selectReq.InputSerializationSelect.CsvBodyInput.Range + } + + if selectReq.InputSerializationSelect.CsvBodyInput.SplitRange != "" { + selectReq.InputSerializationSelect.CsvBodyInput.Range = "split-range=" + selectReq.InputSerializationSelect.CsvBodyInput.SplitRange + } +} + +// jsonEncodeBase64 encode base64 of the SelectObject api request params +func (selectReq *SelectRequest) jsonEncodeBase64() { + selectReq.Expression = base64.StdEncoding.EncodeToString([]byte(selectReq.Expression)) + selectReq.OutputSerializationSelect.JsonBodyOutput.RecordDelimiter = + base64.StdEncoding.EncodeToString([]byte(selectReq.OutputSerializationSelect.JsonBodyOutput.RecordDelimiter)) + + // handle Range + if selectReq.InputSerializationSelect.JsonBodyInput.Range != "" { + selectReq.InputSerializationSelect.JsonBodyInput.Range = "line-range=" + selectReq.InputSerializationSelect.JsonBodyInput.Range + } + + if selectReq.InputSerializationSelect.JsonBodyInput.SplitRange != "" { + selectReq.InputSerializationSelect.JsonBodyInput.Range = "split-range=" + selectReq.InputSerializationSelect.JsonBodyInput.SplitRange + } +} + +// CsvOptions is a element in the SelectObject api request's params +type SelectOptions struct { + XMLName xml.Name `xml:"Options"` + SkipPartialDataRecord *bool `xml:"SkipPartialDataRecord,omitempty"` + MaxSkippedRecordsAllowed string `xml:"MaxSkippedRecordsAllowed,omitempty"` +} + +// SelectObjectResult is the SelectObject api's return +type SelectObjectResult struct { + Version byte + FrameType int32 + PayloadLength int32 + HeaderCheckSum uint32 + Offset uint64 + Data string // DataFrame + EndFrame EndFrame // EndFrame + MetaEndFrameCSV MetaEndFrameCSV // MetaEndFrameCSV + MetaEndFrameJSON MetaEndFrameJSON // MetaEndFrameJSON + PayloadChecksum uint32 + ReadFlagInfo +} + +// ReadFlagInfo if reading the frame data, recode the reading status +type ReadFlagInfo struct { + OpenLine bool + ConsumedBytesLength int32 + EnablePayloadCrc bool + OutputRawData bool +} + +// EndFrame is EndFrameType of SelectObject api +type EndFrame struct { + TotalScanned int64 + HTTPStatusCode int32 + ErrorMsg string +} + +// MetaEndFrameCSV is MetaEndFrameCSVType of CreateSelectObjectMeta +type MetaEndFrameCSV struct { + TotalScanned int64 + Status int32 + SplitsCount int32 + RowsCount int64 + ColumnsCount int32 + ErrorMsg string +} + +// MetaEndFrameJSON is MetaEndFrameJSON of CreateSelectObjectMeta +type MetaEndFrameJSON struct { + TotalScanned int64 + Status int32 + SplitsCount int32 + RowsCount int64 + ErrorMsg string +} + +// InventoryConfiguration is Inventory config +type InventoryConfiguration struct { + XMLName xml.Name `xml:"InventoryConfiguration"` + Id string `xml:"Id,omitempty"` + IsEnabled *bool `xml:"IsEnabled,omitempty"` + Prefix string `xml:"Filter>Prefix,omitempty"` + OSSBucketDestination OSSBucketDestination `xml:"Destination>OSSBucketDestination,omitempty"` + Frequency string `xml:"Schedule>Frequency,omitempty"` + IncludedObjectVersions string `xml:"IncludedObjectVersions,omitempty"` + OptionalFields OptionalFields `xml:OptionalFields,omitempty` +} + +type OptionalFields struct { + XMLName xml.Name `xml:"OptionalFields,omitempty` + Field []string `xml:"Field,omitempty` +} + +type OSSBucketDestination struct { + XMLName xml.Name `xml:"OSSBucketDestination"` + Format string `xml:"Format,omitempty"` + AccountId string `xml:"AccountId,omitempty"` + RoleArn string `xml:"RoleArn,omitempty"` + Bucket string `xml:"Bucket,omitempty"` + Prefix string `xml:"Prefix,omitempty"` + Encryption *InvEncryption `xml:"Encryption,omitempty"` +} + +type InvEncryption struct { + XMLName xml.Name `xml:"Encryption"` + SseOss *InvSseOss `xml:"SSE-OSS"` + SseKms *InvSseKms `xml:"SSE-KMS"` +} + +type InvSseOss struct { + XMLName xml.Name `xml:"SSE-OSS"` +} + +type InvSseKms struct { + XMLName xml.Name `xml:"SSE-KMS"` + KmsId string `xml:"KeyId,omitempty"` +} + +type ListInventoryConfigurationsResult struct { + XMLName xml.Name `xml:"ListInventoryConfigurationsResult"` + InventoryConfiguration []InventoryConfiguration `xml:"InventoryConfiguration,omitempty` + IsTruncated *bool `xml:"IsTruncated,omitempty"` + NextContinuationToken string `xml:"NextContinuationToken,omitempty"` +} + +// RestoreConfiguration for RestoreObject +type RestoreConfiguration struct { + XMLName xml.Name `xml:"RestoreRequest"` + Days int32 `xml:"Days,omitempty"` + Tier string `xml:"JobParameters>Tier,omitempty"` +} + +// AsyncFetchTaskConfiguration for SetBucketAsyncFetchTask +type AsyncFetchTaskConfiguration struct { + XMLName xml.Name `xml:"AsyncFetchTaskConfiguration"` + Url string `xml:"Url,omitempty"` + Object string `xml:"Object,omitempty"` + Host string `xml:"Host,omitempty"` + ContentMD5 string `xml:"ContentMD5,omitempty"` + Callback string `xml:"Callback,omitempty"` + StorageClass string `xml:"StorageClass,omitempty"` + IgnoreSameKey bool `xml:"IgnoreSameKey"` +} + +// AsyncFetchTaskResult for SetBucketAsyncFetchTask result +type AsyncFetchTaskResult struct { + XMLName xml.Name `xml:"AsyncFetchTaskResult"` + TaskId string `xml:"TaskId,omitempty"` +} + +// AsynFetchTaskInfo for GetBucketAsyncFetchTask result +type AsynFetchTaskInfo struct { + XMLName xml.Name `xml:"AsyncFetchTaskInfo"` + TaskId string `xml:"TaskId,omitempty"` + State string `xml:"State,omitempty"` + ErrorMsg string `xml:"ErrorMsg,omitempty"` + TaskInfo AsyncTaskInfo `xml:"TaskInfo,omitempty"` +} + +// AsyncTaskInfo for async task information +type AsyncTaskInfo struct { + XMLName xml.Name `xml:"TaskInfo"` + Url string `xml:"Url,omitempty"` + Object string `xml:"Object,omitempty"` + Host string `xml:"Host,omitempty"` + ContentMD5 string `xml:"ContentMD5,omitempty"` + Callback string `xml:"Callback,omitempty"` + StorageClass string `xml:"StorageClass,omitempty"` + IgnoreSameKey bool `xml:"IgnoreSameKey"` +} + +// InitiateWormConfiguration define InitiateBucketWorm configuration +type InitiateWormConfiguration struct { + XMLName xml.Name `xml:"InitiateWormConfiguration"` + RetentionPeriodInDays int `xml:"RetentionPeriodInDays"` // specify retention days +} + +// ExtendWormConfiguration define ExtendWormConfiguration configuration +type ExtendWormConfiguration struct { + XMLName xml.Name `xml:"ExtendWormConfiguration"` + RetentionPeriodInDays int `xml:"RetentionPeriodInDays"` // specify retention days +} + +// WormConfiguration define WormConfiguration +type WormConfiguration struct { + XMLName xml.Name `xml:"WormConfiguration"` + WormId string `xml:"WormId,omitempty"` + State string `xml:"State,omitempty"` + RetentionPeriodInDays int `xml:"RetentionPeriodInDays"` // specify retention days + CreationDate string `xml:"CreationDate,omitempty"` +} + +// TransferAccConfiguration define transfer acceleration configuration +type TransferAccConfiguration struct { + XMLName xml.Name `xml:"TransferAccelerationConfiguration"` + Enabled bool `xml:"Enabled"` +} diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/upload.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/upload.go index 049ed82d9..8b3ea09d2 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/upload.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/upload.go @@ -3,63 +3,89 @@ package oss import ( "crypto/md5" "encoding/base64" + "encoding/hex" "encoding/json" "errors" + "fmt" "io/ioutil" + "net/http" "os" + "path/filepath" "time" ) +// UploadFile is multipart file upload. // -// UploadFile 分片上传文件 +// objectKey the object name. +// filePath the local file path to upload. +// partSize the part size in byte. +// options the options for uploading object. // -// objectKey object名称。 -// filePath 本地文件。需要上传的文件。 -// partSize 本次上传文件片的大小,字节数。比如100 * 1024为每片100KB。 -// options 上传Object时可以指定Object的属性。详见InitiateMultipartUpload。 -// -// error 操作成功为nil,非nil为错误信息。 +// error it's nil if the operation succeeds, otherwise it's an error object. // func (bucket Bucket) UploadFile(objectKey, filePath string, partSize int64, options ...Option) error { if partSize < MinPartSize || partSize > MaxPartSize { - return errors.New("oss: part size invalid range (1024KB, 5GB]") - } - - cpConf, err := getCpConfig(options, filePath) - if err != nil { - return err + return errors.New("oss: part size invalid range (100KB, 5GB]") } + cpConf := getCpConfig(options) routines := getRoutines(options) - if cpConf.IsEnable { - return bucket.uploadFileWithCp(objectKey, filePath, partSize, options, cpConf.FilePath, routines) + if cpConf != nil && cpConf.IsEnable { + cpFilePath := getUploadCpFilePath(cpConf, filePath, bucket.BucketName, objectKey) + if cpFilePath != "" { + return bucket.uploadFileWithCp(objectKey, filePath, partSize, options, cpFilePath, routines) + } } return bucket.uploadFile(objectKey, filePath, partSize, options, routines) } -// ----- 并发无断点的上传 ----- - -// 获取Checkpoint配置 -func getCpConfig(options []Option, filePath string) (*cpConfig, error) { - cpc := &cpConfig{} - cpcOpt, err := findOption(options, checkpointConfig, nil) - if err != nil || cpcOpt == nil { - return cpc, err +func getUploadCpFilePath(cpConf *cpConfig, srcFile, destBucket, destObject string) string { + if cpConf.FilePath == "" && cpConf.DirPath != "" { + dest := fmt.Sprintf("oss://%v/%v", destBucket, destObject) + absPath, _ := filepath.Abs(srcFile) + cpFileName := getCpFileName(absPath, dest, "") + cpConf.FilePath = cpConf.DirPath + string(os.PathSeparator) + cpFileName } - - cpc = cpcOpt.(*cpConfig) - if cpc.IsEnable && cpc.FilePath == "" { - cpc.FilePath = filePath + CheckpointFileSuffix - } - - return cpc, nil + return cpConf.FilePath } -// 获取并发数,默认并发数1 +// ----- concurrent upload without checkpoint ----- + +// getCpConfig gets checkpoint configuration +func getCpConfig(options []Option) *cpConfig { + cpcOpt, err := FindOption(options, checkpointConfig, nil) + if err != nil || cpcOpt == nil { + return nil + } + + return cpcOpt.(*cpConfig) +} + +// getCpFileName return the name of the checkpoint file +func getCpFileName(src, dest, versionId string) string { + md5Ctx := md5.New() + md5Ctx.Write([]byte(src)) + srcCheckSum := hex.EncodeToString(md5Ctx.Sum(nil)) + + md5Ctx.Reset() + md5Ctx.Write([]byte(dest)) + destCheckSum := hex.EncodeToString(md5Ctx.Sum(nil)) + + if versionId == "" { + return fmt.Sprintf("%v-%v.cp", srcCheckSum, destCheckSum) + } + + md5Ctx.Reset() + md5Ctx.Write([]byte(versionId)) + versionCheckSum := hex.EncodeToString(md5Ctx.Sum(nil)) + return fmt.Sprintf("%v-%v-%v.cp", srcCheckSum, destCheckSum, versionCheckSum) +} + +// getRoutines gets the routine count. by default it's 1. func getRoutines(options []Option) int { - rtnOpt, err := findOption(options, routineNum, nil) + rtnOpt, err := FindOption(options, routineNum, nil) if err != nil || rtnOpt == nil { return 1 } @@ -74,16 +100,25 @@ func getRoutines(options []Option) int { return rs } -// 获取进度回调 -func getProgressListener(options []Option) ProgressListener { - isSet, listener, _ := isOptionSet(options, progressListener) +// getPayer return the payer of the request +func getPayer(options []Option) string { + payerOpt, err := FindOption(options, HTTPHeaderOssRequester, nil) + if err != nil || payerOpt == nil { + return "" + } + return payerOpt.(string) +} + +// GetProgressListener gets the progress callback +func GetProgressListener(options []Option) ProgressListener { + isSet, listener, _ := IsOptionSet(options, progressListener) if !isSet { return nil } return listener.(ProgressListener) } -// 测试使用 +// uploadPartHook is for testing usage type uploadPartHook func(id int, chunk FileChunk) error var uploadPartHooker uploadPartHook = defaultUploadPart @@ -92,23 +127,42 @@ func defaultUploadPart(id int, chunk FileChunk) error { return nil } -// 工作协程参数 +// workerArg defines worker argument structure type workerArg struct { bucket *Bucket filePath string imur InitiateMultipartUploadResult + options []Option hook uploadPartHook } -// 工作协程 +// worker is the worker coroutine function +type defaultUploadProgressListener struct { +} + +// ProgressChanged no-ops +func (listener *defaultUploadProgressListener) ProgressChanged(event *ProgressEvent) { +} + func worker(id int, arg workerArg, jobs <-chan FileChunk, results chan<- UploadPart, failed chan<- error, die <-chan bool) { for chunk := range jobs { if err := arg.hook(id, chunk); err != nil { failed <- err break } - part, err := arg.bucket.UploadPartFromFile(arg.imur, arg.filePath, chunk.Offset, chunk.Size, chunk.Number) + var respHeader http.Header + p := Progress(&defaultUploadProgressListener{}) + opts := make([]Option, len(arg.options)+2) + opts = append(opts, arg.options...) + + // use defaultUploadProgressListener + opts = append(opts, p, GetResponseHeader(&respHeader)) + + startT := time.Now().UnixNano() / 1000 / 1000 / 1000 + part, err := arg.bucket.UploadPartFromFile(arg.imur, arg.filePath, chunk.Offset, chunk.Size, chunk.Number, opts...) + endT := time.Now().UnixNano() / 1000 / 1000 / 1000 if err != nil { + arg.bucket.Client.Config.WriteLog(Debug, "upload part error,cost:%d second,part number:%d,request id:%s,error:%s\n", endT-startT, chunk.Number, GetRequestId(respHeader), err.Error()) failed <- err break } @@ -121,7 +175,7 @@ func worker(id int, arg workerArg, jobs <-chan FileChunk, results chan<- UploadP } } -// 调度协程 +// scheduler function func scheduler(jobs chan FileChunk, chunks []FileChunk) { for _, chunk := range chunks { jobs <- chunk @@ -137,16 +191,20 @@ func getTotalBytes(chunks []FileChunk) int64 { return tb } -// 并发上传,不带断点续传功能 +// uploadFile is a concurrent upload, without checkpoint func (bucket Bucket) uploadFile(objectKey, filePath string, partSize int64, options []Option, routines int) error { - listener := getProgressListener(options) + listener := GetProgressListener(options) chunks, err := SplitFileByPartSize(filePath, partSize) if err != nil { return err } - // 初始化上传任务 + partOptions := ChoiceTransferPartOption(options) + completeOptions := ChoiceCompletePartOption(options) + abortOptions := ChoiceAbortPartOption(options) + + // Initialize the multipart upload imur, err := bucket.InitiateMultipartUpload(objectKey, options...) if err != nil { return err @@ -159,19 +217,19 @@ func (bucket Bucket) uploadFile(objectKey, filePath string, partSize int64, opti var completedBytes int64 totalBytes := getTotalBytes(chunks) - event := newProgressEvent(TransferStartedEvent, 0, totalBytes) + event := newProgressEvent(TransferStartedEvent, 0, totalBytes, 0) publishProgress(listener, event) - // 启动工作协程 - arg := workerArg{&bucket, filePath, imur, uploadPartHooker} + // Start the worker coroutine + arg := workerArg{&bucket, filePath, imur, partOptions, uploadPartHooker} for w := 1; w <= routines; w++ { go worker(w, arg, jobs, results, failed, die) } - // 并发上传分片 + // Schedule the jobs go scheduler(jobs, chunks) - // 等待分配分片上传完成 + // Waiting for the upload finished completed := 0 parts := make([]UploadPart, len(chunks)) for completed < len(chunks) { @@ -180,13 +238,16 @@ func (bucket Bucket) uploadFile(objectKey, filePath string, partSize int64, opti completed++ parts[part.PartNumber-1] = part completedBytes += chunks[part.PartNumber-1].Size - event = newProgressEvent(TransferDataEvent, completedBytes, totalBytes) + + // why RwBytes in ProgressEvent is 0 ? + // because read or write event has been notified in teeReader.Read() + event = newProgressEvent(TransferDataEvent, completedBytes, totalBytes, chunks[part.PartNumber-1].Size) publishProgress(listener, event) case err := <-failed: close(die) - event = newProgressEvent(TransferFailedEvent, completedBytes, totalBytes) + event = newProgressEvent(TransferFailedEvent, completedBytes, totalBytes, 0) publishProgress(listener, event) - bucket.AbortMultipartUpload(imur) + bucket.AbortMultipartUpload(imur, abortOptions...) return err } @@ -195,46 +256,46 @@ func (bucket Bucket) uploadFile(objectKey, filePath string, partSize int64, opti } } - event = newProgressEvent(TransferStartedEvent, completedBytes, totalBytes) + event = newProgressEvent(TransferStartedEvent, completedBytes, totalBytes, 0) publishProgress(listener, event) - // 提交任务 - _, err = bucket.CompleteMultipartUpload(imur, parts) + // Complete the multpart upload + _, err = bucket.CompleteMultipartUpload(imur, parts, completeOptions...) if err != nil { - bucket.AbortMultipartUpload(imur) + bucket.AbortMultipartUpload(imur, abortOptions...) return err } return nil } -// ----- 并发带断点的上传 ----- +// ----- concurrent upload with checkpoint ----- const uploadCpMagic = "FE8BB4EA-B593-4FAC-AD7A-2459A36E2E62" type uploadCheckpoint struct { - Magic string // magic - MD5 string // cp内容的MD5 - FilePath string // 本地文件 - FileStat cpStat // 文件状态 - ObjectKey string // key - UploadID string // upload id - Parts []cpPart // 本地文件的全部分片 + Magic string // Magic + MD5 string // Checkpoint file content's MD5 + FilePath string // Local file path + FileStat cpStat // File state + ObjectKey string // Key + UploadID string // Upload ID + Parts []cpPart // All parts of the local file } type cpStat struct { - Size int64 // 文件大小 - LastModified time.Time // 本地文件最后修改时间 - MD5 string // 本地文件MD5 + Size int64 // File size + LastModified time.Time // File's last modified time + MD5 string // Local file's MD5 } type cpPart struct { - Chunk FileChunk // 分片 - Part UploadPart // 上传完成的分片 - IsCompleted bool // upload是否完成 + Chunk FileChunk // File chunk + Part UploadPart // Uploaded part + IsCompleted bool // Upload complete flag } -// CP数据是否有效,CP有效且文件没有更新时有效 +// isValid checks if the uploaded data is valid---it's valid when the file is not updated and the checkpoint data is valid. func (cp uploadCheckpoint) isValid(filePath string) (bool, error) { - // 比较CP的Magic及MD5 + // Compare the CP's magic number and MD5. cpb := cp cpb.MD5 = "" js, _ := json.Marshal(cpb) @@ -245,7 +306,7 @@ func (cp uploadCheckpoint) isValid(filePath string) (bool, error) { return false, nil } - // 确认本地文件是否更新 + // Make sure if the local file is updated. fd, err := os.Open(filePath) if err != nil { return false, err @@ -262,9 +323,9 @@ func (cp uploadCheckpoint) isValid(filePath string) (bool, error) { return false, err } - // 比较文件大小/文件最后更新时间/文件MD5 + // Compare the file size, file's last modified time and file's MD5 if cp.FileStat.Size != st.Size() || - cp.FileStat.LastModified != st.ModTime() || + !cp.FileStat.LastModified.Equal(st.ModTime()) || cp.FileStat.MD5 != md { return false, nil } @@ -272,7 +333,7 @@ func (cp uploadCheckpoint) isValid(filePath string) (bool, error) { return true, nil } -// 从文件中load +// load loads from the file func (cp *uploadCheckpoint) load(filePath string) error { contents, err := ioutil.ReadFile(filePath) if err != nil { @@ -283,11 +344,11 @@ func (cp *uploadCheckpoint) load(filePath string) error { return err } -// dump到文件 +// dump dumps to the local file func (cp *uploadCheckpoint) dump(filePath string) error { bcp := *cp - // 计算MD5 + // Calculate MD5 bcp.MD5 = "" js, err := json.Marshal(bcp) if err != nil { @@ -297,23 +358,23 @@ func (cp *uploadCheckpoint) dump(filePath string) error { b64 := base64.StdEncoding.EncodeToString(sum[:]) bcp.MD5 = b64 - // 序列化 + // Serialization js, err = json.Marshal(bcp) if err != nil { return err } - // dump + // Dump return ioutil.WriteFile(filePath, js, FilePermMode) } -// 更新分片状态 +// updatePart updates the part status func (cp *uploadCheckpoint) updatePart(part UploadPart) { cp.Parts[part.PartNumber-1].Part = part cp.Parts[part.PartNumber-1].IsCompleted = true } -// 未完成的分片 +// todoParts returns unfinished parts func (cp *uploadCheckpoint) todoParts() []FileChunk { fcs := []FileChunk{} for _, part := range cp.Parts { @@ -324,7 +385,7 @@ func (cp *uploadCheckpoint) todoParts() []FileChunk { return fcs } -// 所有的分片 +// allParts returns all parts func (cp *uploadCheckpoint) allParts() []UploadPart { ps := []UploadPart{} for _, part := range cp.Parts { @@ -333,7 +394,7 @@ func (cp *uploadCheckpoint) allParts() []UploadPart { return ps } -// 完成的字节数 +// getCompletedBytes returns completed bytes count func (cp *uploadCheckpoint) getCompletedBytes() int64 { var completedBytes int64 for _, part := range cp.Parts { @@ -344,19 +405,19 @@ func (cp *uploadCheckpoint) getCompletedBytes() int64 { return completedBytes } -// 计算文件文件MD5 +// calcFileMD5 calculates the MD5 for the specified local file func calcFileMD5(filePath string) (string, error) { return "", nil } -// 初始化分片上传 +// prepare initializes the multipart upload func prepare(cp *uploadCheckpoint, objectKey, filePath string, partSize int64, bucket *Bucket, options []Option) error { - // cp + // CP cp.Magic = uploadCpMagic cp.FilePath = filePath cp.ObjectKey = objectKey - // localfile + // Local file fd, err := os.Open(filePath) if err != nil { return err @@ -375,7 +436,7 @@ func prepare(cp *uploadCheckpoint, objectKey, filePath string, partSize int64, b } cp.FileStat.MD5 = md - // chunks + // Chunks parts, err := SplitFileByPartSize(filePath, partSize) if err != nil { return err @@ -387,7 +448,7 @@ func prepare(cp *uploadCheckpoint, objectKey, filePath string, partSize int64, b cp.Parts[i].IsCompleted = false } - // init load + // Init load imur, err := bucket.InitiateMultipartUpload(objectKey, options...) if err != nil { return err @@ -397,11 +458,11 @@ func prepare(cp *uploadCheckpoint, objectKey, filePath string, partSize int64, b return nil } -// 提交分片上传,删除CP文件 -func complete(cp *uploadCheckpoint, bucket *Bucket, parts []UploadPart, cpFilePath string) error { +// complete completes the multipart upload and deletes the local CP files +func complete(cp *uploadCheckpoint, bucket *Bucket, parts []UploadPart, cpFilePath string, options []Option) error { imur := InitiateMultipartUploadResult{Bucket: bucket.BucketName, Key: cp.ObjectKey, UploadID: cp.UploadID} - _, err := bucket.CompleteMultipartUpload(imur, parts) + _, err := bucket.CompleteMultipartUpload(imur, parts, options...) if err != nil { return err } @@ -409,18 +470,21 @@ func complete(cp *uploadCheckpoint, bucket *Bucket, parts []UploadPart, cpFilePa return err } -// 并发带断点的上传 +// uploadFileWithCp handles concurrent upload with checkpoint func (bucket Bucket) uploadFileWithCp(objectKey, filePath string, partSize int64, options []Option, cpFilePath string, routines int) error { - listener := getProgressListener(options) + listener := GetProgressListener(options) - // LOAD CP数据 + partOptions := ChoiceTransferPartOption(options) + completeOptions := ChoiceCompletePartOption(options) + + // Load CP data ucp := uploadCheckpoint{} err := ucp.load(cpFilePath) if err != nil { os.Remove(cpFilePath) } - // LOAD出错或数据无效重新初始化上传 + // Load error or the CP data is invalid. valid, err := ucp.isValid(filePath) if err != nil || !valid { if err = prepare(&ucp, objectKey, filePath, partSize, &bucket, options); err != nil { @@ -441,19 +505,22 @@ func (bucket Bucket) uploadFileWithCp(objectKey, filePath string, partSize int64 die := make(chan bool) completedBytes := ucp.getCompletedBytes() - event := newProgressEvent(TransferStartedEvent, completedBytes, ucp.FileStat.Size) + + // why RwBytes in ProgressEvent is 0 ? + // because read or write event has been notified in teeReader.Read() + event := newProgressEvent(TransferStartedEvent, completedBytes, ucp.FileStat.Size, 0) publishProgress(listener, event) - // 启动工作协程 - arg := workerArg{&bucket, filePath, imur, uploadPartHooker} + // Start the workers + arg := workerArg{&bucket, filePath, imur, partOptions, uploadPartHooker} for w := 1; w <= routines; w++ { go worker(w, arg, jobs, results, failed, die) } - // 并发上传分片 + // Schedule jobs go scheduler(jobs, chunks) - // 等待分配分片上传完成 + // Waiting for the job finished completed := 0 for completed < len(chunks) { select { @@ -462,11 +529,11 @@ func (bucket Bucket) uploadFileWithCp(objectKey, filePath string, partSize int64 ucp.updatePart(part) ucp.dump(cpFilePath) completedBytes += ucp.Parts[part.PartNumber-1].Chunk.Size - event = newProgressEvent(TransferDataEvent, completedBytes, ucp.FileStat.Size) + event = newProgressEvent(TransferDataEvent, completedBytes, ucp.FileStat.Size, ucp.Parts[part.PartNumber-1].Chunk.Size) publishProgress(listener, event) case err := <-failed: close(die) - event = newProgressEvent(TransferFailedEvent, completedBytes, ucp.FileStat.Size) + event = newProgressEvent(TransferFailedEvent, completedBytes, ucp.FileStat.Size, 0) publishProgress(listener, event) return err } @@ -476,10 +543,10 @@ func (bucket Bucket) uploadFileWithCp(objectKey, filePath string, partSize int64 } } - event = newProgressEvent(TransferCompletedEvent, completedBytes, ucp.FileStat.Size) + event = newProgressEvent(TransferCompletedEvent, completedBytes, ucp.FileStat.Size, 0) publishProgress(listener, event) - // 提交分片上传 - err = complete(&ucp, &bucket, ucp.allParts(), cpFilePath) + // Complete the multipart upload + err = complete(&ucp, &bucket, ucp.allParts(), cpFilePath, completeOptions) return err } diff --git a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/utils.go b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/utils.go index b4d8e1694..78b791300 100644 --- a/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/utils.go +++ b/vendor/github.com/aliyun/aliyun-oss-go-sdk/oss/utils.go @@ -4,48 +4,179 @@ import ( "bytes" "errors" "fmt" + "hash/crc32" "hash/crc64" + "io" "net/http" "os" "os/exec" "runtime" + "strconv" + "strings" "time" ) -// Get User Agent -// Go sdk相关信息,包括sdk版本,操作系统类型,GO版本 -var userAgent = func() string { +var sys_name string +var sys_release string +var sys_machine string + +func init() { + sys_name = runtime.GOOS + sys_release = "-" + sys_machine = runtime.GOARCH + + if out, err := exec.Command("uname", "-s").CombinedOutput(); err == nil { + sys_name = string(bytes.TrimSpace(out)) + } + if out, err := exec.Command("uname", "-r").CombinedOutput(); err == nil { + sys_release = string(bytes.TrimSpace(out)) + } + if out, err := exec.Command("uname", "-m").CombinedOutput(); err == nil { + sys_machine = string(bytes.TrimSpace(out)) + } +} + +// userAgent gets user agent +// It has the SDK version information, OS information and GO version +func userAgent() string { sys := getSysInfo() return fmt.Sprintf("aliyun-sdk-go/%s (%s/%s/%s;%s)", Version, sys.name, sys.release, sys.machine, runtime.Version()) -}() - -type sysInfo struct { - name string // 操作系统名称windows/Linux - release string // 操作系统版本 2.6.32-220.23.2.ali1089.el5.x86_64等 - machine string // 机器类型amd64/x86_64 } -// Get system info -// 获取操作系统信息、机器类型 +type sysInfo struct { + name string // OS name such as windows/Linux + release string // OS version 2.6.32-220.23.2.ali1089.el5.x86_64 etc + machine string // CPU type amd64/x86_64 +} + +// getSysInfo gets system info +// gets the OS information and CPU type func getSysInfo() sysInfo { - name := runtime.GOOS - release := "-" - machine := runtime.GOARCH - if out, err := exec.Command("uname", "-s").CombinedOutput(); err == nil { - name = string(bytes.TrimSpace(out)) + return sysInfo{name: sys_name, release: sys_release, machine: sys_machine} +} + +// GetRangeConfig gets the download range from the options. +func GetRangeConfig(options []Option) (*UnpackedRange, error) { + rangeOpt, err := FindOption(options, HTTPHeaderRange, nil) + if err != nil || rangeOpt == nil { + return nil, err } - if out, err := exec.Command("uname", "-r").CombinedOutput(); err == nil { - release = string(bytes.TrimSpace(out)) + return ParseRange(rangeOpt.(string)) +} + +// UnpackedRange +type UnpackedRange struct { + HasStart bool // Flag indicates if the start point is specified + HasEnd bool // Flag indicates if the end point is specified + Start int64 // Start point + End int64 // End point +} + +// InvalidRangeError returns invalid range error +func InvalidRangeError(r string) error { + return fmt.Errorf("InvalidRange %s", r) +} + +func GetRangeString(unpackRange UnpackedRange) string { + var strRange string + if unpackRange.HasStart && unpackRange.HasEnd { + strRange = fmt.Sprintf("%d-%d", unpackRange.Start, unpackRange.End) + } else if unpackRange.HasStart { + strRange = fmt.Sprintf("%d-", unpackRange.Start) + } else if unpackRange.HasEnd { + strRange = fmt.Sprintf("-%d", unpackRange.End) } - if out, err := exec.Command("uname", "-m").CombinedOutput(); err == nil { - machine = string(bytes.TrimSpace(out)) + return strRange +} + +// ParseRange parse various styles of range such as bytes=M-N +func ParseRange(normalizedRange string) (*UnpackedRange, error) { + var err error + hasStart := false + hasEnd := false + var start int64 + var end int64 + + // Bytes==M-N or ranges=M-N + nrSlice := strings.Split(normalizedRange, "=") + if len(nrSlice) != 2 || nrSlice[0] != "bytes" { + return nil, InvalidRangeError(normalizedRange) } - return sysInfo{name: name, release: release, machine: machine} + + // Bytes=M-N,X-Y + rSlice := strings.Split(nrSlice[1], ",") + rStr := rSlice[0] + + if strings.HasSuffix(rStr, "-") { // M- + startStr := rStr[:len(rStr)-1] + start, err = strconv.ParseInt(startStr, 10, 64) + if err != nil { + return nil, InvalidRangeError(normalizedRange) + } + hasStart = true + } else if strings.HasPrefix(rStr, "-") { // -N + len := rStr[1:] + end, err = strconv.ParseInt(len, 10, 64) + if err != nil { + return nil, InvalidRangeError(normalizedRange) + } + if end == 0 { // -0 + return nil, InvalidRangeError(normalizedRange) + } + hasEnd = true + } else { // M-N + valSlice := strings.Split(rStr, "-") + if len(valSlice) != 2 { + return nil, InvalidRangeError(normalizedRange) + } + start, err = strconv.ParseInt(valSlice[0], 10, 64) + if err != nil { + return nil, InvalidRangeError(normalizedRange) + } + hasStart = true + end, err = strconv.ParseInt(valSlice[1], 10, 64) + if err != nil { + return nil, InvalidRangeError(normalizedRange) + } + hasEnd = true + } + + return &UnpackedRange{hasStart, hasEnd, start, end}, nil +} + +// AdjustRange returns adjusted range, adjust the range according to the length of the file +func AdjustRange(ur *UnpackedRange, size int64) (start, end int64) { + if ur == nil { + return 0, size + } + + if ur.HasStart && ur.HasEnd { + start = ur.Start + end = ur.End + 1 + if ur.Start < 0 || ur.Start >= size || ur.End > size || ur.Start > ur.End { + start = 0 + end = size + } + } else if ur.HasStart { + start = ur.Start + end = size + if ur.Start < 0 || ur.Start >= size { + start = 0 + } + } else if ur.HasEnd { + start = size - ur.End + end = size + if ur.End < 0 || ur.End > size { + start = 0 + end = size + } + } + return } // GetNowSec returns Unix time, the number of seconds elapsed since January 1, 1970 UTC. -// 获取当前时间,从UTC开始的秒数。 +// gets the current time in Unix time, in seconds. func GetNowSec() int64 { return time.Now().Unix() } @@ -54,25 +185,25 @@ func GetNowSec() int64 { // since January 1, 1970 UTC. The result is undefined if the Unix time // in nanoseconds cannot be represented by an int64. Note that this // means the result of calling UnixNano on the zero Time is undefined. -// 获取当前时间,从UTC开始的纳秒。 +// gets the current time in Unix time, in nanoseconds. func GetNowNanoSec() int64 { return time.Now().UnixNano() } -// GetNowGMT 获取当前时间,格式形如"Mon, 02 Jan 2006 15:04:05 GMT",HTTP中使用的时间格式 +// GetNowGMT gets the current time in GMT format. func GetNowGMT() string { return time.Now().UTC().Format(http.TimeFormat) } -// FileChunk 文件片定义 +// FileChunk is the file chunk definition type FileChunk struct { - Number int // 块序号 - Offset int64 // 块在文件中的偏移量 - Size int64 // 块大小 + Number int // Chunk number + Offset int64 // Chunk offset + Size int64 // Chunk size. } -// SplitFileByPartNum Split big file to part by the num of part -// 按指定的块数分割文件。返回值FileChunk为分割结果,error为nil时有效。 +// SplitFileByPartNum splits big file into parts by the num of parts. +// Split the file with specified parts count, returns the split result when error is nil. func SplitFileByPartNum(fileName string, chunkNum int) ([]FileChunk, error) { if chunkNum <= 0 || chunkNum > 10000 { return nil, errors.New("chunkNum invalid") @@ -110,8 +241,8 @@ func SplitFileByPartNum(fileName string, chunkNum int) ([]FileChunk, error) { return chunks, nil } -// SplitFileByPartSize Split big file to part by the size of part -// 按块大小分割文件。返回值FileChunk为分割结果,error为nil时有效。 +// SplitFileByPartSize splits big file into parts by the size of parts. +// Splits the file by the part size. Returns the FileChunk when error is nil. func SplitFileByPartSize(fileName string, chunkSize int64) ([]FileChunk, error) { if chunkSize <= 0 { return nil, errors.New("chunkSize invalid") @@ -129,7 +260,7 @@ func SplitFileByPartSize(fileName string, chunkSize int64) ([]FileChunk, error) } var chunkN = stat.Size() / chunkSize if chunkN >= 10000 { - return nil, errors.New("Too many parts, please increase part size.") + return nil, errors.New("Too many parts, please increase part size") } var chunks []FileChunk @@ -151,7 +282,7 @@ func SplitFileByPartSize(fileName string, chunkSize int64) ([]FileChunk, error) return chunks, nil } -// GetPartEnd 计算结束位置 +// GetPartEnd calculates the end position func GetPartEnd(begin int64, total int64, per int64) int64 { if begin+per > total { return total - 1 @@ -159,7 +290,233 @@ func GetPartEnd(begin int64, total int64, per int64) int64 { return begin + per - 1 } -// crcTable returns the Table constructed from the specified polynomial -var crcTable = func() *crc64.Table { +// CrcTable returns the table constructed from the specified polynomial +var CrcTable = func() *crc64.Table { return crc64.MakeTable(crc64.ECMA) } + +// CrcTable returns the table constructed from the specified polynomial +var crc32Table = func() *crc32.Table { + return crc32.MakeTable(crc32.IEEE) +} + +// choiceTransferPartOption choices valid option supported by Uploadpart or DownloadPart +func ChoiceTransferPartOption(options []Option) []Option { + var outOption []Option + + listener, _ := FindOption(options, progressListener, nil) + if listener != nil { + outOption = append(outOption, Progress(listener.(ProgressListener))) + } + + payer, _ := FindOption(options, HTTPHeaderOssRequester, nil) + if payer != nil { + outOption = append(outOption, RequestPayer(PayerType(payer.(string)))) + } + + versionId, _ := FindOption(options, "versionId", nil) + if versionId != nil { + outOption = append(outOption, VersionId(versionId.(string))) + } + + trafficLimit, _ := FindOption(options, HTTPHeaderOssTrafficLimit, nil) + if trafficLimit != nil { + speed, _ := strconv.ParseInt(trafficLimit.(string), 10, 64) + outOption = append(outOption, TrafficLimitHeader(speed)) + } + + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil { + outOption = append(outOption, GetResponseHeader(respHeader.(*http.Header))) + } + + return outOption +} + +// ChoiceCompletePartOption choices valid option supported by CompleteMulitiPart +func ChoiceCompletePartOption(options []Option) []Option { + var outOption []Option + + listener, _ := FindOption(options, progressListener, nil) + if listener != nil { + outOption = append(outOption, Progress(listener.(ProgressListener))) + } + + payer, _ := FindOption(options, HTTPHeaderOssRequester, nil) + if payer != nil { + outOption = append(outOption, RequestPayer(PayerType(payer.(string)))) + } + + acl, _ := FindOption(options, HTTPHeaderOssObjectACL, nil) + if acl != nil { + outOption = append(outOption, ObjectACL(ACLType(acl.(string)))) + } + + callback, _ := FindOption(options, HTTPHeaderOssCallback, nil) + if callback != nil { + outOption = append(outOption, Callback(callback.(string))) + } + + callbackVar, _ := FindOption(options, HTTPHeaderOssCallbackVar, nil) + if callbackVar != nil { + outOption = append(outOption, CallbackVar(callbackVar.(string))) + } + + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil { + outOption = append(outOption, GetResponseHeader(respHeader.(*http.Header))) + } + + forbidOverWrite, _ := FindOption(options, HTTPHeaderOssForbidOverWrite, nil) + if forbidOverWrite != nil { + if forbidOverWrite.(string) == "true" { + outOption = append(outOption, ForbidOverWrite(true)) + } else { + outOption = append(outOption, ForbidOverWrite(false)) + } + } + + return outOption +} + +// ChoiceAbortPartOption choices valid option supported by AbortMultipartUpload +func ChoiceAbortPartOption(options []Option) []Option { + var outOption []Option + payer, _ := FindOption(options, HTTPHeaderOssRequester, nil) + if payer != nil { + outOption = append(outOption, RequestPayer(PayerType(payer.(string)))) + } + + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil { + outOption = append(outOption, GetResponseHeader(respHeader.(*http.Header))) + } + + return outOption +} + +// ChoiceHeadObjectOption choices valid option supported by HeadObject +func ChoiceHeadObjectOption(options []Option) []Option { + var outOption []Option + + // not select HTTPHeaderRange to get whole object length + payer, _ := FindOption(options, HTTPHeaderOssRequester, nil) + if payer != nil { + outOption = append(outOption, RequestPayer(PayerType(payer.(string)))) + } + + versionId, _ := FindOption(options, "versionId", nil) + if versionId != nil { + outOption = append(outOption, VersionId(versionId.(string))) + } + + respHeader, _ := FindOption(options, responseHeader, nil) + if respHeader != nil { + outOption = append(outOption, GetResponseHeader(respHeader.(*http.Header))) + } + + return outOption +} + +func CheckBucketName(bucketName string) error { + nameLen := len(bucketName) + if nameLen < 3 || nameLen > 63 { + return fmt.Errorf("bucket name %s len is between [3-63],now is %d", bucketName, nameLen) + } + + for _, v := range bucketName { + if !(('a' <= v && v <= 'z') || ('0' <= v && v <= '9') || v == '-') { + return fmt.Errorf("bucket name %s can only include lowercase letters, numbers, and -", bucketName) + } + } + if bucketName[0] == '-' || bucketName[nameLen-1] == '-' { + return fmt.Errorf("bucket name %s must start and end with a lowercase letter or number", bucketName) + } + return nil +} + +func GetReaderLen(reader io.Reader) (int64, error) { + var contentLength int64 + var err error + switch v := reader.(type) { + case *bytes.Buffer: + contentLength = int64(v.Len()) + case *bytes.Reader: + contentLength = int64(v.Len()) + case *strings.Reader: + contentLength = int64(v.Len()) + case *os.File: + fInfo, fError := v.Stat() + if fError != nil { + err = fmt.Errorf("can't get reader content length,%s", fError.Error()) + } else { + contentLength = fInfo.Size() + } + case *io.LimitedReader: + contentLength = int64(v.N) + case *LimitedReadCloser: + contentLength = int64(v.N) + default: + err = fmt.Errorf("can't get reader content length,unkown reader type") + } + return contentLength, err +} + +func LimitReadCloser(r io.Reader, n int64) io.Reader { + var lc LimitedReadCloser + lc.R = r + lc.N = n + return &lc +} + +// LimitedRC support Close() +type LimitedReadCloser struct { + io.LimitedReader +} + +func (lc *LimitedReadCloser) Close() error { + if closer, ok := lc.R.(io.ReadCloser); ok { + return closer.Close() + } + return nil +} + +type DiscardReadCloser struct { + RC io.ReadCloser + Discard int +} + +func (drc *DiscardReadCloser) Read(b []byte) (int, error) { + n, err := drc.RC.Read(b) + if drc.Discard == 0 || n <= 0 { + return n, err + } + + if n <= drc.Discard { + drc.Discard -= n + return 0, err + } + + realLen := n - drc.Discard + copy(b[0:realLen], b[drc.Discard:n]) + drc.Discard = 0 + return realLen, err +} + +func (drc *DiscardReadCloser) Close() error { + closer, ok := drc.RC.(io.ReadCloser) + if ok { + return closer.Close() + } + return nil +} + +func ConvertEmptyValueToNil(params map[string]interface{}, keys []string) { + for _, key := range keys { + value, ok := params[key] + if ok && value == "" { + // convert "" to nil + params[key] = nil + } + } +} diff --git a/vendor/github.com/hashicorp/packer-plugin-alicloud/LICENSE b/vendor/github.com/hashicorp/packer-plugin-alicloud/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/vendor/github.com/hashicorp/packer-plugin-alicloud/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/builder/alicloud/ecs/access_config.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/access_config.go similarity index 97% rename from builder/alicloud/ecs/access_config.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/access_config.go index aae96bd6c..e7b542444 100644 --- a/builder/alicloud/ecs/access_config.go +++ b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/access_config.go @@ -11,8 +11,8 @@ import ( "time" "github.com/aliyun/alibaba-cloud-sdk-go/services/ecs" + "github.com/hashicorp/packer-plugin-alicloud/version" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - "github.com/hashicorp/packer/builder/alicloud/version" "github.com/mitchellh/go-homedir" ) @@ -78,7 +78,7 @@ func (c *AlicloudAccessConfig) Client() (*ClientWrapper, error) { return nil, err } - client.AppendUserAgent(Packer, version.AlicloudPluginVersion.FormattedVersion()) + client.AppendUserAgent(Packer, version.PluginVersion.FormattedVersion()) client.SetReadTimeout(DefaultRequestReadTimeout) c.client = &ClientWrapper{client} diff --git a/builder/alicloud/ecs/artifact.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/artifact.go similarity index 100% rename from builder/alicloud/ecs/artifact.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/artifact.go diff --git a/builder/alicloud/ecs/builder.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/builder.go similarity index 100% rename from builder/alicloud/ecs/builder.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/builder.go diff --git a/builder/alicloud/ecs/builder.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/builder.hcl2spec.go similarity index 100% rename from builder/alicloud/ecs/builder.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/builder.hcl2spec.go diff --git a/builder/alicloud/ecs/client.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/client.go similarity index 100% rename from builder/alicloud/ecs/client.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/client.go diff --git a/builder/alicloud/ecs/image_config.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/image_config.go similarity index 100% rename from builder/alicloud/ecs/image_config.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/image_config.go diff --git a/builder/alicloud/ecs/packer_helper.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/packer_helper.go similarity index 100% rename from builder/alicloud/ecs/packer_helper.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/packer_helper.go diff --git a/builder/alicloud/ecs/run_config.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/run_config.go similarity index 100% rename from builder/alicloud/ecs/run_config.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/run_config.go diff --git a/builder/alicloud/ecs/ssh_helper.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/ssh_helper.go similarity index 100% rename from builder/alicloud/ecs/ssh_helper.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/ssh_helper.go diff --git a/builder/alicloud/ecs/step_attach_keypair.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_attach_keypair.go similarity index 100% rename from builder/alicloud/ecs/step_attach_keypair.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_attach_keypair.go diff --git a/builder/alicloud/ecs/step_check_source_image.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_check_source_image.go similarity index 100% rename from builder/alicloud/ecs/step_check_source_image.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_check_source_image.go diff --git a/builder/alicloud/ecs/step_config_eip.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_eip.go similarity index 100% rename from builder/alicloud/ecs/step_config_eip.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_eip.go diff --git a/builder/alicloud/ecs/step_config_key_pair.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_key_pair.go similarity index 100% rename from builder/alicloud/ecs/step_config_key_pair.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_key_pair.go diff --git a/builder/alicloud/ecs/step_config_public_ip.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_public_ip.go similarity index 100% rename from builder/alicloud/ecs/step_config_public_ip.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_public_ip.go diff --git a/builder/alicloud/ecs/step_config_security_group.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_security_group.go similarity index 100% rename from builder/alicloud/ecs/step_config_security_group.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_security_group.go diff --git a/builder/alicloud/ecs/step_config_vpc.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_vpc.go similarity index 100% rename from builder/alicloud/ecs/step_config_vpc.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_vpc.go diff --git a/builder/alicloud/ecs/step_config_vswitch.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_vswitch.go similarity index 100% rename from builder/alicloud/ecs/step_config_vswitch.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_config_vswitch.go diff --git a/builder/alicloud/ecs/step_create_image.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_create_image.go similarity index 100% rename from builder/alicloud/ecs/step_create_image.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_create_image.go diff --git a/builder/alicloud/ecs/step_create_instance.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_create_instance.go similarity index 100% rename from builder/alicloud/ecs/step_create_instance.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_create_instance.go diff --git a/builder/alicloud/ecs/step_create_snapshot.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_create_snapshot.go similarity index 100% rename from builder/alicloud/ecs/step_create_snapshot.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_create_snapshot.go diff --git a/builder/alicloud/ecs/step_create_tags.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_create_tags.go similarity index 100% rename from builder/alicloud/ecs/step_create_tags.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_create_tags.go diff --git a/builder/alicloud/ecs/step_delete_images_snapshots.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_delete_images_snapshots.go similarity index 100% rename from builder/alicloud/ecs/step_delete_images_snapshots.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_delete_images_snapshots.go diff --git a/builder/alicloud/ecs/step_pre_validate.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_pre_validate.go similarity index 100% rename from builder/alicloud/ecs/step_pre_validate.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_pre_validate.go diff --git a/builder/alicloud/ecs/step_region_copy_image.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_region_copy_image.go similarity index 100% rename from builder/alicloud/ecs/step_region_copy_image.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_region_copy_image.go diff --git a/builder/alicloud/ecs/step_run_instance.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_run_instance.go similarity index 100% rename from builder/alicloud/ecs/step_run_instance.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_run_instance.go diff --git a/builder/alicloud/ecs/step_share_image.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_share_image.go similarity index 100% rename from builder/alicloud/ecs/step_share_image.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_share_image.go diff --git a/builder/alicloud/ecs/step_stop_instance.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_stop_instance.go similarity index 100% rename from builder/alicloud/ecs/step_stop_instance.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/builder/ecs/step_stop_instance.go diff --git a/post-processor/alicloud-import/post-processor.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/post-processor/alicloud-import/post-processor.go similarity index 99% rename from post-processor/alicloud-import/post-processor.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/post-processor/alicloud-import/post-processor.go index 5a0abf6e5..4c597c2a4 100644 --- a/post-processor/alicloud-import/post-processor.go +++ b/vendor/github.com/hashicorp/packer-plugin-alicloud/post-processor/alicloud-import/post-processor.go @@ -18,10 +18,10 @@ import ( "github.com/aliyun/alibaba-cloud-sdk-go/services/ram" "github.com/aliyun/aliyun-oss-go-sdk/oss" "github.com/hashicorp/hcl/v2/hcldec" + packerecs "github.com/hashicorp/packer-plugin-alicloud/builder/ecs" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" "github.com/hashicorp/packer-plugin-sdk/template/config" "github.com/hashicorp/packer-plugin-sdk/template/interpolate" - packerecs "github.com/hashicorp/packer/builder/alicloud/ecs" ) const ( diff --git a/post-processor/alicloud-import/post-processor.hcl2spec.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/post-processor/alicloud-import/post-processor.hcl2spec.go similarity index 99% rename from post-processor/alicloud-import/post-processor.hcl2spec.go rename to vendor/github.com/hashicorp/packer-plugin-alicloud/post-processor/alicloud-import/post-processor.hcl2spec.go index cefa27151..217e570e8 100644 --- a/post-processor/alicloud-import/post-processor.hcl2spec.go +++ b/vendor/github.com/hashicorp/packer-plugin-alicloud/post-processor/alicloud-import/post-processor.hcl2spec.go @@ -4,8 +4,8 @@ package alicloudimport import ( "github.com/hashicorp/hcl/v2/hcldec" + "github.com/hashicorp/packer-plugin-alicloud/builder/ecs" "github.com/hashicorp/packer-plugin-sdk/template/config" - "github.com/hashicorp/packer/builder/alicloud/ecs" "github.com/zclconf/go-cty/cty" ) diff --git a/vendor/github.com/hashicorp/packer-plugin-alicloud/version/version.go b/vendor/github.com/hashicorp/packer-plugin-alicloud/version/version.go new file mode 100644 index 000000000..ae0ac4804 --- /dev/null +++ b/vendor/github.com/hashicorp/packer-plugin-alicloud/version/version.go @@ -0,0 +1,17 @@ +package version + +import "github.com/hashicorp/packer-plugin-sdk/version" + +var ( + // Version is the main version number that is being run at the moment. + Version = "0.0.2" + + // VersionPrerelease is A pre-release marker for the Version. If this is "" + // (empty string) then it means that it is a final release. Otherwise, this + // is a pre-release such as "dev" (in development), "beta", "rc1", etc. + VersionPrerelease = "" + + // PluginVersion is used by the plugin set to allow Packer to recognize + // what version this plugin is. + PluginVersion = version.InitializePluginVersion(Version, VersionPrerelease) +) diff --git a/vendor/modules.txt b/vendor/modules.txt index 4386da0d0..43a91e16a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -81,8 +81,7 @@ github.com/StackExchange/wmi github.com/Telmate/proxmox-api-go/proxmox # github.com/agext/levenshtein v1.2.1 github.com/agext/levenshtein -# github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190418113227-25233c783f4e -## explicit +# github.com/aliyun/alibaba-cloud-sdk-go v1.61.1028 github.com/aliyun/alibaba-cloud-sdk-go/sdk github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials @@ -95,8 +94,7 @@ github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses github.com/aliyun/alibaba-cloud-sdk-go/sdk/utils github.com/aliyun/alibaba-cloud-sdk-go/services/ecs github.com/aliyun/alibaba-cloud-sdk-go/services/ram -# github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20170113022742-e6dbea820a9f -## explicit +# github.com/aliyun/aliyun-oss-go-sdk v2.1.8+incompatible github.com/aliyun/aliyun-oss-go-sdk/oss # github.com/antihax/optional v1.0.0 github.com/antihax/optional @@ -488,6 +486,11 @@ github.com/hashicorp/hcl/v2/hclparse github.com/hashicorp/hcl/v2/hclsyntax github.com/hashicorp/hcl/v2/hclwrite github.com/hashicorp/hcl/v2/json +# github.com/hashicorp/packer-plugin-alicloud v0.0.2 +## explicit +github.com/hashicorp/packer-plugin-alicloud/builder/ecs +github.com/hashicorp/packer-plugin-alicloud/post-processor/alicloud-import +github.com/hashicorp/packer-plugin-alicloud/version # github.com/hashicorp/packer-plugin-amazon v0.0.1 ## explicit github.com/hashicorp/packer-plugin-amazon/builder/chroot