New-AzApiManagement
Létrehoz egy API Management-üzembe helyezést.
Syntax
New-AzApiManagement
-ResourceGroupName <String>
-Name <String>
-Location <String>
-Organization <String>
-AdminEmail <String>
[-Sku <string>]
[-Capacity <Int32>]
[-VpnType <PsApiManagementVpnType>]
[-VirtualNetwork <PsApiManagementVirtualNetwork>]
[-Tag <System.Collections.Generic.Dictionary`2[System.String,System.String]>]
[-AdditionalRegions <PsApiManagementRegion[]>]
[-CustomHostnameConfiguration <PsApiManagementCustomHostNameConfiguration[]>]
[-SystemCertificateConfiguration <PsApiManagementSystemCertificate[]>]
[-SslSetting <PsApiManagementSslSetting>]
[-SystemAssignedIdentity]
[-UserAssignedIdentity <String[]>]
[-EnableClientCertificate]
[-Zone <String[]>]
[-DisableGateway <Boolean>]
[-MinimalControlPlaneApiVersion <String>]
[-PublicNetworkAccess <String>]
[-PublicIpAddressId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
A New-AzApiManagement parancsmag létrehoz egy API Management-üzembe helyezést az Azure API Managementben.
Példák
1. példa: Fejlesztői szintű API Management szolgáltatás létrehozása
New-AzApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi2" -Location "Central US" -Organization "Contoso" -AdminEmail "admin@contoso.com"
PublicIPAddresses : {104.43.240.65}
PrivateIPAddresses :
Id : /subscriptions/a200340d-6b82-494d-9dbf-687ba6e33f9e/resourceGroups/ContosoGroup02/providers/Microsoft.ApiManagement/service/ContosoApi2
Name : ContosoApi2
Location : Central US
Sku : Developer
Capacity : 1
CreatedTimeUtc : 2/24/2020 10:34:12 PM
ProvisioningState : Succeeded
RuntimeUrl : https://contosoapi2.azure-api.net
RuntimeRegionalUrl : https://contosoapi2-centralus-01.regional.azure-api.net
PortalUrl : https://contosoapi2.portal.azure-api.net
DeveloperPortalUrl : https://contosoapi2.developer.azure-api.net
ManagementApiUrl : https://contosoapi2.management.azure-api.net
ScmUrl : https://contosoapi2.scm.azure-api.net
PublisherEmail : admin@contoso.com
OrganizationName : Contoso
NotificationSenderEmail : apimgmt-noreply@mail.windowsazure.com
VirtualNetwork :
VpnType : None
PortalCustomHostnameConfiguration :
ProxyCustomHostnameConfiguration : {contosoapi2.azure-api.net}
ManagementCustomHostnameConfiguration :
ScmCustomHostnameConfiguration :
DeveloperPortalHostnameConfiguration :
SystemCertificates :
Tags : {}
AdditionalRegions : {}
SslSetting : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSetting
Identity :
EnableClientCertificate :
ResourceGroupName : ContosoGroup02
Ez a parancs létrehoz egy fejlesztői szintű API Management szolgáltatást. A parancs megadja a szervezetet és a rendszergazdai címet. A parancs nem adja meg az SKU paramétert. Ezért a parancsmag a Developer alapértelmezett értékét használja.
2. példa: Standard szintű szolgáltatás létrehozása három egységből
New-AzApiManagement -ResourceGroupName "ContosoGroup02" -Name "ContosoApi" -Location "Central US" -Organization "Contoso" -AdminEmail "admin@contoso.com" -Sku Standard -Capacity 3
Ez a parancs létrehoz egy standard szintű API Management szolgáltatást, amely három egységből áll.
3. példa: Fogyasztási szint szolgáltatás létrehozása
New-AzApiManagement -ResourceGroupName Api-Default-North-Europe -Name consumptionskuservice -Location 'West Europe' -Sku Consumption -Organization microsoft -AdminEmail contoso@contoso.com -SystemAssignedIdentity -EnableClientCertificate
PublicIPAddresses :
PrivateIPAddresses :
Id : /subscriptions/subid/resourceGroups/Api-Default-North-Europe/providers/Microsoft.ApiManagement/service/consumptionskuservice
Name : consumptionskuservice
Location : West Europe
Sku : Consumption
Capacity : 0
ProvisioningState : Succeeded
RuntimeUrl : https://consumptionskuservice.azure-api.net
PortalCustomHostnameConfiguration :
ProxyCustomHostnameConfiguration : {consumptionskuservice.azure-api.net}
ManagementCustomHostnameConfiguration :
ScmCustomHostnameConfiguration :
DeveloperPortalHostnameConfiguration :
SystemCertificates :
Tags : {}
AdditionalRegions : {}
SslSetting : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSetting
Identity : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementServiceIdentity
EnableClientCertificate : True
ResourceGroupName : Api-Default-North-Europe
Ez a parancs létrehoz egy használati szintű API Management szolgáltatást, amelyen engedélyezve van az ügyféltanúsítvány Nyugat-Európában.
4. példa: API Management szolgáltatás létrehozása és TLS 1.0 protokoll engedélyezése
$enableTls=@{"Tls10" = "True"}
$sslSetting = New-AzApiManagementSslSetting -FrontendProtocol $enableTls -BackendProtocol $enableTls
New-AzApiManagement -ResourceGroupName Api-Default-CentralUS -Name "testtlspowershell" -Sku Standard -Location "CentralUS" -Organization "Microsoft" -AdminEmail "bar@contoso.com" -SslSetting $sslSetting
PublicIPAddresses : {23.99.140.18}
PrivateIPAddresses :
Id : /subscriptions/subid/resourceGroups/Api-Default-CentralUS/providers/Microsoft.ApiManagement/service/testtlspowershell
Name : testtlspowershell
Location : Central US
Sku : Standard
Capacity : 1
ProvisioningState : Succeeded
RuntimeUrl : https://testtlspowershell.azure-api.net
RuntimeRegionalUrl : https://testtlspowershell-centralus-01.regional.azure-api.net
PortalUrl : https://testtlspowershell.portal.azure-api.net
ManagementApiUrl : https://testtlspowershell.management.azure-api.net
ScmUrl : https://testtlspowershell.scm.azure-api.net
PublisherEmail : bar@contoso.com
OrganizationName : Microsoft
NotificationSenderEmail : apimgmt-noreply@mail.windowsazure.com
VirtualNetwork :
VpnType : None
PortalCustomHostnameConfiguration :
ProxyCustomHostnameConfiguration : {testtlspowershell.azure-api.net}
ManagementCustomHostnameConfiguration :
ScmCustomHostnameConfiguration :
DeveloperPortalHostnameConfiguration :
SystemCertificates :
Tags : {}
AdditionalRegions : {}
SslSetting : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSetting
Identity :
EnableClientCertificate :
ResourceGroupName : Api-Default-CentralUS
Ez a parancs létrehoz egy standard termékváltozatú Api Management szolgáltatást, és engedélyezi a TLS 1.0-t a Frontend-ügyfélen az ApiManagement Gateway és a Háttérügyfél számára az ApiManagement Gateway és a Háttéralkalmazás között.
5. példa: API Management-szolgáltatás létrehozása a rendelkezésre állási zónákban
New-AzApiManagement -ResourceGroupName "contoso-rg" -Name "apim-test-pshell-azs" -Location "Central US" -Organization "Contoso" -AdminEmail "admin@contoso.com" -Sku Premium -Capacity 3 -Zone @("1","2","3")
PublicIPAddresses : {52.238.252.170}
PrivateIPAddresses :
Id : /subscriptions/aa7def4e-6bcd-4b28-b8d5-7613a618e753/resourceGroups/contoso-rg/providers/Microsoft.ApiManagement/service/apim-test-pshell-azs
Name : apim-test-pshell-azs
Location : Central US
Sku : Premium
Capacity : 3
CreatedTimeUtc : 7/30/2021 7:47:12 PM
ProvisioningState : Succeeded
RuntimeUrl : https://apim-test-pshell-azs.azure-api.net
RuntimeRegionalUrl : https://apim-test-pshell-azs-centralus-01.regional.azure-api.net
PortalUrl : https://apim-test-pshell-azs.portal.azure-api.net
DeveloperPortalUrl : https://apim-test-pshell-azs.developer.azure-api.net
ManagementApiUrl : https://apim-test-pshell-azs.management.azure-api.net
ScmUrl : https://apim-test-pshell-azs.scm.azure-api.net
PublisherEmail : admin@contoso.com
OrganizationName : Contoso
NotificationSenderEmail : apimgmt-noreply@mail.windowsazure.com
VirtualNetwork :
VpnType : None
PortalCustomHostnameConfiguration :
ProxyCustomHostnameConfiguration : {apim-test-pshell-azs.azure-api.net}
ManagementCustomHostnameConfiguration :
ScmCustomHostnameConfiguration :
DeveloperPortalHostnameConfiguration :
SystemCertificates :
Tags : {}
AdditionalRegions : {}
SslSetting : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSetting
Identity :
EnableClientCertificate :
Zone : {1, 2, 3}
DisableGateway : False
MinimalControlPlaneApiVersion :
ResourceGroupName : contoso-rg
Ez a parancs létrehoz egy Prémium termékváltozatú API Management szolgáltatást a Zónákban
6. példa: API Management szolgáltatás létrehozása belső módban a virtuális hálózatba az Stv2 használatával
$virtualNetwork = New-AzApiManagementVirtualNetwork -SubnetResourceId "/subscriptions/4f5285a3-9fd7-40ad-91b1-d8fc3823983d/resourceGroups/contosogroup/providers/Microsoft.Network/virtualNetworks/apimvnet/subnets/ps"
$publicIpAddressId = "/subscriptions/4f5285a3-9fd7-40ad-91b1-d8fc3823983d/resourceGroups/contosogroup/providers/Microsoft.Network/publicIPAddresses/apim-external-vnet-ipv4"
New-AzApiManagement -ResourceGroupName "contosogroup" -Location "West US2" -Name "pstestinternalvnet2" -Organization "Contoso" -AdminEmail "admin@contoso.com" -VirtualNetwork $virtualNetwork -VpnType "Internal" -Sku "Premium" -PublicIpAddressId $publicIpAddressId
PublicIPAddresses : {20.99.249.73}
PrivateIPAddresses : {10.0.2.4}
Id : /subscriptions/4f5285a3-9fd7-40ad-91b1-d8fc3823983d/resourceGroups/contosogroup/providers/Microsoft.ApiManagement/service/pstestinternalvnet2
Name : pstestinternalvnet2
Location : West US 2
Sku : Premium
Capacity : 1
CreatedTimeUtc : 3/24/2022 11:09:57 PM
ProvisioningState : Succeeded
RuntimeUrl : https://pstestinternalvnet2.azure-api.net
RuntimeRegionalUrl : https://pstestinternalvnet2-westus2-01.regional.azure-api.net
PortalUrl : https://pstestinternalvnet2.portal.azure-api.net
DeveloperPortalUrl : https://pstestinternalvnet2.developer.azure-api.net
ManagementApiUrl : https://pstestinternalvnet2.management.azure-api.net
ScmUrl : https://pstestinternalvnet2.scm.azure-api.net
PublisherEmail : admin@contoso.com
OrganizationName : Contoso
NotificationSenderEmail : apimgmt-noreply@mail.windowsazure.com
VirtualNetwork : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementVirtualNetwork
VpnType : Internal
PortalCustomHostnameConfiguration :
ProxyCustomHostnameConfiguration : {pstestinternalvnet2.azure-api.net}
ManagementCustomHostnameConfiguration :
ScmCustomHostnameConfiguration :
DeveloperPortalHostnameConfiguration :
SystemCertificates :
Tags : {}
AdditionalRegions : {}
SslSetting : Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSslSetting
Identity :
EnableClientCertificate :
Zone :
DisableGateway :
MinimalControlPlaneApiVersion :
PublicIpAddressId : /subscriptions/4f5285a3-9fd7-40ad-91b1-d8fc3823983d/resourceGroups/contosogroup/providers/Microsoft.Network/publicIPAddresses/apim-external-vnet-ipv4
PlatformVersion : stv2
PublicNetworkAccess : Enabled
PrivateEndpointConnections :
ResourceGroupName : contosogroup
A parancsmag az API Management szolgáltatást az stv2 platform verziójával telepíti a virtuális hálózatba.
7. példa: API Management-szolgáltatás létrehozása külső virtuális hálózathoz az Stv1-hez
$virtualNetwork = New-AzApiManagementVirtualNetwork -SubnetResourceId "/subscriptions/a8ff56dc-3bc7-4174-b1e8-3726ab15d0e2/resourceGroups/ContosoGroup/providers/Microsoft.Network/virtualNetworks/westUsVirtualNetwork/subnets/backendSubnet"
New-AzApiManagement -ResourceGroupName "ContosoGroup" -Location "West US" -Name "ContosoApi" -Organization Contoso -AdminEmail admin@contoso.com -VirtualNetwork $virtualNetwork -VpnType "External" -Sku "Premium"
Ez a parancs egy prémium szintű API Management szolgáltatást hoz létre egy olyan Azure-beli virtuális hálózati alhálózatban, amely egy külső elérésű átjáróvégponttal rendelkezik az USA nyugati régiójában az stv1 modellben
Paraméterek
-AdditionalRegions
Az Azure API Management további üzembehelyezési régiói.
Type: | PsApiManagementRegion[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AdminEmail
Megadja az API Management rendszer által küldött összes értesítés feladó e-mail-címét.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Capacity
Az Azure API Management szolgáltatás termékváltozat-kapacitását adja meg. Az alapértelmezett érték egy (1).
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomHostnameConfiguration
Egyéni gazdagépnév-konfigurációk. Az alapértelmezett érték $null. Az átadási $null az alapértelmezett állomásnevet adja meg.
Type: | PsApiManagementCustomHostNameConfiguration[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
Az Azure-ral való kommunikációhoz használt hitelesítő adatok, fiók, bérlő és előfizetés.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableGateway
A jelző csak prémium termékváltozatú ApiManagement Szolgáltatáshoz és nem belső VNET-üzemelő példányokhoz használható. Ez akkor hasznos, ha egy átjárórégiót ki szeretnénk venni a forgatásból. Ezzel egy új régiót passzív módban is felállhat, tesztelheti, majd később élővé teheti.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableClientCertificate
A jelző csak a Consumption SKU ApiManagement Service-hez használható. Ez kikényszeríti az ügyféltanúsítvány bemutatását az átjárónak küldött minden egyes kérésen. Ez lehetővé teszi a tanúsítvány hitelesítését is az átjáró házirendjében.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Location
Megadja az Api Management szolgáltatás létrehozásának helyét. Érvényes helyek beszerzéséhez használja a Get-AzResourceProvider -ProviderNamespace "Microsoft.ApiManagement" parancsmagot | ahol {$_. ResourceTypes[0]. ResourceTypeName -eq "service"} | Select-Object Locations
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MinimalControlPlaneApiVersion
Minimális Control Plane APIs-verzió, amely lehetővé teszi az API Management szolgáltatás felügyeletét.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Megadja az API Management üzembe helyezésének nevét.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Organization
A szervezet nevét adja meg. Az API Management ezt a címet használja a fejlesztői portálon az e-mail-értesítésekben.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PublicIpAddressId
Standard SKU PublicIpAddress ResoureId az stv2 virtuális hálózati telepítésekbe való integrációhoz
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicNetworkAccess
Azt jelzi, hogy engedélyezett-e nyilvános végpont-hozzáférés ehhez a szolgáltatáshoz. A lehetséges értékek a következők: "Engedélyezve", "Letiltva"
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Annak az erőforráscsoportnak a nevét adja meg, amely alatt ez a parancsmag létrehoz egy API Management-üzembe helyezést.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Sku
Az Azure API Management szolgáltatás szintje. Az érvényes értékek a fejlesztői, az alapszintű, a standard, a prémium és a felhasználás. Az alapértelmezett érték a Fejlesztő.
Type: | Nullable<T>[PsApiManagementSku] |
Accepted values: | Developer, Basic, Standard, Premium, Consumption |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SslSetting
Az ApiManagement szolgáltatás SSL-beállítása. Az alapértelmezett érték a $null
Type: | PsApiManagementSslSetting |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SystemAssignedIdentity
Hozzon létre és rendeljen hozzá egy Azure Active Directory-identitást ehhez a kiszolgálóhoz olyan kulcskezelési szolgáltatásokhoz, mint az Azure KeyVault.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SystemCertificateConfiguration
A belső hitelesítésszolgáltató által a szolgáltatásra telepíteni kívánt tanúsítványok. Az alapértelmezett érték $null.
Type: | PsApiManagementSystemCertificate[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Címkék szótára.
Type: | Dictionary<TKey,TValue>[System.String,System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-UserAssignedIdentity
Rendeljen felhasználói identitásokat ehhez a kiszolgálóhoz olyan kulcskezelési szolgáltatásokhoz, mint az Azure KeyVault.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VirtualNetwork
Az Azure API Management fő telepítési régiójának virtuális hálózati konfigurációja.
Type: | PsApiManagementVirtualNetwork |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnType
Az ApiManagement üzembe helyezésének virtuális hálózati típusa. Az érvényes értékek a következők:
- "Nincs" (alapértelmezett érték. Az ApiManagement nem része semmilyen virtuális hálózatnak")
- "Külső" (Az ApiManagement üzembe helyezése egy internetes végponttal rendelkező virtuális hálózaton belül van beállítva)
- "Belső" (Az ApiManagement üzembe helyezése intranetes végponttal rendelkező virtuális hálózaton belül van beállítva)
Type: | PsApiManagementVpnType |
Accepted values: | None, External, Internal |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Zone
Az api management szolgáltatás üzembe helyezésének helyét jelző rendelkezésre állási zónák listája.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Bevitelek
Nullable<T>[[Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementSku, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
Nullable<T>[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Dictionary<TKey,TValue>[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
PsApiManagementCustomHostNameConfiguration[]
PsApiManagementSystemCertificate[]