你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzSecurityGcpProjectEnvironmentObject

Create an in-memory object for GcpProjectEnvironment.

Syntax

New-AzSecurityGcpProjectEnvironmentObject
   [-OrganizationalData <IGcpOrganizationalData>]
   [-ProjectDetailProjectId <String>]
   [-ProjectDetailProjectNumber <String>]
   [-ScanInterval <Int64>]
   [<CommonParameters>]

Description

Create an in-memory object for GcpProjectEnvironment.

Examples

Example 1: Create new GcpOrganizationalDataOrganization object

$orgData = New-AzSecurityGcpOrganizationalDataOrganizationObject -WorkloadIdentityProviderId "provider" -ServiceAccountEmailAddress "my@email.com" -ExcludedProjectNumber @(1,2)
New-AzSecurityGcpProjectEnvironmentObject -ProjectDetailProjectId "asc-sdk-samples" -ScanInterval 24 -OrganizationalData $orgData -ProjectDetailProjectNumber "1234"

EnvironmentType                     : GcpProject
OrganizationalData                  : {
                                        "organizationMembershipType": "Organization",
                                        "excludedProjectNumbers": [ "1", "2" ],
                                        "serviceAccountEmailAddress": "my@email.com",
                                        "workloadIdentityProviderId": "provider"
                                      }
ProjectDetailProjectId              : asc-sdk-samples
ProjectDetailProjectName            : 
ProjectDetailProjectNumber          : 1234
ProjectDetailWorkloadIdentityPoolId : 
ScanInterval                        : 24

Parameters

-OrganizationalData

The Gcp project's organizational data.

Type:IGcpOrganizationalData
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProjectDetailProjectId

The GCP Project id.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProjectDetailProjectNumber

The unique GCP Project number.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ScanInterval

Scan interval in hours (value should be between 1-hour to 24-hours).

Type:Int64
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

GcpProjectEnvironment