コード例 #1
0
        /// <summary>Snippet for CreateSnapshotAsync</summary>
        public async Task CreateSnapshotAsync()
        {
            // Snippet: CreateSnapshotAsync(string, string, string, Snapshot, CallSettings)
            // Additional: CreateSnapshotAsync(string, string, string, Snapshot, CancellationToken)
            // Create client
            RegionDisksClient regionDisksClient = await RegionDisksClient.CreateAsync();

            // Initialize request argument(s)
            string   project          = "";
            string   region           = "";
            string   disk             = "";
            Snapshot snapshotResource = new Snapshot();
            // Make the request
            Operation response = await regionDisksClient.CreateSnapshotAsync(project, region, disk, snapshotResource);

            // End snippet
        }
コード例 #2
0
        /// <summary>Snippet for CreateSnapshotAsync</summary>
        public async Task CreateSnapshotRequestObjectAsync()
        {
            // Snippet: CreateSnapshotAsync(CreateSnapshotRegionDiskRequest, CallSettings)
            // Additional: CreateSnapshotAsync(CreateSnapshotRegionDiskRequest, CancellationToken)
            // Create client
            RegionDisksClient regionDisksClient = await RegionDisksClient.CreateAsync();

            // Initialize request argument(s)
            CreateSnapshotRegionDiskRequest request = new CreateSnapshotRegionDiskRequest
            {
                Disk             = "",
                RequestId        = "",
                Region           = "",
                Project          = "",
                SnapshotResource = new Snapshot(),
            };
            // Make the request
            Operation response = await regionDisksClient.CreateSnapshotAsync(request);

            // End snippet
        }