New-AzApiManagementSamplingSetting
Create a new sampling setting for the Diagnostic
Syntax
Default (Default)
New-AzApiManagementSamplingSetting
[-SamplingType <String>]
[-SamplingPercentage <Double>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The cmdlet New-AzApiManagementSamplingSetting creates a new sampling setting for the Diagnostic
Examples
Example 1: Create a basic Sampling setting
New-AzApiManagementSamplingSetting -SamplingType fixed -SamplingPercentage 100
SamplingType Percentage
------------ ----------
fixed 100
Creates a sampling setting of Fixed
type with logging for 100% of the requests / responses
Example 2
Create a new sampling setting for the Diagnostic. (autogenerated)
New-AzApiManagementSamplingSetting -SamplingPercentage 100 -SamplingType fixed
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SamplingPercentage
Rate of Sampling for Fixed Rate Sampling. This parameter is optional.
Parameter properties
Type: | |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SamplingType
The Type of Sampling. This parameter is optional.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.