@@ -1595,6 +1595,16 @@ message MetadataJob {
15951595 [(google.api.field_behavior ) = OUTPUT_ONLY ];
15961596 }
15971597
1598+ // Export Job Results. The result is based on the snapshot at the time when
1599+ // the job is created.
1600+ message ExportJobResult {
1601+ // Output only. The number of entries that have been exported.
1602+ int64 exported_entries = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
1603+
1604+ // Output only. The error message if the export job failed.
1605+ string error_message = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
1606+ }
1607+
15981608 // Job specification for a metadata import job.
15991609 //
16001610 // You can run the following kinds of metadata import jobs:
@@ -1762,13 +1772,82 @@ message MetadataJob {
17621772 LogLevel log_level = 6 [(google.api.field_behavior ) = OPTIONAL ];
17631773 }
17641774
1775+ // Export job specification.
1776+ message ExportJobSpec {
1777+ // Scope of the export job.
1778+ message ExportJobScope {
1779+ // Indicating if it is an organization level export job.
1780+ // - When set to true, exports all entries from entry groups and projects
1781+ // sharing the same organization id of the Metadata Job. Only projects and
1782+ // entry groups in the VPC-SC perimeter will be exported. The projects and
1783+ // entry groups are ignored.
1784+ // - When set to false, one of the projects or entry groups must be
1785+ // specified.
1786+ // - Default to false.
1787+ bool organization_level = 1 ;
1788+
1789+ // The projects that are in the scope of the export job. Can either be
1790+ // project numbers or project IDs. If specified, only the entries from the
1791+ // specified projects will be exported. The projects must be in the same
1792+ // organization and in the VPC-SC perimeter. Either projects or
1793+ // entry_groups can be specified when organization_level_export is set to
1794+ // false.
1795+ // Must follow the format: "projects/<project_id_or_number>"
1796+ repeated string projects = 2 [(google.api.resource_reference ) = {
1797+ type : "cloudresourcemanager.googleapis.com/Project"
1798+ }];
1799+
1800+ // The entry groups that are in scope for the export job. Optional. If
1801+ // specified, only entries in the specified entry groups will be exported
1802+ // by the job. Must be in the VPC-SC perimeter of the job. The location of
1803+ // the entry groups must be the same as the job. Either projects or
1804+ // entry_groups can be specified when organization_level_export is set to
1805+ // false. Must follow the format:
1806+ // "projects/<project_id_or_number>/locations/<location>/entryGroups/<entry_group_id>"
1807+ repeated string entry_groups = 3 [(google.api.resource_reference ) = {
1808+ type : "dataplex.googleapis.com/EntryGroup"
1809+ }];
1810+
1811+ // If specified, only entries of the specified types will be
1812+ // affected by the job.
1813+ // Must follow the format:
1814+ // "projects/<project_id_or_number>/locations/<location>/entryTypes/<entry_type_id>"
1815+ repeated string entry_types = 4 [(google.api.resource_reference ) = {
1816+ type : "dataplex.googleapis.com/EntryType"
1817+ }];
1818+
1819+ // The aspect types that are in scope for the export job.
1820+ // Optional. If specified, only aspects of the specified types will be
1821+ // affected by the job.
1822+ // Must follow the format:
1823+ // "projects/<project_id_or_number>/locations/<location>/aspectTypes/<aspect_type_id>"
1824+ repeated string aspect_types = 5 [(google.api.resource_reference ) = {
1825+ type : "dataplex.googleapis.com/AspectType"
1826+ }];
1827+ }
1828+
1829+ // Required. Selects the entries to be exported by this job.
1830+ ExportJobScope scope = 2 [(google.api.field_behavior ) = REQUIRED ];
1831+
1832+ // Required. The root path of the exported metadata.
1833+ // Must be in the format: "gs://<bucket_id>"
1834+ // Or specify a customized prefix after the bucket:
1835+ // "gs://<bucket_id>/<folder1>/<folder2>/.../".
1836+ // The length limit of the customized prefix is 128 characters.
1837+ // The bucket must be in the same VPC-SC perimeter with the job.
1838+ string output_path = 3 [(google.api.field_behavior ) = REQUIRED ];
1839+ }
1840+
17651841 // Metadata job type.
17661842 enum Type {
17671843 // Unspecified.
17681844 TYPE_UNSPECIFIED = 0 ;
17691845
17701846 // Import job.
17711847 IMPORT = 1 ;
1848+
1849+ // Export job type.
1850+ EXPORT = 2 ;
17721851 }
17731852
17741853 // Metadata job status.
@@ -1847,12 +1926,19 @@ message MetadataJob {
18471926 oneof spec {
18481927 // Import job specification.
18491928 ImportJobSpec import_spec = 100 ;
1929+
1930+ // Export job specification.
1931+ ExportJobSpec export_spec = 101 ;
18501932 }
18511933
18521934 oneof result {
18531935 // Output only. Import job result.
18541936 ImportJobResult import_result = 200
18551937 [(google.api.field_behavior ) = OUTPUT_ONLY ];
1938+
1939+ // Output only. Export job result.
1940+ ExportJobResult export_result = 201
1941+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
18561942 }
18571943
18581944 // Output only. Metadata job status.
0 commit comments