Cloud Channel API . accounts . reportJobs

Instance Methods

close()

Close httplib2 connections.

fetchReportResults(reportJob, body=None, x__xgafv=None)

Retrieves data generated by CloudChannelReportsService.RunReportJob. Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.

fetchReportResults_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
fetchReportResults(reportJob, body=None, x__xgafv=None)
Retrieves data generated by CloudChannelReportsService.RunReportJob. Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.

Args:
  reportJob: string, Required. The report job created by CloudChannelReportsService.RunReportJob. Report_job uses the format: accounts/{account_id}/reportJobs/{report_job_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for CloudChannelReportsService.FetchReportResults.
  "pageSize": 42, # Optional. Requested page size of the report. The server may return fewer results than requested. If you don't specify a page size, the server uses a sensible default (may change over time). The maximum value is 30,000; the server will change larger values to 30,000.
  "pageToken": "A String", # Optional. A token that specifies a page of results beyond the first page. Obtained through FetchReportResultsResponse.next_page_token of the previous CloudChannelReportsService.FetchReportResults call.
  "partitionKeys": [ # Optional. List of keys specifying which report partitions to return. If empty, returns all partitions.
    "A String",
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for CloudChannelReportsService.FetchReportResults. Contains a tabular representation of the report results.
  "nextPageToken": "A String", # Pass this token to FetchReportResultsRequest.page_token to retrieve the next page of results.
  "reportMetadata": { # The features describing the data. Returned by CloudChannelReportsService.RunReportJob and CloudChannelReportsService.FetchReportResults. # The metadata for the report results (display name, columns, row count, and date ranges).
    "dateRange": { # A representation of usage or invoice date ranges. # The date range of reported usage.
      "invoiceEndDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The latest invoice date (inclusive). If this value is not the last day of a month, this will move it forward to the last day of the given month.
        "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
        "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      "invoiceStartDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The earliest invoice date (inclusive). If this value is not the first day of a month, this will move it back to the first day of the given month.
        "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
        "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      "usageEndDateTime": { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations. # The latest usage date time (exclusive). If you use time groupings (daily, weekly, etc), each group uses midnight to midnight (Pacific time). The usage end date is rounded down to include all usage from the specified date. We recommend that clients pass `usage_start_date_time` in Pacific time.
        "day": 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
        "hours": 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value "24:00:00" for scenarios like business closing time.
        "minutes": 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
        "month": 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
        "nanos": 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
        "seconds": 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
        "timeZone": { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
          "id": "A String", # IANA Time Zone Database time zone, e.g. "America/New_York".
          "version": "A String", # Optional. IANA Time Zone Database version number, e.g. "2019a".
        },
        "utcOffset": "A String", # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
        "year": 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
      },
      "usageStartDateTime": { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations. # The earliest usage date time (inclusive). If you use time groupings (daily, weekly, etc), each group uses midnight to midnight (Pacific time). The usage start date is rounded down to include all usage from the specified date. We recommend that clients pass `usage_start_date_time` in Pacific time.
        "day": 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
        "hours": 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value "24:00:00" for scenarios like business closing time.
        "minutes": 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
        "month": 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
        "nanos": 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
        "seconds": 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
        "timeZone": { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
          "id": "A String", # IANA Time Zone Database time zone, e.g. "America/New_York".
          "version": "A String", # Optional. IANA Time Zone Database version number, e.g. "2019a".
        },
        "utcOffset": "A String", # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
        "year": 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
      },
    },
    "precedingDateRange": { # A representation of usage or invoice date ranges. # The usage dates immediately preceding `date_range` with the same duration. Use this to calculate trending usage and costs. This is only populated if you request trending data. For example, if `date_range` is July 1-15, `preceding_date_range` will be June 16-30.
      "invoiceEndDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The latest invoice date (inclusive). If this value is not the last day of a month, this will move it forward to the last day of the given month.
        "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
        "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      "invoiceStartDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The earliest invoice date (inclusive). If this value is not the first day of a month, this will move it back to the first day of the given month.
        "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
        "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
        "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
      },
      "usageEndDateTime": { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations. # The latest usage date time (exclusive). If you use time groupings (daily, weekly, etc), each group uses midnight to midnight (Pacific time). The usage end date is rounded down to include all usage from the specified date. We recommend that clients pass `usage_start_date_time` in Pacific time.
        "day": 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
        "hours": 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value "24:00:00" for scenarios like business closing time.
        "minutes": 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
        "month": 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
        "nanos": 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
        "seconds": 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
        "timeZone": { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
          "id": "A String", # IANA Time Zone Database time zone, e.g. "America/New_York".
          "version": "A String", # Optional. IANA Time Zone Database version number, e.g. "2019a".
        },
        "utcOffset": "A String", # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
        "year": 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
      },
      "usageStartDateTime": { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations. # The earliest usage date time (inclusive). If you use time groupings (daily, weekly, etc), each group uses midnight to midnight (Pacific time). The usage start date is rounded down to include all usage from the specified date. We recommend that clients pass `usage_start_date_time` in Pacific time.
        "day": 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
        "hours": 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value "24:00:00" for scenarios like business closing time.
        "minutes": 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
        "month": 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
        "nanos": 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
        "seconds": 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
        "timeZone": { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
          "id": "A String", # IANA Time Zone Database time zone, e.g. "America/New_York".
          "version": "A String", # Optional. IANA Time Zone Database version number, e.g. "2019a".
        },
        "utcOffset": "A String", # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
        "year": 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
      },
    },
    "report": { # The ID and description of a report that was used to generate report data. For example, "Google Cloud Daily Spend", "Google Workspace License Activity", etc. # Details of the completed report.
      "columns": [ # The list of columns included in the report. This defines the schema of the report results.
        { # The definition of a report column. Specifies the data properties in the corresponding position of the report rows.
          "columnId": "A String", # The unique name of the column (for example, customer_domain, channel_partner, customer_cost). You can use column IDs in RunReportJobRequest.filter. To see all reports and their columns, call CloudChannelReportsService.ListReports.
          "dataType": "A String", # The type of the values for this column.
          "displayName": "A String", # The column's display name.
        },
      ],
      "description": "A String", # A description of other aspects of the report, such as the products it supports.
      "displayName": "A String", # A human-readable name for this report.
      "name": "A String", # Required. The report's resource name. Specifies the account and report used to generate report data. The report_id identifier is a UID (for example, `613bf59q`). Name uses the format: accounts/{account_id}/reports/{report_id}
    },
    "rowCount": "A String", # The total number of rows of data in the final report.
  },
  "rows": [ # The report's lists of values. Each row follows the settings and ordering of the columns from `report_metadata`.
    { # A row of report values.
      "partitionKey": "A String", # The key for the partition this row belongs to. This field is empty if the report is not partitioned.
      "values": [ # The list of values in the row.
        { # A single report value.
          "dateTimeValue": { # Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations. # A value of type `google.type.DateTime` (year, month, day, hour, minute, second, and UTC offset or timezone.)
            "day": 42, # Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.
            "hours": 42, # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value "24:00:00" for scenarios like business closing time.
            "minutes": 42, # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.
            "month": 42, # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.
            "nanos": 42, # Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.
            "seconds": 42, # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.
            "timeZone": { # Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones). # Time zone.
              "id": "A String", # IANA Time Zone Database time zone, e.g. "America/New_York".
              "version": "A String", # Optional. IANA Time Zone Database version number, e.g. "2019a".
            },
            "utcOffset": "A String", # UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.
            "year": 42, # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.
          },
          "dateValue": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # A value of type `google.type.Date` (year, month, day).
            "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
            "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
            "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
          },
          "decimalValue": { # A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html # A value of type `google.type.Decimal`, representing non-integer numeric values.
            "value": "A String", # The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.
          },
          "intValue": "A String", # A value of type `int`.
          "moneyValue": { # Represents an amount of money with its currency type. # A value of type `google.type.Money` (currency code, whole units, decimal units).
            "currencyCode": "A String", # The three-letter currency code defined in ISO 4217.
            "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
            "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
          },
          "stringValue": "A String", # A value of type `string`.
        },
      ],
    },
  ],
}
fetchReportResults_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.