共用方式為


New-AzSecurityAwsEnvironmentObject

建立 AwsEnvironment 的記憶體內部物件。

語法

New-AzSecurityAwsEnvironmentObject
   [-OrganizationalData <IAwsOrganizationalData>]
   [-Region <String[]>]
   [-ScanInterval <Int64>]
   [<CommonParameters>]

Description

建立 AwsEnvironment 的記憶體內部物件。

範例

範例 1:建立新的 AwsEnvironment 對象作為成員

$member = New-AzSecurityAwsOrganizationalDataMemberObject -ParentHierarchyId "123"
New-AzSecurityAwsEnvironmentObject -Region "Central US" -ScanInterval 24 -OrganizationalData $member

AccountName        : 
EnvironmentType    : AwsAccount
OrganizationalData : {
                       "organizationMembershipType": "Member",
                       "parentHierarchyId": "123"
                     }
Region             : {Central US}
ScanInterval       : 24

範例 2:建立新的 AwsEnvironment 對象作為組織

$organization = New-AzSecurityAwsOrganizationalDataMasterObject -StacksetName "myAwsStackSet" -ExcludedAccountId "123456789012"
New-AzSecurityAwsEnvironmentObject -Region "Central US" -ScanInterval 24 -OrganizationalData $organization

AccountName        : 
EnvironmentType    : AwsAccount
OrganizationalData : {
                       "organizationMembershipType": "Organization",
                       "stacksetName": "myAwsStackSet",
                       "excludedAccountIds": [ "123456789012" ]
                     }
Region             : {Central US}
ScanInterval       : 24

參數

-OrganizationalData

AWS 帳戶的組織數據。

類型:IAwsOrganizationalData
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Region

要掃描的區域清單。

類型:String[]
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ScanInterval

以小時為單位的掃描間隔(值應介於 1 小時到 24 小時之間)。

類型:Int64
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸出

AwsEnvironment