コード例 #1
0
        public void CostAndUsageReportPutReportDefinition()
        {
            #region to-create-a-report-definitions

            var response = client.PutReportDefinition(new PutReportDefinitionRequest
            {
                ReportDefinition = new ReportDefinition {
                    AdditionalArtifacts = new List <string> {
                        "REDSHIFT",
                        "QUICKSIGHT"
                    },
                    AdditionalSchemaElements = new List <string> {
                        "RESOURCES"
                    },
                    Compression = "ZIP",
                    Format      = "textORcsv",
                    ReportName  = "ExampleReport",
                    S3Bucket    = "example-s3-bucket",
                    S3Prefix    = "exampleprefix",
                    S3Region    = "us-east-1",
                    TimeUnit    = "DAILY"
                }
            });


            #endregion
        }
コード例 #2
0
 private Amazon.CostAndUsageReport.Model.PutReportDefinitionResponse CallAWSServiceOperation(IAmazonCostAndUsageReport client, Amazon.CostAndUsageReport.Model.PutReportDefinitionRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Cost and Usage Report", "PutReportDefinition");
     try
     {
         #if DESKTOP
         return(client.PutReportDefinition(request));
         #elif CORECLR
         return(client.PutReportDefinitionAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }