public CreatePSHub ( Microsoft.Azure.Commands.DataFactories.CreatePSHubParameters parameters ) : |
||
parameters | Microsoft.Azure.Commands.DataFactories.CreatePSHubParameters | |
return |
public override void ExecuteCmdlet() { if (ParameterSetName == ByFactoryObject) { if (DataFactory == null) { throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid)); } DataFactoryName = DataFactory.DataFactoryName; ResourceGroupName = DataFactory.ResourceGroupName; } // Resolve the file path and read the raw content string rawJsonContent = DataFactoryClient.ReadJsonFileContent(this.TryResolvePath(File)); // Resolve any mismatch between -Name and the name written in JSON Name = ResolveResourceName(rawJsonContent, Name, "Hub"); CreatePSHubParameters parameters = new CreatePSHubParameters() { ResourceGroupName = ResourceGroupName, DataFactoryName = DataFactoryName, Name = Name, RawJsonContent = rawJsonContent, Force = Force.IsPresent, ConfirmAction = ConfirmAction }; WriteObject(DataFactoryClient.CreatePSHub(parameters)); }