pspulumiyaml.azurenative.devops.psm1
using module pspulumiyaml function Invoke-AzureNativeFunctionDevopsGetPipeline { param ( [parameter(mandatory=$False,HelpMessage='The name of the Pipeline resource in ARM.)')] [string] $pipelineName, [parameter(mandatory=$False,HelpMessage='Name of the resource group within the Azure subscription.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["pipelineName"] = $pipelineName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:devops:getPipeline -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } class PipelineTemplate { [string] $id [object] $parameters } function New-AzureNativeTypeDevopsPipelineTemplate { param ( [parameter(mandatory=$False,HelpMessage='Unique identifier of the pipeline template.)')] [string] $id, [parameter(mandatory=$False,HelpMessage='Dictionary of input parameters used in the pipeline template.)')] [hashtable] $parameters ) process { return $([PipelineTemplate]$PSBoundParameters) } } class Authorization { [ValidateSet('personalAccessToken')] [string] $authorizationType [ValidateSet('personalAccessToken')] [object] $parameters } function New-AzureNativeTypeDevopsAuthorization { param ( [parameter(mandatory=$False,HelpMessage='Type of authorization.)')] [string] [ValidateSet('personalAccessToken')] $authorizationType, [parameter(mandatory=$False,HelpMessage='Authorization parameters corresponding to the authorization type.)')] [hashtable] $parameters ) process { return $([Authorization]$PSBoundParameters) } } class CodeRepository { [ValidateSet('gitHub', 'vstsGit')] [string] $repositoryType [ValidateSet('gitHub', 'vstsGit')] [object] $properties [ValidateSet('gitHub', 'vstsGit')] [string] $defaultBranch [ValidateSet('gitHub', 'vstsGit')] [string] $id [ValidateSet('gitHub', 'vstsGit')] [Authorization] $authorization } function New-AzureNativeTypeDevopsCodeRepository { param ( [parameter(mandatory=$False,HelpMessage='Type of code repository.)')] [string] [ValidateSet('gitHub', 'vstsGit')] $repositoryType, [parameter(mandatory=$False,HelpMessage='Repository-specific properties.)')] [hashtable] $properties, [parameter(mandatory=$False,HelpMessage='Default branch used to configure Continuous Integration (CI) in the pipeline.)')] [string] $defaultBranch, [parameter(mandatory=$False,HelpMessage='Unique immutable identifier of the code repository.)')] [string] $id, [parameter(mandatory=$False,HelpMessage='Authorization info to access the code repository.)')] [Authorization] $authorization ) process { return $([CodeRepository]$PSBoundParameters) } } class BootstrapConfiguration { [PipelineTemplate] $template [CodeRepository] $sourceRepository } function New-AzureNativeTypeDevopsBootstrapConfiguration { param ( [parameter(mandatory=$False,HelpMessage='Template used to bootstrap the pipeline.)')] [PipelineTemplate] $template, [parameter(mandatory=$False,HelpMessage='Repository containing the source code for the pipeline. Currently only ''azurePipeline'' pipeline type supports this.)')] [CodeRepository] $sourceRepository ) process { return $([BootstrapConfiguration]$PSBoundParameters) } } function New-AzureNativeDevopsPipeline { [Alias('azure_native_devops_pipeline')] param ( [parameter(mandatory=$False,HelpMessage='Configuration used to bootstrap the Pipeline.)')] [BootstrapConfiguration] $bootstrapConfiguration, [parameter(mandatory=$False,HelpMessage='Name of the resource group within the Azure subscription.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the Pipeline resource in ARM.)')] [string] $pipelineName, [parameter(mandatory=$False,HelpMessage='Resource Tags)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='Specifies which CI/CD provider to use. Valid options are ''azurePipeline'', ''githubWorkflow''.)')] [string] [ValidateSet('githubWorkflow', 'azurePipeline')] $pipelineType, [parameter(mandatory=$False,HelpMessage='Resource Location)')] [string] $location, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:devops:Pipeline") $resource.properties["bootstrapConfiguration"] = $bootstrapConfiguration $resource.properties["pipelineType"] = $pipelineType $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'pipelineName') { $resource.properties["pipelineName"] = $pipelineName } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } $global:pulumiresources += $resource return $resource } } |