コード例 #1
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListTargetDetectorRecipeDetectorRulesRequest request;

            try
            {
                request = new ListTargetDetectorRecipeDetectorRulesRequest
                {
                    TargetId = TargetId,
                    TargetDetectorRecipeId = TargetDetectorRecipeId,
                    CompartmentId          = CompartmentId,
                    DisplayName            = DisplayName,
                    LifecycleState         = LifecycleState,
                    Limit        = Limit,
                    Page         = Page,
                    SortOrder    = SortOrder,
                    SortBy       = SortBy,
                    OpcRequestId = OpcRequestId
                };
                IEnumerable <ListTargetDetectorRecipeDetectorRulesResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.TargetDetectorRecipeDetectorRuleCollection, true);
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
コード例 #2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListTargetDetectorRecipeDetectorRulesRequest request;

            try
            {
                request = new ListTargetDetectorRecipeDetectorRulesRequest
                {
                    TargetId = TargetId,
                    TargetDetectorRecipeId = TargetDetectorRecipeId,
                    CompartmentId          = CompartmentId,
                    DisplayName            = DisplayName,
                    LifecycleState         = LifecycleState,
                    Limit        = Limit,
                    Page         = Page,
                    SortOrder    = SortOrder,
                    SortBy       = SortBy,
                    OpcRequestId = OpcRequestId
                };
                IEnumerable <ListTargetDetectorRecipeDetectorRulesResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.TargetDetectorRecipeDetectorRuleCollection, true);
                }
                if (!ParameterSetName.Equals(AllPageSet) && !ParameterSetName.Equals(LimitSet) && response.OpcNextPage != null)
                {
                    WriteWarning("This operation supports pagination and not all resources were returned. Re-run using the -All option to auto paginate and list all resources.");
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }