public override void ExecuteCmdlet()
        {
            if (ParameterSetName == ByFactoryObject)
            {
                DataFactoryName   = InputObject.DataFactoryName;
                ResourceGroupName = InputObject.ResourceGroupName;
            }

            NewDataFactoryGatewayAuthKeyParameters param = new NewDataFactoryGatewayAuthKeyParameters()
            {
                KeyName = KeyName
            };

            if (ShouldProcess(this.DataFactoryName, "New Data Factory Gateway Auth Key"))
            {
                PSDataFactoryGatewayAuthKey gatewayKey = DataFactoryClient.RegenerateGatewayAuthKey(ResourceGroupName, DataFactoryName, GatewayName, param);
                WriteObject(gatewayKey);
            }
        }
コード例 #2
0
        public virtual PSDataFactoryGatewayAuthKey RegenerateGatewayAuthKey(string resourceGroupName,
                                                                            string dataFactoryName, string gatewayName, NewDataFactoryGatewayAuthKeyParameters parameters)
        {
            var param    = new GatewayRegenerateAuthKeyParameters(parameters.KeyName);
            var response = DataPipelineManagementClient.Gateways.RegenerateAuthKey(resourceGroupName, dataFactoryName, gatewayName, param);

            return(new PSDataFactoryGatewayAuthKey(response.Key1, response.Key2));
        }