Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
)
from google.cloud.securitycenter_v1.types.application import Application
from google.cloud.securitycenter_v1.types.asset import Asset
from google.cloud.securitycenter_v1.types.backup_disaster_recovery import (
BackupDisasterRecovery,
)
from google.cloud.securitycenter_v1.types.bigquery_export import BigQueryExport
from google.cloud.securitycenter_v1.types.cloud_dlp_data_profile import (
CloudDlpDataProfile,
Expand Down Expand Up @@ -152,6 +155,7 @@
"ServiceAccountDelegationInfo",
"Application",
"Asset",
"BackupDisasterRecovery",
"BigQueryExport",
"CloudDlpDataProfile",
"CloudDlpInspection",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .types.access import Access, Geolocation, ServiceAccountDelegationInfo
from .types.application import Application
from .types.asset import Asset
from .types.backup_disaster_recovery import BackupDisasterRecovery
from .types.bigquery_export import BigQueryExport
from .types.cloud_dlp_data_profile import CloudDlpDataProfile
from .types.cloud_dlp_inspection import CloudDlpInspection
Expand Down Expand Up @@ -122,6 +123,7 @@
"Access",
"Application",
"Asset",
"BackupDisasterRecovery",
"BigQueryExport",
"BulkMuteFindingsRequest",
"BulkMuteFindingsResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from google.cloud.securitycenter_v1.types import (
access,
application,
backup_disaster_recovery,
bigquery_export,
cloud_dlp_data_profile,
cloud_dlp_inspection,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from google.cloud.securitycenter_v1.types import (
access,
application,
backup_disaster_recovery,
bigquery_export,
cloud_dlp_data_profile,
cloud_dlp_inspection,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from .access import Access, Geolocation, ServiceAccountDelegationInfo
from .application import Application
from .asset import Asset
from .backup_disaster_recovery import BackupDisasterRecovery
from .bigquery_export import BigQueryExport
from .cloud_dlp_data_profile import CloudDlpDataProfile
from .cloud_dlp_inspection import CloudDlpInspection
Expand Down Expand Up @@ -115,6 +116,7 @@
"ServiceAccountDelegationInfo",
"Application",
"Asset",
"BackupDisasterRecovery",
"BigQueryExport",
"CloudDlpDataProfile",
"CloudDlpInspection",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableMapping, MutableSequence

from google.protobuf import timestamp_pb2 # type: ignore
import proto # type: ignore

__protobuf__ = proto.module(
package="google.cloud.securitycenter.v1",
manifest={
"BackupDisasterRecovery",
},
)


class BackupDisasterRecovery(proto.Message):
r"""Information related to Google Cloud Backup and DR Service
findings.

Attributes:
backup_template (str):
The name of a Backup and DR template which comprises one or
more backup policies. See the `Backup and DR
documentation <https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp>`__
for more information. For example, ``snap-ov``.
policies (MutableSequence[str]):
The names of Backup and DR policies that are associated with
a template and that define when to run a backup, how
frequently to run a backup, and how long to retain the
backup image. For example, ``onvaults``.
host (str):
The name of a Backup and DR host, which is managed by the
backup and recovery appliance and known to the management
console. The host can be of type Generic (for example,
Compute Engine, SQL Server, Oracle DB, SMB file system,
etc.), vCenter, or an ESX server. See the `Backup and DR
documentation on
hosts <https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications>`__
for more information. For example, ``centos7-01``.
applications (MutableSequence[str]):
The names of Backup and DR applications. An application is a
VM, database, or file system on a managed host monitored by
a backup and recovery appliance. For example,
``centos7-01-vol00``, ``centos7-01-vol01``,
``centos7-01-vol02``.
storage_pool (str):
The name of the Backup and DR storage pool that the backup
and recovery appliance is storing data in. The storage pool
could be of type Cloud, Primary, Snapshot, or OnVault. See
the `Backup and DR documentation on storage
pools <https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools>`__.
For example, ``DiskPoolOne``.
policy_options (MutableSequence[str]):
The names of Backup and DR advanced policy options of a
policy applying to an application. See the `Backup and DR
documentation on policy
options <https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings>`__.
For example, ``skipofflineappsincongrp, nounmap``.
profile (str):
The name of the Backup and DR resource profile that
specifies the storage media for backups of application and
VM data. See the `Backup and DR documentation on
profiles <https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile>`__.
For example, ``GCP``.
appliance (str):
The name of the Backup and DR appliance that captures,
moves, and manages the lifecycle of backup data. For
example, ``backup-server-57137``.
backup_type (str):
The backup type of the Backup and DR image. For example,
``Snapshot``, ``Remote Snapshot``, ``OnVault``.
backup_create_time (google.protobuf.timestamp_pb2.Timestamp):
The timestamp at which the Backup and DR
backup was created.
"""

backup_template: str = proto.Field(
proto.STRING,
number=1,
)
policies: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=2,
)
host: str = proto.Field(
proto.STRING,
number=3,
)
applications: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=4,
)
storage_pool: str = proto.Field(
proto.STRING,
number=5,
)
policy_options: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=6,
)
profile: str = proto.Field(
proto.STRING,
number=7,
)
appliance: str = proto.Field(
proto.STRING,
number=8,
)
backup_type: str = proto.Field(
proto.STRING,
number=9,
)
backup_create_time: timestamp_pb2.Timestamp = proto.Field(
proto.MESSAGE,
number=10,
message=timestamp_pb2.Timestamp,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
container,
)
from google.cloud.securitycenter_v1.types import external_system, file, iam_binding
from google.cloud.securitycenter_v1.types import (
backup_disaster_recovery as gcs_backup_disaster_recovery,
)
from google.cloud.securitycenter_v1.types import (
cloud_dlp_data_profile as gcs_cloud_dlp_data_profile,
)
Expand Down Expand Up @@ -242,6 +245,8 @@ class Finding(proto.Message):
application (google.cloud.securitycenter_v1.types.Application):
Represents an application associated with the
finding.
backup_disaster_recovery (google.cloud.securitycenter_v1.types.BackupDisasterRecovery):
Fields related to Backup and DR findings.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -589,6 +594,13 @@ class FindingClass(proto.Enum):
number=53,
message=gcs_application.Application,
)
backup_disaster_recovery: gcs_backup_disaster_recovery.BackupDisasterRecovery = (
proto.Field(
proto.MESSAGE,
number=55,
message=gcs_backup_disaster_recovery.BackupDisasterRecovery,
)
)


__all__ = tuple(sorted(__protobuf__.manifest))
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
from google.cloud.securitycenter_v1.types import (
access,
application,
backup_disaster_recovery,
bigquery_export,
cloud_dlp_data_profile,
cloud_dlp_inspection,
Expand Down Expand Up @@ -16395,6 +16396,18 @@ def test_create_finding_rest(request_type):
"unexpected_processes_in_runqueue": True,
},
"application": {"base_uri": "base_uri_value", "full_uri": "full_uri_value"},
"backup_disaster_recovery": {
"backup_template": "backup_template_value",
"policies": ["policies_value1", "policies_value2"],
"host": "host_value",
"applications": ["applications_value1", "applications_value2"],
"storage_pool": "storage_pool_value",
"policy_options": ["policy_options_value1", "policy_options_value2"],
"profile": "profile_value",
"appliance": "appliance_value",
"backup_type": "backup_type_value",
"backup_create_time": {},
},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down Expand Up @@ -26298,6 +26311,18 @@ def test_update_finding_rest(request_type):
"unexpected_processes_in_runqueue": True,
},
"application": {"base_uri": "base_uri_value", "full_uri": "full_uri_value"},
"backup_disaster_recovery": {
"backup_template": "backup_template_value",
"policies": ["policies_value1", "policies_value2"],
"host": "host_value",
"applications": ["applications_value1", "applications_value2"],
"storage_pool": "storage_pool_value",
"policy_options": ["policy_options_value1", "policy_options_value2"],
"profile": "profile_value",
"appliance": "appliance_value",
"backup_type": "backup_type_value",
"backup_create_time": {},
},
}
# The version of a generated dependency at test runtime may differ from the version used during generation.
# Delete any fields which are not present in the current runtime dependency
Expand Down