external help file | Module Name | online version | schema |
---|---|---|---|
Bicep-help.xml |
Bicep |
2.0.0 |
Exports a specified Azure resource as Bicep.
Export-BicepResource -ResourceId <String[]> [-IncludeTargetScope] -Path <String>
[<CommonParameters>]
Export-BicepResource -ResourceId <String[]> [-IncludeTargetScope] [-AsString]
[<CommonParameters>]
Exports a specified Azure resource as Bicep.
PS C:\> Export-BicepResource -ResourceId $ResourceId -Path 'C:\temp\myfile.bicep'
Exports a resource specified by resource id to the file "myfile.bicep".
PS C:\> Export-BicepResource -ResourceId $ResourceId -AsString
Exports a resource specified by resource id as a string.
Specify that the resource will be exported as a string.
Type: SwitchParameter
Parameter Sets: AsString
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Include the target scope in the resulting exported resource string or file.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The path to the Bicep file that the resource will be exported to.
Type: String
Parameter Sets: Path
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The id of the resource to export.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
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.