internal ArtifactSource ToSdkType() { var sasAuthentication = new SasAuthentication(((PSSasAuthentication)this.Authentication)?.SasUri); return(new ArtifactSource( this.Location, this.SourceType, sasAuthentication, this.Name, this.Type, this.Id, TagsConversionHelper.CreateTagDictionary(this.Tags, validate: true), this.ArtifactRoot)); }
private ArtifactSource CreateArtifactSource( string storageAccountName, string artifactSourceName, string location, AzureDeploymentManagerClient deploymentManagerClient, DeploymentManagerClientHelper clientHelper, bool setupContainer = false) { if (setupContainer) { this.SetupContainer(storageAccountName, clientHelper); } var authentication = new SasAuthentication() { SasUri = clientHelper.GetBlobContainerSasUri( clientHelper.ResourceGroupName, storageAccountName, containerName: EndToEndFunctionalTests.ContainerName) }; var inputArtifactSource = new ArtifactSource( location: location, sourceType: EndToEndFunctionalTests.ArtifactSourceType, authentication: authentication, artifactRoot: EndToEndFunctionalTests.ArtifactRoot, name: artifactSourceName); var artifactSourceResponse = deploymentManagerClient.ArtifactSources.CreateOrUpdate( resourceGroupName: clientHelper.ResourceGroupName, artifactSourceName: artifactSourceName, artifactSourceInfo: inputArtifactSource); this.ValidateArtifactSource(inputArtifactSource, artifactSourceResponse); return(artifactSourceResponse); }
public PSSasAuthentication(SasAuthentication sasAuthentication) : base(sasAuthentication) { this.SasUri = sasAuthentication.SasUri; }