I am still not able to figure out how to create a test report through python client, as the below code snippet is not working for me.
client = storageinsights_v1.StorageInsightsClient()
frequency_options = storageinsights_v1.FrequencyOptions(frequency = storageinsights_v1.FrequencyOptions.Frequency.DAILY)
csv_options = storageinsights_v1.CSVOptions(record_separator = ",")
create_time = timestamp_pb2.Timestamp()
update_time = timestamp_pb2.Timestamp()
display_name = "test-inv-report"
report_config = storageinsights_v1.ReportConfig(name="projects/<my-project-name>/locations/us-east1/reportConfigs/test-config-1", create_time=create_time, update_time=update_time, frequency_options=frequency_options, csv_options=csv_options, display_name=display_name)
# Initialize request argument(s)
request = storageinsights_v1.CreateReportConfigRequest(
parent="<my-project-name>",
report_config=report_config
)
# Make the request
response = client.create_report_config(request=request)
I am getting the below error and not able to fix it with different combinations of parameters that I am trying:
File "/Users/test1/Documents/storage-insight-poc/si-env/lib/python3.11/site-packages/google/cloud/storageinsights_v1/services/storage_insights/client.py", line 795, in create_report_config
response = rpc(
^^^^
File "/Users/test1/Documents/storage-insight-poc/si-env/lib/python3.11/site-packages/google/api_core/gapic_v1/method.py", line 113, in _call_
return wrapped_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/test1/Documents/storage-insight-poc/si-env/lib/python3.11/site-packages/google/api_core/grpc_helpers.py", line 74, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument.
I am still not able to figure out how to create a test report through python client, as the below code snippet is not working for me.
I am getting the below error and not able to fix it with different combinations of parameters that I am trying: